Podařilo se mi identifikovat odpověď. Pro My-SQL
k dešifrování:
SELECT CAST(AES_DECRYPT(encrypted-field,'my-encryption-key') as CHAR(50)) from table
k šifrování:
SELECT AES_ENCRYPT(encrypted-field,'my-encryption-key') from table;
Pro H2:
zašifrovat:
ENCRYPT('AES', STRINGTOUTF8('<encryption-key>'), STRINGTOUTF8('<text to be encrypted>'))
dešifrovat:
TRIM(CHAR(0) FROM UTF8TOSTRING(DECRYPT('AES', STRINGTOUTF8('<encryption-key>'), '<text to be encrypted>')))