diff options
-rw-r--r-- | crypto/src/crypto/ISigner.cs | 5 | ||||
-rw-r--r-- | crypto/src/pqc/crypto/IMessageSigner.cs | 13 |
2 files changed, 18 insertions, 0 deletions
diff --git a/crypto/src/crypto/ISigner.cs b/crypto/src/crypto/ISigner.cs index 0e2851304..49b7e6406 100644 --- a/crypto/src/crypto/ISigner.cs +++ b/crypto/src/crypto/ISigner.cs @@ -35,6 +35,11 @@ namespace Org.BouncyCastle.Crypto /// <returns>A byte array containing the signature for the message.</returns> byte[] GenerateSignature(); +#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER + // TODO[api] + //int GenerateSignature(Span<byte> output); +#endif + /// <summary>Return true if the internal state represents the signature described in the passed in array. /// </summary> /// <param name="signature">an array containing the candidate signature to verify.</param> diff --git a/crypto/src/pqc/crypto/IMessageSigner.cs b/crypto/src/pqc/crypto/IMessageSigner.cs index cef23898c..fdf3a1009 100644 --- a/crypto/src/pqc/crypto/IMessageSigner.cs +++ b/crypto/src/pqc/crypto/IMessageSigner.cs @@ -10,15 +10,28 @@ namespace Org.BouncyCastle.Pqc.Crypto /// <param name="param">parameters for signature generation or verification.</param> void Init(bool forSigning, ICipherParameters param); + // TODO[api] + //int GetMaxSignatureSize(); + /// <summary>Sign a message.</summary> /// <param name="message">the message to be signed.</param> /// <returns>the signature of the message.</returns> byte[] GenerateSignature(byte[] message); +#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER + // TODO[api] + //int GenerateSignature(Span<byte> output); +#endif + /// <summary>Verify a purported signature for a message.</summary> /// <param name="message">the message supposedly signed.</param> /// <param name="signature">the purported signature to verify.</param> /// <returns>true if and only if the signature verified against the message.</returns> bool VerifySignature(byte[] message, byte[] signature); + +#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER + // TODO[api] + //bool VerifySignature(ReadOnlySpan<byte> message, ReadOnlySpan<byte> signature); +#endif } } |