OxL Reference

method ed25519.sign

The 64-byte signature of message.

Example:

oxl✓ checked in CI
use std.crypto { ed25519 }
use std.ser { bytesOf }

fn main() io, rand {
  let kp = ed25519.generate()
  print("{ed25519.sign(&kp.secretKey, bytesOf(&"hello"))!.len()}")
}
Output
64
pub(api) static fn sign(secretKey: &secret<bytes>, message: bytes) -> bytes | CryptoError

Since. 1.0.0-beta

Parameters

NameType
secretKey&secret<bytes>
messagebytes

Returns

bytes

Errors

  • CryptoError @error
  • `CryptoError` when the private key is not 32 bytes.

Effects

none declared (pure unless the body says otherwise)

Defined in: std/crypto/crypto.oxl:637

See also