Skip to content

libsodium.PKI.VerifyData

Andrew Lambert edited this page Jan 21, 2023 · 11 revisions

libsodium.PKI.VerifyData

Method Signatures

 Protected Function VerifyData(SignedMessage As MemoryBlock, SignerPublicKey As libsodium.PKI.PublicKey) As MemoryBlock
 Protected Function VerifyData(SignedMessage As MemoryBlock, SignerPublicKey As libsodium.PKI.PublicKey, DetachedSignature As MemoryBlock) As Boolean
 Protected Function VerifyData(SignedMessage As Readable, SignerPublicKey As libsodium.PKI.PublicKey, Signature As MemoryBlock) As Boolean
 Protected Function VerifyData(Algorithm As libsodium.HashType, SignedMessage As Readable, SignerPublicKey As libsodium.PKI.PublicKey, Signature As MemoryBlock) As Boolean

Parameters

VerifyData(MemoryBlock, PublicKey) As MemoryBlock

Name Type Comment
SignedMessage MemoryBlock The data, with attached signature, to be verified.
SignerPublicKey PublicKey The public half of the signer's key pair.

VerifyData(MemoryBlock, PublicKey, MemoryBlock) As Boolean

Name Type Comment
SignedMessage MemoryBlock The data to be verified.
SignerPublicKey PublicKey The public half of the signer's key pair.
DetachedSignature MemoryBlock The detached signature.

VerifyData(Algorithm As libsodium.HashType, Readable, libsodium.PKI.PublicKey, Signature As MemoryBlock) As Boolean

Name Type Comment
Algorithm HashType Optional. If specified, the type of generic hash to use.
SignedMessage Readable The data to be verified.
SignerPublicKey PublicKey The public half of the signer's key pair.
Signature MemoryBlock The signature to be verified.

Return value

For detached signatures this method returns True if the signature is valid, and False otherwise.

For concatenated signatures this method returns the message without the signature if the signature is valid, and Nil otherwise.

Remarks

Validates a SignedMessage using the public half of the specified Ed25519 key pair.

See also

Clone this wiki locally