From 33e4b035e8dc3721cd311956227ad29c0f8a97d0 Mon Sep 17 00:00:00 2001 From: Peter Dettman Date: Fri, 24 Jun 2022 11:49:55 +0700 Subject: Some modern syntax updates --- crypto/src/math/ec/multiplier/WTauNafMultiplier.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crypto/src/math/ec/multiplier/WTauNafMultiplier.cs') 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; -- cgit 1.4.1