MySQL tutorial: ASYMMETRIC_DECRYPT [EN]
top of page
CerebroSQL

MySQL: 

ASYMMETRIC_DECRYPT

Syntax:
asymmetric_decrypt(algorithm, crypt_str, key_str)

Decrypts an encrypted string using the given algorithm and key string,
and returns the resulting plaintext as a binary string. If decryption
fails, the result is NULL.

key_str must be a valid key string in PEM format. For successful
decryption, it must be the public or private key string corresponding
to the private or public key string used with asymmetric_encrypt() to
produce the encrypted string. algorithm indicates the encryption
algorithm used to create the key.

Supported algorithm values: 'RSA'

For a usage example, see the description of asymmetric_encrypt().

Example

bottom of page