Compare commits
2 commits
ea5e384c60
...
cd14911221
Author | SHA1 | Date | |
---|---|---|---|
cd14911221 | |||
74d9903f69 |
5 changed files with 11 additions and 4 deletions
7
.github/workflows/ci.yml
vendored
7
.github/workflows/ci.yml
vendored
|
@ -20,6 +20,13 @@ jobs:
|
|||
- 1.75.0
|
||||
- 1.76.0
|
||||
- 1.77.2
|
||||
- 1.78.0
|
||||
- 1.79.0
|
||||
- 1.80.0
|
||||
- 1.81.0
|
||||
- 1.82.0
|
||||
- 1.83.0
|
||||
- 1.84.0
|
||||
- stable
|
||||
- beta
|
||||
- nightly
|
||||
|
|
|
@ -22,7 +22,7 @@ benchmark = ["criterion"]
|
|||
|
||||
[dependencies]
|
||||
base64ct = { version = "1.6.0", default-features = false, features = ["std"] }
|
||||
getrandom = { version = "0.2.12", default-features = false }
|
||||
getrandom = { version = "0.3.0", default-features = false }
|
||||
thiserror = { version = "2.0.3", default-features = false }
|
||||
|
||||
# chacha feature:
|
||||
|
|
|
@ -243,7 +243,7 @@ impl InputKeyMaterialList {
|
|||
) -> Result<IkmId> {
|
||||
let ikm_len = scheme.get_ikm_size();
|
||||
let mut content: Vec<u8> = vec![0; ikm_len];
|
||||
getrandom::getrandom(content.as_mut_slice())?;
|
||||
getrandom::fill(content.as_mut_slice())?;
|
||||
self.id_counter += 1;
|
||||
self.ikm_lst.push(InputKeyMaterial {
|
||||
id: self.id_counter,
|
||||
|
|
|
@ -13,7 +13,7 @@ const NONCE_SIZE: usize = 12;
|
|||
|
||||
pub(crate) fn aes128gcm_gen_nonce() -> Result<Vec<u8>> {
|
||||
let mut nonce: [u8; NONCE_SIZE] = [0; NONCE_SIZE];
|
||||
getrandom::getrandom(&mut nonce)?;
|
||||
getrandom::fill(&mut nonce)?;
|
||||
Ok(nonce.to_vec())
|
||||
}
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ const NONCE_SIZE: usize = 24;
|
|||
|
||||
pub(crate) fn xchacha20poly1305_gen_nonce() -> Result<Vec<u8>> {
|
||||
let mut nonce: [u8; NONCE_SIZE] = [0; NONCE_SIZE];
|
||||
getrandom::getrandom(&mut nonce)?;
|
||||
getrandom::fill(&mut nonce)?;
|
||||
Ok(nonce.to_vec())
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue