diff options
Diffstat (limited to 'crypto/src/asn1/Asn1OctetString.cs')
-rw-r--r-- | crypto/src/asn1/Asn1OctetString.cs | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/crypto/src/asn1/Asn1OctetString.cs b/crypto/src/asn1/Asn1OctetString.cs index 8f7da8800..e52e50759 100644 --- a/crypto/src/asn1/Asn1OctetString.cs +++ b/crypto/src/asn1/Asn1OctetString.cs @@ -103,7 +103,19 @@ namespace Org.BouncyCastle.Asn1 return contents; } - protected override int Asn1GetHashCode() +#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER + internal ReadOnlyMemory<byte> GetOctetsMemory() + { + return contents.AsMemory(); + } + + internal ReadOnlySpan<byte> GetOctetsSpan() + { + return contents.AsSpan(); + } +#endif + + protected override int Asn1GetHashCode() { return Arrays.GetHashCode(GetOctets()); } |