<<

NAME

Koha::AuthUtils - utility routines for authentication

SYNOPSIS

    use Koha::AuthUtils qw/hash_password/;
    my $hash = hash_password($password);

DESCRIPTION

This module provides utility functions related to managing user passwords.

FUNCTIONS

hash_password

    my $hash = Koha::AuthUtils::hash_password($password, $settings);

generate_salt

    my $salt = Koha::Auth::generate_salt($strength, $length);
strength

For general password salting a $strength of weak is recommend, For generating a server-salt a $strength of strong is recommended

'strong' uses /dev/random which may block until sufficient entropy is acheived. 'weak' uses /dev/urandom and is non-blocking.

length

$length is a positive integer which specifies the desired length of the returned string

SEE ALSO

Crypt::Eksblowfish::Bcrypt(3)

<<