Function psa_crypto::operations::hash::hash_compute [−][src]
Expand description
Calculate hash of a message
Example
use psa_crypto::operations::hash::hash_compute;
use psa_crypto::types::algorithm::Hash;
psa_crypto::init().unwrap();
let hash_alg = Hash::Sha256;
let mut hash = vec![0; hash_alg.hash_length()];
let size = hash_compute(hash_alg,
&MESSAGE,
&mut hash).unwrap();