MCPcopy Index your code
hub / github.com/ChrisFeldmeier/OpenCodeRust / hmac_sha256

Method hmac_sha256

crates/opencode-provider/src/bedrock.rs:274–281  ·  view source on GitHub ↗
(key: &[u8], data: &[u8])

Source from the content-addressed store, hash-verified

272 }
273
274 fn hmac_sha256(key: &[u8], data: &[u8]) -> Vec<u8> {
275 use hmac::{Hmac, Mac};
276 use sha2::Sha256;
277
278 let mut mac = Hmac::<Sha256>::new_from_slice(key).unwrap();
279 mac.update(data);
280 mac.finalize().into_bytes().to_vec()
281 }
282}
283
284fn sha256(data: &[u8]) -> Vec<u8> {

Callers

nothing calls this directly

Calls 2

finalizeMethod · 0.80
updateMethod · 0.45

Tested by

no test coverage detected