internal static SafeBignumHandle CreateBignum(ReadOnlySpan <byte> bigEndianValue) { SafeBignumHandle ret = BigNumFromBinary(bigEndianValue, bigEndianValue.Length); if (ret.IsInvalid) { Exception e = CreateOpenSslCryptographicException(); ret.Dispose(); throw e; } return(ret); }
internal static SafeBignumHandle CreateBignum(ReadOnlySpan <byte> bigEndianValue) { unsafe { fixed(byte *pBigEndianValue = bigEndianValue) { SafeBignumHandle ret = BigNumFromBinary(pBigEndianValue, bigEndianValue.Length); if (ret.IsInvalid) { ret.Dispose(); throw new CryptographicException(); } return(ret); } } }