Function py_mask_api_key
Source pub fn py_mask_api_key(api_key: String) -> String
Expand description
Masks an API key by showing only the first and last 4 characters.
For keys 8 characters or shorter, returns asterisks only.
§Parameters
api_key : str
The API key to mask.
§Returns
str
§Examples
mask_api_key(“abcdefghijklmnop”)
‘abcd…mnop’
mask_api_key(“short”)
‘*****’