Encrypting Data
An overview of the encryption and data security features offered by the Vortex Crypto API. It highlights how the API ensures data integrity, authenticity, and controlled visibility through its encryption, hashing, and masking mechanisms
Encrypting Data
This page provides a detailed overview of the encryption and data security features offered by the Vortex Crypto API. It highlights how the API ensures data integrity, authenticity, and controlled visibility through its encryption, hashing, and masking mechanisms.
In this guide you'll find:
- Understand how the API encrypts data and returns key components like encrypted objects, hash values, and masking details.
- Learn about the masking algorithm that balances security and partial data visibility based on string length.
- Review an example encryption response, including encoded data, hash values, and masking output, to understand the API's implementation.
Masking Algorithm
The masking algorithm enhances security by revealing only a portion of the encrypted string, based on its length:
- For strings of 9 or more characters: the last 4 characters are visible.
- For strings of 5 to 8 characters: the last 2 characters are visible.
- For strings shorter than 5 characters: no characters are visible.
This approach strikes a balance between security and controlled visibility.
Encryption Example
When encrypting data using the Vortex Crypto API, the response includes:
- Encrypted data: Base64 encoded string of the encrypted input.
- Hash: HMAC hash ensures data integrity.
- Mask: Partial visibility of the encrypted string, as defined by the masking algorithm.
Encryption Response Example:
{
"data": {
"key": 1234567,
"iv": null,
"data": "c29tZSBlbmNyeXB0ZWQgZGF0YQ==",
"encoding": "utf8"
},
"hash": "c29tZSBoYXNoIHZhbHVl",
"mask": "1234"
}In this example:
datacontains the base64 encoded string of the encrypted input.keyandivare encryption components;ivmay be null depending on the method.hashensures data integrity through HMAC hashing.maskprovides limited visibility of the encrypted string's end, per the masking algorithm.
Updated 7 months ago
