Struct ssb_crypto::SecretKey[][src]

#[repr(C)]
pub struct SecretKey(pub [u8; 32]);
Expand description

The secret half of a Keypair.

Note that a libsodium “secret key” is actually a pair of secret and public keys, in the same buffer. This is only the secret half, which isn’t much use on its own. For signing, and deserializing a libsodium secretkey encoded in base64 (as in the ~/.ssb/secret file), see Keypair.

The underlying memory is zeroed on drop.

Tuple Fields

0: [u8; 32]

Implementations

Size of a secret key, in bytes (32).

Trait Implementations

Get the bytes of this value. Read more

Get the bytes of this value mutably. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Executes the destructor for this type. Read more

Zero out this object from memory using Rust intrinsics which ensure the zeroization operation is not “optimized away” by the compiler. 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 resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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.