chore: add link to SHA256 article (#16129)

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
Afounso Souza
2025-05-08 21:39:31 +02:00
committed by GitHub
parent 124bd39405
commit a3c067c2b2

View File

@@ -4,7 +4,7 @@ use alloy_primitives::B256;
use hmac::{Hmac, Mac};
use sha2::{Digest, Sha256};
/// Hashes the input data with SHA256.
/// Hashes the input data with SHA256 - <https://en.wikipedia.org/wiki/SHA-2>
pub(crate) fn sha256(data: &[u8]) -> B256 {
B256::from(Sha256::digest(data).as_ref())
}