MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / get_signature_key

Method get_signature_key

crates/opencode-provider/src/bedrock.rs:267–272  ·  view source on GitHub ↗
(key: &str, date: &str, region: &str, service: &str)

Source from the content-addressed store, hash-verified

265 }
266
267 fn get_signature_key(key: &str, date: &str, region: &str, service: &str) -> Vec<u8> {
268 let k_date = Self::hmac_sha256(format!("AWS4{}", key).as_bytes(), date.as_bytes());
269 let k_region = Self::hmac_sha256(&k_date, region.as_bytes());
270 let k_service = Self::hmac_sha256(&k_region, service.as_bytes());
271 Self::hmac_sha256(&k_service, b"aws4_request")
272 }
273
274 fn hmac_sha256(key: &[u8], data: &[u8]) -> Vec<u8> {
275 use hmac::{Hmac, Mac};

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected