pub struct SecretKey<'a>(_);
Expand description

A Classic McEliece secret key.

Should be kept on the device where it’s generated. Used to decapsulate the SharedSecret from the Ciphertext received from the encapsulator.

Implementations

Available on crate feature alloc only.

Copies the key to the heap and makes it 'static.

Returns the secret key as an array of bytes.

Please note that depending on your threat model, moving the data out of the SecretKey can be bad for security. The SecretKey type is designed to keep the backing data in a single location in memory and zeroing it out when it goes out of scope.

Trait Implementations

Converts this type into a shared reference of the (usually inferred) input type.

Formats the value using the given formatter. Read more

Attempt to decapsulate the given encapsulated key. Returns the shared secret on success, or an error if something went wrong. Read more

Executes the destructor for this type. Read more

Represents a mutable byte array of the correct size as a SecretKey. Please note that the array will be zeroed on drop.

Converts to this type from the input type.

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.