Skip to content

Commit

Permalink
fix: zeroize access keys
Browse files Browse the repository at this point in the history
  • Loading branch information
sstelfox committed Feb 17, 2024
1 parent 8929442 commit b35b909
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/codec/crypto/access_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ use chacha20poly1305::{AeadInPlace, Key as ChaChaKey, KeyInit, XChaCha20Poly1305
use ecdsa::signature::rand_core::CryptoRngCore;
use nom::AsBytes;
use rand::Rng;
use zeroize::{Zeroize, ZeroizeOnDrop};

use crate::codec::crypto::{
AsymLockedAccessKey, AuthenticationTag, Nonce, SymLockedAccessKey, VerifyingKey,
};

const ACCESS_KEY_LENGTH: usize = 32;

#[derive(Clone)]
#[derive(Clone, Zeroize, ZeroizeOnDrop)]
pub struct AccessKey([u8; ACCESS_KEY_LENGTH]);

impl AccessKey {
Expand Down

0 comments on commit b35b909

Please sign in to comment.