Koha::Encryption - Koha class to encrypt or decrypt strings
use Koha::Encryption; my $secret = Koha::AuthUtils::generate_salt( 'weak', 16 ); my $crypt = Koha::Encryption->new; my $encrypted = $crypt->encrypt_hex($secret); my $decrypted = $crypt->decrypt_hex($encrypted); return 1 if $decrypted eq $secret;
It's based on Crypt::CBC
my $cipher = Koha::Encryption->new; Constructor. Uses encryption_key from koha-conf.xml.