App::Raps2::Password - Password class for App::Raps2
use App::Raps2::Password; my $pass = App::Raps2::Password->new( passphrase => 'secret', ); my $oneway_hash = $raps2->bcrypt(); $raps2->verify($oneway_hash); my $twoway_hash = $raps2->encrypt('data'); print $raps2->decrypt($twoway_hash); # "data"
This manual documents App::Raps2::Password version 0.54
App::Raps2::Pasword is a wrapper around Crypt::Eksblowfish.
Creates a new App::Raps2::Password object. You can only have one passphrase per object. Arguments:
Cost to pass to Crypt::Eksblowfish, defaults to 12.
Passphrase to operate with. Mandatory.
16-byte string to use as salt. If none is specified, App::Raps2::Password generates its own.
Returns a new 16-byte salt. Contains only printable characters.
Returns the currently used salt and optionally changes it to salt.
Encrypts data with the passphrase saved in the object, returns the corresponding hexadecimal hash (as string).
By default, the salt set in salt or new will be used. You can override it by specifying salt.
Decrypts hexstr (as created by encrypt), returns its original content.
Return a base64 bcrypt hash of the password, salted with the salt.
Verify a hash as returned by crypt.
Returns true if it matches, dies if it doesn't.
When anything goes wrong, App::Raps2::Password will use Carp(3pm)'s confess method to die with a backtrace.
Crypt::CBC(3pm), Crypt::Eksblowfish(3pm).
Unknown.
Copyright (C) 2011-2015 by Daniel Friesel <derf@finalrewind.org>
0. You just DO WHAT THE FUCK YOU WANT TO.
To install App::Raps2, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::Raps2
CPAN shell
perl -MCPAN -e shell install App::Raps2
For more information on module installation, please visit the detailed CPAN module installation guide.