aboutsummaryrefslogtreecommitdiff
path: root/src/signed.rs
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2021-01-24 22:37:36 +0100
committerMartin Fischer <martin@push-f.com>2021-01-24 22:49:57 +0100
commit76e92d7281b45ce506046a8946b7fde3355c485d (patch)
treee3a261e993450047a3a366eae0091efc0948377c /src/signed.rs
parent4ba2d050bdf1a3c0070f3aa2331c82745611af1f (diff)
define & impl traits instead of wrapping types
bump version to 0.3.0
Diffstat (limited to 'src/signed.rs')
-rw-r--r--src/signed.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/signed.rs b/src/signed.rs
index 9f0d184..4da6760 100644
--- a/src/signed.rs
+++ b/src/signed.rs
@@ -1,7 +1,3 @@
-// This code was adapted from the cookie crate which does not make the sign and verify functions public
-// forcing the use of CookieJars, 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!
-
use hmac::{Hmac,NewMac,Mac};
use sha2::Sha256;
@@ -9,6 +5,10 @@ const SIGNED_KEY_LEN: usize = 32;
const BASE64_DIGEST_LEN: usize = 44;
/// A convenience wrapper around HMAC.
+///
+/// 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]);
impl Key {