NAME
Crypt::RNCryptor::V3 - Implementation of RNCyrptor v3.
SYNOPSIS
use Crypt::RNCryptor::V3;
# generate password-based encryptor
$cryptor = Crypt::RNCryptor::V3->new(
password => 'secret password',
);
# generate key-based encryptor
$cryptor = Crypt::RNCryptor::V3->new(
encryption_key => '',
hmac_key => '',
);
# encrypt
$ciphertext = $cryptor->encrypt('plaintext');
# decrypt
$plaintext = $cryptor->decrypt($ciphertext);
METHODS
CLASS METHODS
- my $cryptor = Crypt::RNCryptor->new(%opts);
-
Create a cryptor instance.
%opts = ( password => 'any length password', pbkdf2_iterations => DEFAULT_PBKDF2_ITERATIONS, # or encryption_key => '32 length key', hmac_key => '32 length key', );
INSTANCE METHODS
- $ciphertext = $cryptor->encrypt($plaintext)
-
Encrypt plaintext with options.
- $plaintext = $cryptor->decrypt($ciphertext)
-
Decrypt ciphertext with options.
LICENSE
Copyright (C) Shintaro Seki.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
AUTHOR
Shintaro Seki <s2pch.luck@gmail.com>