mysql encryption algorithm

AES_ENCRYPT(str,key) 

 Returns the key with the key results using Advanced Encryption Standard encryption algorithms string str, call AES_ENCRYPT result is a binary string, the type of a BLOB storage
AES_DECRYPT (str, key) returns with key KEY advanced use of string str after encryption standard algorithm decryption result
DECODE (str, key) used as the encryption key to decrypt the encrypted string STR
the eNCRYPT (STR, Salt) using UnixCrypt () function, (a character string can be determined only by the keyword Salt password, to like key) encrypted string str
the ENCODE (str, key) used as the key encryption key string str, calling the ENCODE () the result is a binary string, it is stored BLOB type
MD5 () calculated MD5 string str checksum
pASSWORD (str) returns the string str encrypted version of the encryption process is irreversible, and UNIX password encryption process uses a different algorithm.
The SHA () calculated string str Secure Hash Algorithm (SHA) checksum
Example:
the SELECT the ENCRYPT ( 'the root', 'Salt');
the SELECT the ENCODE ( 'Xufeng', 'Key');
the SELECT the DECODE (the ENCODE ( ' xufeng ',' key '), ' key '); # decryption together
the SELECT AES_ENCRYPT (' the root ',' Key ');
the SELECT AES_DECRYPT (AES_ENCRYPT ('
SELECT MD5('123456');
SELECT SHA('123456');

Guess you like

Origin www.cnblogs.com/Damocless/p/11993188.html