Verify a DSA signature over a pre-hashed message.
Namespace: CryptoSysPQCAssembly: diCrSysPQCNet (in diCrSysPQCNet.dll) Version: 1.0.0.0 (1.0.0.0)
Syntaxpublic static bool VerifyPreHash(
DsaAlg alg,
byte[] sig,
byte[] msg,
DsaPreHashAlg hashAlg,
byte[] pk,
byte[] context = null,
string paramstr = ""
)
Public Shared Function VerifyPreHash (
alg As DsaAlg,
sig As Byte(),
msg As Byte(),
hashAlg As DsaPreHashAlg,
pk As Byte(),
Optional context As Byte() = Nothing,
Optional paramstr As String = ""
) As Boolean
Parameters
- alg DsaAlg
- DSA signature algorithm.
- sig Byte
- Signature value.
- msg Byte
- Hash digest of message to be verified PH_M = PH(M).
- hashAlg DsaPreHashAlg
- Pre-hash function used to create hash digest.
- pk Byte
- Public key.
- context Byte (Optional)
- Optional context string in byte array to match context string used when signing.
- paramstr String (Optional)
- Optional parameters string.
Return Value
BooleanTrue if signature verifies.
Exceptions
Remarks
For the pre-hash version, the hash digest of the message is passed instead of the message itself.
Caller is responsible for computing the hash digest independently prior to input.
The hash function used must be identifed in the hashAlg parameter.
See Also