pub struct KeyInfo {
pub key: Vec<u8>,
pub salt: Vec<u8>,
pub info: Vec<u8>,
}
Expand description
A struct that holds the key information required for key expansion.
The key expansion process is used to derive a new key from the main secret key. Its main purpose is to expand the key to the HMAC algorithm’s block size to avoid padding which can reduce the effort required for a brute force attack.
The KeyInfo
struct contains the main secret key, salt for key expansion, and optional application-specific info.
key
field is the main secret key used for signing and verifying data.salt
field is used for key expansion.info
field is optional and can be used to provide application-specific information.
The salt
and the info
fields can help to prevent key reuse and provide additional security.
Fields§
§key: Vec<u8>
§salt: Vec<u8>
§info: Vec<u8>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KeyInfo
impl RefUnwindSafe for KeyInfo
impl Send for KeyInfo
impl Sync for KeyInfo
impl Unpin for KeyInfo
impl UnwindSafe for KeyInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more