Skip to content

libsodium.PKI.SignData

Andrew Lambert edited this page Mar 20, 2017 · 11 revisions

libsodium.PKI.SignData

Method Signature

 Protected Function SignData(Message As MemoryBlock, SenderKey As libsodium.PKI.SigningKey, Detached As Boolean = False, Exportable As Boolean = False) As MemoryBlock

Parameters

Name Type Comment
Message MemoryBlock The data to be decrypted.
SenderKey SigningKey The signer's key pair.
Detached Boolean Optional. if True then only the signature is returned. The default is False which returns the Message and the signature concatenated.
Exportable Boolean Optional. If True then the return value is encoded in a text-based export format; otherwise the raw binary data is returned.

Return value

The Message and signature concatenated, or (if Detatched=True) the signature only. On error returns Nil.

Remarks

Digitally signs the Message using the private half of the specified Ed25519 key pair. By default, the message and signature are returned concatenated. To get the signature only specify the Detatched parameter.

If Exportable=True then the return value is the signed message encoded in a plain text format. Both the raw binary and plain text format are understood by the VerifyData method.

See also

Clone this wiki locally