I\'m using openssl to encrypt/decrypt strings in PHP:
function str_encryptaesgcm($plaintext, $password, $encoding = null) { $aes = array("key" =>