Struct asuran::repository::Key [−][src]
pub struct Key { /* fields omitted */ }
Expand description
Stores the Key material used by an asuran repository.
Contains 5 separate pieces of key material:
key
:
The key used for encryption/decryption operations
hmac_key
:
The key used for generating the integrity validation HMAC tag
id_key
:
The key used for ChunkID
generation using the HMAC
chunker_nonce
:
A random u64
used for chunker randomization with supported chunking algorithms
Implementations
Creates a key from the given array of bytes
Will split the key stream into thirds.
Does not perform any padding.
Securely generates a random bundle of key material
Takes the desired length in bytes of each individual key component
Obtains the chunker nonce
Trait Implementations
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<Key, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<Key, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Key
impl UnwindSafe for Key
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more