Struct wascap::prelude::KeyPair[][src]

pub struct KeyPair { /* fields omitted */ }
Expand description

The main interface used for reading and writing nkey-encoded key pairs, including seeds and public keys. Instances of this type cannot be cloned.

Implementations

Creates a new key pair of the given type

Creates a new user key pair with a seed that has a U prefix

Creates a new account key pair with a seed that has an A prefix

Creates a new operator key pair with a seed that has an O prefix

Creates a new cluster key pair with a seed that has the C prefix

Creates a new server key pair with a seed that has the N prefix

Creates a new module (e.g. WebAssembly) key pair with a seed that has the M prefix

Creates a new service / service provider key pair with a seed that has the V prefix

Returns the encoded, human-readable public key of this key pair

Attempts to sign the given input with the key pair’s seed

Attempts to verify that the given signature is valid for the given input

Attempts to return the encoded, human-readable string for this key pair’s seed. Remember that this value should be treated as a secret. Do not store it for any longer than necessary

Attempts to produce a public-only key pair from the given encoded public key string

Attempts to produce a full key pair from the given encoded seed string

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.