diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-06-24 11:49:55 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-06-24 11:49:55 +0700 |
commit | 33e4b035e8dc3721cd311956227ad29c0f8a97d0 (patch) | |
tree | 61afd296ddc5e40bad9a72c3c7976a16e2796e42 /crypto/src/math/ec/multiplier/WTauNafMultiplier.cs | |
parent | Simplify attributes (diff) | |
download | BouncyCastle.NET-ed25519-33e4b035e8dc3721cd311956227ad29c0f8a97d0.tar.xz |
Some modern syntax updates
Diffstat (limited to 'crypto/src/math/ec/multiplier/WTauNafMultiplier.cs')
-rw-r--r-- | crypto/src/math/ec/multiplier/WTauNafMultiplier.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/src/math/ec/multiplier/WTauNafMultiplier.cs b/crypto/src/math/ec/multiplier/WTauNafMultiplier.cs index 4dce54440..8e50a161d 100644 --- a/crypto/src/math/ec/multiplier/WTauNafMultiplier.cs +++ b/crypto/src/math/ec/multiplier/WTauNafMultiplier.cs @@ -24,10 +24,10 @@ namespace Org.BouncyCastle.Math.EC.Multiplier */ protected override ECPoint MultiplyPositive(ECPoint point, BigInteger k) { - if (!(point is AbstractF2mPoint)) + AbstractF2mPoint p = point as AbstractF2mPoint; + if (p == null) throw new ArgumentException("Only AbstractF2mPoint can be used in WTauNafMultiplier"); - AbstractF2mPoint p = (AbstractF2mPoint)point; AbstractF2mCurve curve = (AbstractF2mCurve)p.Curve; int m = curve.FieldSize; sbyte a = (sbyte)curve.A.ToBigInteger().IntValue; |