pub struct KeySet { /* private fields */ }

Implementations

Construct a new key, with the given secret and iv.

Create a key set from the given file ID and secret. This method may be used to create a key set based on a share URL.

Generate a secure new key.

If derive is true, file, authentication and metadata keys will be derived from the generated secret.

Derive a file, authentication and metadata key.

Derive an authentication key, with the given password and file URL. This method does not derive a (new) file and metadata key.

Get the secret key.

Get the secret key as URL-safe base64 encoded string.

Get the input vector.

Set the input vector.

Get the file encryption key, if derived.

Get the authentication encryption key, if derived.

Get the authentication encryption key, if derived, as URL-safe base64 encoded string.

Get the metadata encryption key, if derived.

Get the cipher type to use in combination with these keys.

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.