D
Diablo
Hi,
I want to encrypt some short text. I've chosen Rijndael algorithm (AES)
for the encryption. The encryption process rounds the lenght of the
input string to a multiple of 16. Then I have to store the cipher
output in a database as string, with a MAXIMUM lenght of 100 chars. To
store the cipher output, I encode it to Base64 and then save it to the
database. But Base64 increases the lenght of the cipher by 33%, and
sometimes the resulting length exceeds 100 chars.
What is the best way of encrypting a string and the store it into a
database with the shortest length possible?
Thanks,
Diablo
I want to encrypt some short text. I've chosen Rijndael algorithm (AES)
for the encryption. The encryption process rounds the lenght of the
input string to a multiple of 16. Then I have to store the cipher
output in a database as string, with a MAXIMUM lenght of 100 chars. To
store the cipher output, I encode it to Base64 and then save it to the
database. But Base64 increases the lenght of the cipher by 33%, and
sometimes the resulting length exceeds 100 chars.
What is the best way of encrypting a string and the store it into a
database with the shortest length possible?
Thanks,
Diablo