Tink-Rust: Pseudo-Random Functions

Docs MSRV

This crate provides pseudo-random function (PRF) functionality, as described in the upstream Tink documentation.

Usage

```Rust fn main() -> Result<(), Box> { tinkprf::init(); let kh = tinkcore::keyset::Handle::new(&tinkprf::hmacsha256prfkeytemplate())?; let m = tinkprf::Set::new(&kh)?;

let pt = b"need pseudo-random data deterministically produced from this input";
let out = m.compute_primary_prf(pt, 16)?;
println!("'{}' => {}", String::from_utf8_lossy(pt), hex::encode(&out));
assert_eq!(out.len(), 16);
Ok(())

} ```

License

Apache License, Version 2.0

Disclaimer

This is not an officially supported Google product.