apx_core 0.22.0

APx core primitives
Documentation
1
2
3
4
5
6
7
8
9
10
11
use sha2::{Digest, Sha256, Sha512};

/// Computes SHA-256 digest of the given value
pub fn sha256(input: &[u8]) -> [u8; 32] {
    Sha256::digest(input).into()
}

/// Computes SHA-512 digest of the given value
pub(crate) fn sha512(input: &[u8]) -> [u8; 64] {
    Sha512::digest(input).into()
}