Skip to content

Commit

Permalink
2B -> 2b
Browse files Browse the repository at this point in the history
  • Loading branch information
jedisct1 committed Dec 17, 2023
1 parent ac9f3e2 commit 10fdaf7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/algorithms/hmac.rs
Original file line number Diff line number Diff line change
Expand Up @@ -312,12 +312,12 @@ impl HS384Key {
//

#[derive(Debug, Clone)]
pub struct Blake2BKey {
pub struct Blake2bKey {
key: HMACKey,
key_id: Option<String>,
}

impl MACLike for Blake2BKey {
impl MACLike for Blake2bKey {
fn jwt_alg_name() -> &'static str {
"BLAKE2B"
}
Expand Down Expand Up @@ -355,9 +355,9 @@ impl MACLike for Blake2BKey {
}
}

impl Blake2BKey {
impl Blake2bKey {
pub fn from_bytes(raw_key: &[u8]) -> Self {
Blake2BKey {
Blake2bKey {
key: HMACKey::from_bytes(raw_key),
key_id: None,
}
Expand All @@ -368,7 +368,7 @@ impl Blake2BKey {
}

pub fn generate() -> Self {
Blake2BKey {
Blake2bKey {
key: HMACKey::generate(),
key_id: None,
}
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ a3t0cyDKinOY7JGIwh8DWAa4pfEzgg56yLcilYSSohXeaQV0nR8+rm9J8GUYXjPK

#[test]
fn blake2b() {
let key = Blake2BKey::from_bytes(b"your-256-bit-secret").with_key_id("my-key-id");
let key = Blake2bKey::from_bytes(b"your-256-bit-secret").with_key_id("my-key-id");
let claims = Claims::create(Duration::from_secs(86400)).with_issuer("test issuer");
let token = key.authenticate(claims).unwrap();
let options = VerificationOptions {
Expand Down

0 comments on commit 10fdaf7

Please sign in to comment.