Module bcrypt_pool

Implementation of gen_server behaviour.

Copyright © 2011 Hunter Morris

Behaviours: gen_server.

Description

Implementation of gen_server behaviour.

Function Index

available/1Asynchronously check if Pid in #state:requests queue or not.
gen_salt/0Generate a random text salt.
gen_salt/1Generate a random text salt.
hashpw/2Hash the specified password and the salt.
is_worker_available/0Is at least one bcrypt worker currently available for work?.
start_link/0Creates a gen_server process as part of a supervision tree.

Function Details

available/1

available(Pid) -> Result

Asynchronously check if Pid in #state:requests queue or not.

gen_salt/0

gen_salt() -> Result

Generate a random text salt.

gen_salt/1

gen_salt(Rounds) -> Result

Generate a random text salt. Rounds defines the complexity of the hashing, increasing the cost as 2^log_rounds.

hashpw/2

hashpw(Password, Salt) -> any()

Hash the specified password and the salt.

is_worker_available/0

is_worker_available() -> Result

Is at least one bcrypt worker currently available for work?

start_link/0

start_link() -> Result

Creates a gen_server process as part of a supervision tree.


Generated by EDoc