pub struct HmacSha512Key { /* private fields */ }Expand description
A HS512 key.
Implementations§
Source§impl HmacSha512Key
impl HmacSha512Key
Sourcepub fn generate() -> HmacSha256Key
pub fn generate() -> HmacSha256Key
Generates a random 256-bit HmacSha512Key.
Sourcepub fn from_bytes(key: &[u8]) -> Result<HmacSha512Key, Error>
pub fn from_bytes(key: &[u8]) -> Result<HmacSha512Key, Error>
Creates a new HmacSha512Key from bytes. Returns an error is the key is shorter than
16 bytes (128 bits).
pub fn as_bytes(&self) -> &[u8] ⓘ
Trait Implementations§
Source§impl Drop for HmacSha512Key
impl Drop for HmacSha512Key
Source§impl From<&HmacSha512Key> for Jwk
impl From<&HmacSha512Key> for Jwk
Source§fn from(key: &HmacSha512Key) -> Self
fn from(key: &HmacSha512Key) -> Self
Converts to this type from the input type.
Source§impl Signer for HmacSha512Key
impl Signer for HmacSha512Key
Source§impl Verifier for HmacSha512Key
impl Verifier for HmacSha512Key
Auto Trait Implementations§
impl Freeze for HmacSha512Key
impl RefUnwindSafe for HmacSha512Key
impl Send for HmacSha512Key
impl Sync for HmacSha512Key
impl Unpin for HmacSha512Key
impl UnsafeUnpin for HmacSha512Key
impl UnwindSafe for HmacSha512Key
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