Skip to main content

pow_profile_key

Function pow_profile_key 

Source
pub fn pow_profile_key(
    domain: &str,
    target_class: TargetClass,
    vendor: VendorId,
) -> String
Expand description

Build a stable, lower-cased key for the PoW capability store.

The key uses a charon:pow:... namespace so PoW entries never collide with charon:challenge:... (T83) or charon:token_nonce:... (T91) on a shared backing primitive.

ยงExample

use stygian_charon::pow_profile::pow_profile_key;
use stygian_charon::types::TargetClass;
use stygian_charon::vendor_classifier::VendorId;

let key = pow_profile_key("Example.COM", TargetClass::Api, VendorId::Akamai);
assert!(key.starts_with("charon:pow:example.com:api:akamai"));