diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2014-01-24 15:07:20 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2014-01-24 15:07:20 +0700 |
commit | 3747ca5c316480183a81df8a3e9fceef5f95bfd2 (patch) | |
tree | 483c8855f6e004699501e641487d3e06ac712651 /crypto/src/math | |
parent | Make class abstract (diff) | |
download | BouncyCastle.NET-ed25519-3747ca5c316480183a81df8a3e9fceef5f95bfd2.tar.xz |
Fix return type in SubFromExt
Diffstat (limited to 'crypto/src/math')
-rw-r--r-- | crypto/src/math/ec/Nat.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/src/math/ec/Nat.cs b/crypto/src/math/ec/Nat.cs index 9819b9e73..b44ce8cb4 100644 --- a/crypto/src/math/ec/Nat.cs +++ b/crypto/src/math/ec/Nat.cs @@ -457,17 +457,17 @@ namespace Org.BouncyCastle.Math.EC return (int)c; } - public static uint SubFromExt(int len, uint[] x, int xOff, uint[] zz, int zzOff) + public static int SubFromExt(int len, uint[] x, int xOff, uint[] zz, int zzOff) { // assert zzOff <= len; - ulong c = 0; + long c = 0; for (int i = 0; i < len; ++i) { - c += (ulong)zz[zzOff + i] - x[xOff + i]; + c += (long)zz[zzOff + i] - x[xOff + i]; zz[zzOff + i] = (uint)c; c >>= 32; } - return (uint)c; + return (int)c; } public static BigInteger ToBigInteger(int len, uint[] x) |