sql >> Database teknologi >  >> RDS >> Mysql

Ebean manuel dekryptering

Det lykkedes mig at identificere svaret. Til My-SQL

for at dekryptere:

SELECT CAST(AES_DECRYPT(encrypted-field,'my-encryption-key') as CHAR(50)) from table

for at kryptere:

SELECT AES_ENCRYPT(encrypted-field,'my-encryption-key') from table;

For H2:

krypter:

ENCRYPT('AES', STRINGTOUTF8('<encryption-key>'), STRINGTOUTF8('<text to be encrypted>'))

dekryptere:

TRIM(CHAR(0) FROM UTF8TOSTRING(DECRYPT('AES', STRINGTOUTF8('<encryption-key>'), '<text to be encrypted>')))



  1. Datofølge i SQL?

  2. Opret forbindelse til MySql-database gennem xamarin

  3. MySQL LIKE I()?

  4. Sammenligning af Galera Cluster Cloud-tilbud:Anden del af Google Cloud Platform (GCP)