We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a0470b2 commit c11e0f9Copy full SHA for c11e0f9
crypto/src/math/ec/ECCurve.cs
@@ -433,18 +433,17 @@ public virtual ECEndomorphism GetEndomorphism()
433
}
434
435
/**
436
- * Sets the default <code>ECMultiplier</code>, unless already set.
+ * Sets the default <code>ECMultiplier</code>, unless already set.
437
+ *
438
+ * We avoid locking for performance reasons, so there is no uniqueness guarantee.
439
*/
440
public virtual ECMultiplier GetMultiplier()
441
{
- lock (this)
442
+ if (this.m_multiplier == null)
443
- if (this.m_multiplier == null)
- {
444
- this.m_multiplier = CreateDefaultMultiplier();
445
- }
446
- return this.m_multiplier;
+ this.m_multiplier = CreateDefaultMultiplier();
447
+ return this.m_multiplier;
448
449
450
0 commit comments