karyon_core::crypto::key_pair

Trait KeyPairExt

Source
trait KeyPairExt {
    // Required methods
    fn sign(&self, msg: &[u8]) -> Vec<u8>;
    fn public(&self) -> PublicKey;
    fn secret(&self) -> SecretKey;
}
Expand description

An extension trait, adding essential methods to all KeyPair types.

Required Methods§

Source

fn sign(&self, msg: &[u8]) -> Vec<u8>

Sign a message using the private key.

Source

fn public(&self) -> PublicKey

Get the public key of this keypair.

Source

fn secret(&self) -> SecretKey

Get the secret key of this keypair.

Implementors§