const PUBLIC_KEY_SIZE
pub const PUBLIC_KEY_SIZE = 32Purpose
Constant PUBLIC_KEY_SIZE, defining protocol or algorithm parameters.
#crypto/ed25519Ed25519 keys, sign, verify.
const PUBLIC_KEY_SIZEpub const PUBLIC_KEY_SIZE = 32Constant PUBLIC_KEY_SIZE, defining protocol or algorithm parameters.
const PRIVATE_KEY_SIZEpub const PRIVATE_KEY_SIZE = 64Constant PRIVATE_KEY_SIZE, defining protocol or algorithm parameters.
const SIGNATURE_SIZEpub const SIGNATURE_SIZE = 64Constant SIGNATURE_SIZE, defining protocol or algorithm parameters.
const SEED_SIZEpub const SEED_SIZE = 32Constant SEED_SIZE, defining protocol or algorithm parameters.
new_key_from_seedpub fn new_key_from_seed(seed string) stringConstruct key from seed. Throws on failure; handle the error or propagate it to the caller.
seed stringstring — result string
generate_keypub fn generate_key() stringGenerate key. Throws on failure; handle the error or propagate it to the caller.
No arguments are required.
string — result string
publicpub fn public(priv &string) stringExecute public. Throws on failure; handle the error or propagate it to the caller.
priv &stringstring — result string
seedpub fn seed(priv &string) stringExecute seed. Throws on failure; handle the error or propagate it to the caller.
priv &stringstring — result string
signpub fn sign(private_key &string, message &string) stringCompute digital signature using private key. Throws on failure; handle the error or propagate it to the caller.
private_key &stringmessage &stringstring — result string
verifypub fn verify(public_key &string, message &string, sig &string) boolVerify whether digital signature matches message.
public_key &stringmessage &stringsig &stringbool — true or false