MCPcopy Create free account
hub / github.com/DNSCrypt/encrypted-dns-server / sha256

Function sha256

src/pq.rs:49–55  ·  view source on GitHub ↗
(data: &[u8])

Source from the content-addressed store, hash-verified

47}
48
49pub fn sha256(data: &[u8]) -> [u8; 32] {
50 let mut out = [0u8; 32];
51 unsafe {
52 crypto_hash_sha256(out.as_mut_ptr(), data.as_ptr(), data.len() as _);
53 }
54 out
55}
56
57pub fn hkdf_sha256(salt: &[u8], ikm: &[u8], info: &[u8], out: &mut [u8]) {
58 let mut prk = [0u8; crypto_kdf_hkdf_sha256_KEYBYTES as usize];

Callers 4

resumed_shared_keyFunction · 0.85
deriveMethod · 0.85
appendix3_vectorsFunction · 0.85
deriveMethod · 0.85

Calls

no outgoing calls

Tested by 1

appendix3_vectorsFunction · 0.68