playready/crypto/
sha256.rs

1
2
3
4
5
6
7
use sha2::{Digest, Sha256};

pub fn hash(content: &[u8]) -> Vec<u8> {
    let mut hasher = Sha256::new();
    hasher.update(content);
    hasher.finalize().to_vec()
}