Function hmac_sha256
Source pub fn hmac_sha256(key: &[u8], text: &[u8]) -> [u8; 32]
Expand description
Compute HMAC-SHA256
§Arguments
key - The secret key (can be any length)
text - The message to authenticate
§Returns
A 32-byte HMAC-SHA256 value
§Example
use crypto_async_rs::hmac;
let key = b"secret-key";
let message = b"Hello, World!";
let hmac = hmac::hmac_sha256(key, message);