Mask with a Specific Token and Format
This method masks data based on default token types and formats.
The ProtectoVault object is instantiated with your tokenization key.
The function takes a list of values as input, intending to mask them using the default token and Format.
Learn more by checking out the section on Supporting Token and Format Types.
Note:
To obtain the <auth token>
, please refer to the Step-by-Step Guide to Obtain Your Auth Token.
Code Snippet
# 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 and format
result = obj.mask(["(555) 123-4567"], "Numeric Token", "Phone Number")
# Print the masked result
print(result)
Result
{
"data": [
{
"value": "(555) 123-4567",
"token_value": "(191004182137) 354826618175-127882693655",
"token_name": "Numeric Token",
"format": "Phone Number"
}
],
"success": true,
"error": {
"message": ""
}
}
For more comprehensive information about our product, kindly reach out to us through our website at https://www.protecto.ai/.
Last updated