MCPcopy Create free account
hub / github.com/aws/amazon-q-developer-cli / compute_key

Function compute_key

crates/chat-cli/src/mcp_client/oauth_util.rs:559–564  ·  view source on GitHub ↗
(rs: &Url)

Source from the content-addressed store, hash-verified

557}
558
559pub fn compute_key(rs: &Url) -> String {
560 let mut hasher = Sha256::new();
561 let input = format!("{}{}", rs.origin().ascii_serialization(), rs.path());
562 hasher.update(input.as_bytes());
563 format!("{:x}", hasher.finalize())
564}
565
566/// This is our own implementation of [OAuthState::start_authorization].
567/// This differs from [OAuthState::start_authorization] by assigning our own client_id for DCR.

Callers 1

try_buildMethod · 0.85

Calls 2

updateMethod · 0.45
as_bytesMethod · 0.45

Tested by

no test coverage detected