e-CryptIt Engine Xojo Plugin |
|
EinhugurEd25519.Sign Method
Signs message using private and public key pair.
Parameters
- message
- The message to sign.
- keys
- The key pair to use to sign.
Returns
- String
- The signature. (Note that signatures are binary data, so not string with any encoding, you can use EncodeHex to represent it as Hex though if wanting to display it)
Signature is 64 character long.
Remarks
var message as String = "Some important message"
var keys as new EinhugurEd25519.KeyPair()
var signature as String = EinhugurEd25519.Sign(message,keys)
MessageBox("Signature: " + EndOfLine + EncodeHex(signature))
if EinhugurEd25519.Verify(message, signature, keys.PublicKey) then
MessageBox("Signature was valid")
else
MessageBox("Signature was not valid")
end if
This function can throw InvalidArgumentException if the keys are nil.
Supported Platforms:
macOS Intel 64 bitmacOS Apple SiliconWindows 32 bitWindows 64 bitWindows ARM 64 bitLinux 32 bitLinux 64 bitLinux ARM 32 bitLinux ARM 64 bitiOS
See Also
EinhugurEd25519 Module