summary refs log tree commit diff
path: root/crypto/src/pqc/crypto/IMessageSigner.cs
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/pqc/crypto/IMessageSigner.cs')
-rw-r--r--crypto/src/pqc/crypto/IMessageSigner.cs50
1 files changed, 25 insertions, 25 deletions
diff --git a/crypto/src/pqc/crypto/IMessageSigner.cs b/crypto/src/pqc/crypto/IMessageSigner.cs
index f04ca4477..fdf3a1009 100644
--- a/crypto/src/pqc/crypto/IMessageSigner.cs
+++ b/crypto/src/pqc/crypto/IMessageSigner.cs
@@ -2,36 +2,36 @@ using Org.BouncyCastle.Crypto;
 
 namespace Org.BouncyCastle.Pqc.Crypto
 {
-    /**
-     * Base interface for a PQC signing algorithm.
-     */
+    /// <summary>Base interface for a PQC signature algorithm.</summary>
     public interface IMessageSigner
     {
-        /**
-         * initialise the signer for signature generation or signature
-         * verification.
-         *
-         * @param forSigning true if we are generating a signature, false
-         *                   otherwise.
-         * @param param      key parameters for signature generation.
-         */
+        /// <summary>Initialise this instance for signature generation or verification.</summary>
+        /// <param name="forSigning">true if we are generating a signature, false otherwise.</param>
+        /// <param name="param">parameters for signature generation or verification.</param>
         void Init(bool forSigning, ICipherParameters param);
 
-        /**
-         * sign the passed in message (usually the output of a hash function).
-         *
-         * @param message the message to be signed.
-         * @return the signature of the message
-         */
+        // 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);
 
-        /**
-         * verify the message message against the signature value.
-         *
-         * @param message the message that was supposed to have been signed.
-         * @param signature the signature of the 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);
-    }
 
-}
\ No newline at end of file
+#if NETCOREAPP2_1_OR_GREATER || NETSTANDARD2_1_OR_GREATER
+        // TODO[api]
+        //bool VerifySignature(ReadOnlySpan<byte> message, ReadOnlySpan<byte> signature);
+#endif
+    }
+}