mirror of
https://github.com/rosenpass/rosenpass.git
synced 2026-02-28 14:33:37 -08:00
chore: Move hashing functions into sodium/ciphers crate
This finishes the last step of removing sodium.rs from the rosenpass crate itself and also removes the NOTHING and NONCE0 constants. Hashing functions now use destination parameters; rosenpass_constant_time::xor now does too.
This commit is contained in:
committed by
Karolin Varner
parent
d44793e07f
commit
09aa0e027e
@@ -21,6 +21,9 @@ path = "../sodium"
|
||||
[dependencies.rosenpass-ciphers]
|
||||
path = "../ciphers"
|
||||
|
||||
[dependencies.rosenpass-to]
|
||||
path = "../to"
|
||||
|
||||
[[bin]]
|
||||
name = "fuzz_handle_msg"
|
||||
path = "fuzz_targets/handle_msg.rs"
|
||||
|
||||
@@ -4,8 +4,8 @@ extern crate rosenpass;
|
||||
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
|
||||
use rosenpass::sodium::mac_into;
|
||||
use rosenpass_sodium::init as sodium_init;
|
||||
use rosenpass_sodium::{hash::blake2b, init as sodium_init};
|
||||
use rosenpass_to::To;
|
||||
|
||||
#[derive(arbitrary::Arbitrary, Debug)]
|
||||
pub struct Blake2b {
|
||||
@@ -18,5 +18,5 @@ fuzz_target!(|input: Blake2b| {
|
||||
|
||||
let mut out = [0u8; 32];
|
||||
|
||||
mac_into(&mut out, &input.key, &input.data).unwrap();
|
||||
blake2b::hash(&input.key, &input.data).to(&mut out).unwrap();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user