Make sure the data field accepts special charaters like char() not varchar()
Encrypt:
INSERT INTO tableName (fieldName)
VALUES (AES_ENCRYPT('dataGoesHere','ThePasswordGoesHere'));
Decrypt:
SELECT aes_decrypt(fieldName,'ThePasswordGoesHere')
FROM tableName;
No comments:
Post a Comment