Created
February 16, 2017 18:01
-
-
Save litvil/47e2bfdb3181332383b9260efa17f4be to your computer and use it in GitHub Desktop.
AES encryption
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| AES is a block-level algorithm. So when data encrypted it is padded. So you can calculate the length of the result string using this formula: | |
| 1 | |
| 16 × (trunc(string_length / 16) + 1) | |
| So if your address field structure is = VARCHAR(100) ; //100 length of varchar | |
| Then before your encryption it should be converted | |
| = 16 * (trunc(100/ 16) + 1) | |
| = 16 * (6.25 + 1) | |
| = 16 * 7.25 | |
| = 116 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment