diff options
Diffstat (limited to 'src/security')
| -rw-r--r-- | src/security/signed.rs | 8 | 
1 files changed, 4 insertions, 4 deletions
diff --git a/src/security/signed.rs b/src/security/signed.rs index 4da6760..2954954 100644 --- a/src/security/signed.rs +++ b/src/security/signed.rs @@ -1,4 +1,4 @@ -use hmac::{Hmac,NewMac,Mac}; +use hmac::{Hmac, Mac, NewMac};  use sha2::Sha256;  const SIGNED_KEY_LEN: usize = 32; @@ -9,11 +9,11 @@ const BASE64_DIGEST_LEN: usize = 44;  /// This code was adapted from the [`cookie`] crate which does not make the sign and verify functions public  /// forcing the use of [`CookieJar`](cookie::CookieJar)s, which are akward to work with without a high-level framework.  // Thanks to Sergio Benitez for writing the original code and releasing it under MIT! -pub struct Key (pub [u8; SIGNED_KEY_LEN]); +pub struct Key(pub [u8; SIGNED_KEY_LEN]);  impl Key {      const fn zero() -> Self { -        Key ( [0; SIGNED_KEY_LEN]) +        Key([0; SIGNED_KEY_LEN])      }      /// Attempts to generate signing/encryption keys from a secure, random @@ -69,4 +69,4 @@ impl Key {              .map(|_| value.to_string())              .map_err(|_| "value did not verify".to_string())      } -}
\ No newline at end of file +}  | 
