Struct yubihsm::auth_key::AuthKey[][src]

pub struct AuthKey(_);

YubiHSM2 authentication keys (2 * AES-128 symmetric PSK) from which session keys are derived.c

Methods

impl AuthKey
[src]

Generate a random AuthKey using OsRng.

Derive an auth key from a password (using PBKDF2 + static salt). This method is designed to be compatible with yubihsm-shell. Ensure you use a long, random password when using this method as the key derivation algorithm used does little to prevent brute force attacks.

Create an AuthKey from a 32-byte slice, returning an error if the key is the wrong length

Create a new AuthKey from the given byte array

Important traits for &'a [u8]

Borrow the secret authentication keys

Trait Implementations

impl Clone for AuthKey
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for AuthKey
[src]

Formats the value using the given formatter. Read more

impl Default for AuthKey
[src]

Derive the default authentication key for all YubiHSM2s

Returns the "default value" for a type. Read more

impl Drop for AuthKey
[src]

Executes the destructor for this type. Read more

impl From<[u8; 32]> for AuthKey
[src]

Performs the conversion.

impl Serialize for AuthKey
[src]

Serialize this value into the given Serde serializer. Read more

impl<'de> Deserialize<'de> for AuthKey
[src]

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations

impl Send for AuthKey

impl Sync for AuthKey