class Argon2::Password
def create(pass)
def create(pass) raise ArgonHashFail, "Invalid password (expected string)" unless pass.is_a?(String) # Ensure salt is freshly generated unless it was intentionally supplied. salt = @salt_do_not_supply || Engine.saltgen Argon2::Engine.hash_argon2id_encode( pass, salt, @t_cost, @m_cost, @p_cost, @secret) end