Enum wolf_crypto::chacha::KeyRef
source · pub enum KeyRef<'r> {
B128(&'r [u8; 16]),
B256(&'r [u8; 32]),
}Variants§
Implementations§
source§impl<'r> KeyRef<'r>
impl<'r> KeyRef<'r>
pub const fn new_128(key: &'r [u8; 16]) -> Self
pub const fn new_256(key: &'r [u8; 32]) -> Self
pub const fn len(&self) -> u32
sourcepub const fn ident(&self) -> &'static str
pub const fn ident(&self) -> &'static str
Returns a friendly identifier for the key.
§Returns
256bit key:"KeyRef::256"128bit key:"KeyRef::128"
pub const fn as_slice(&self) -> &[u8] ⓘ
Trait Implementations§
Auto Trait Implementations§
impl<'r> Freeze for KeyRef<'r>
impl<'r> RefUnwindSafe for KeyRef<'r>
impl<'r> Send for KeyRef<'r>
impl<'r> Sync for KeyRef<'r>
impl<'r> Unpin for KeyRef<'r>
impl<'r> UnwindSafe for KeyRef<'r>
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