diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-08-02 15:02:15 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2022-08-02 15:02:15 +0700 |
commit | ffd9f8fde126859cd9441baef7899e5645047dae (patch) | |
tree | 08a125229bae874c58ae7b2a1348423eb144ad41 /crypto/src/crmf | |
parent | Use intrinsics in custom binary curves (diff) | |
download | BouncyCastle.NET-ed25519-ffd9f8fde126859cd9441baef7899e5645047dae.tar.xz |
Add span variant for Collect
Diffstat (limited to 'crypto/src/crmf')
-rw-r--r-- | crypto/src/crmf/PKMacBuilder.cs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/crypto/src/crmf/PKMacBuilder.cs b/crypto/src/crmf/PKMacBuilder.cs index 156936eac..8093eab44 100644 --- a/crypto/src/crmf/PKMacBuilder.cs +++ b/crypto/src/crmf/PKMacBuilder.cs @@ -83,6 +83,15 @@ namespace Org.BouncyCastle.Crmf signature.CopyTo(sig, sigOff); return signature.Length; } + +#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER + public int Collect(Span<byte> destination) + { + byte[] result = Collect(); + result.AsSpan().CopyTo(destination); + return result.Length; + } +#endif } public class PKMacBuilder |