diff options
Diffstat (limited to 'crypto/src/tls')
-rw-r--r-- | crypto/src/tls/crypto/impl/bc/BcTlsDHDomain.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/src/tls/crypto/impl/bc/BcTlsDHDomain.cs b/crypto/src/tls/crypto/impl/bc/BcTlsDHDomain.cs index faf6b4576..6a947c23b 100644 --- a/crypto/src/tls/crypto/impl/bc/BcTlsDHDomain.cs +++ b/crypto/src/tls/crypto/impl/bc/BcTlsDHDomain.cs @@ -24,7 +24,7 @@ namespace Org.BouncyCastle.Tls.Crypto.Impl.BC private static int GetValueLength(DHParameters dh) { - return (dh.P.BitLength + 7) / 8; + return BigIntegers.GetUnsignedByteLength(dh.P); } public static BcTlsSecret CalculateDHAgreement(BcTlsCrypto crypto, DHPrivateKeyParameters privateKey, |