Mask with a Specific Token
With this approach, data is masked according to default token types (Text token, Special Token, Numeric Token).
# Import the ProtectoVault class from the protecto_ai module
from protecto_ai import ProtectoVault
# Create an instance of ProtectoVault with your authentication token
obj = ProtectoVault("<auth_token>")
# pass list of sensitive information as an input for the mask method.Provide default token type.
result = obj.mask(["Mark","Australia"], "Text Token")
# Print the masked result
print(result){
"data": [
{
"value": "Australia",
"token_value": "1AN9X4Doab",
"token_name": "Text Token"
},
{
"value": "Mark",
"token_value": "7FHnu7Uo2O",
"token_name": "Text Token"
}
],
"success": true,
"error": {
"message": ""
}
} Last updated