diff options
Diffstat (limited to 'crypto/src/asn1/x9/X9IntegerConverter.cs')
-rw-r--r-- | crypto/src/asn1/x9/X9IntegerConverter.cs | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/crypto/src/asn1/x9/X9IntegerConverter.cs b/crypto/src/asn1/x9/X9IntegerConverter.cs index e8f457114..586b3caef 100644 --- a/crypto/src/asn1/x9/X9IntegerConverter.cs +++ b/crypto/src/asn1/x9/X9IntegerConverter.cs @@ -7,15 +7,9 @@ namespace Org.BouncyCastle.Asn1.X9 { public abstract class X9IntegerConverter { - public static int GetByteLength(ECFieldElement fe) - { - return (fe.FieldSize + 7) / 8; - } + public static int GetByteLength(ECFieldElement fe) => fe.GetEncodedLength(); - public static int GetByteLength(ECCurve c) - { - return (c.FieldSize + 7) / 8; - } + public static int GetByteLength(ECCurve c) => c.FieldElementEncodingLength; public static byte[] IntegerToBytes(BigInteger s, int qLength) { |