pub fn mask_key(key: &str) -> StringExpand description
Mask an API key for safe display.
Shows the prefix (if identifiable) followed by bullets. Never exposes more than the first 7 characters.
§Example
use spn_core::mask_key;
assert_eq!(mask_key("sk-ant-api03-secret-key"), "sk-ant-••••••••");
assert_eq!(mask_key("ghp_xxxxxxxxxxxxxxxxxxxx"), "ghp_xxx••••••••");
assert_eq!(mask_key("short"), "short••••••••");
assert_eq!(mask_key(""), "••••••••");