module Argon2::Engine

Defined in:

engine.cr

Class Method Summary

Class Method Detail

def self.argon2d_verify(password : String, encoded_string : String) #

Verifies a password using Argon2d against an encoded string @param password string @param encoded string (output from has_argon2d_encode) Returns ARGON2_OK if successful


[View source]
def self.argon2i_verify(password : String, encoded_string : String) #

Verifies a password using Argon2i against an encoded string @param password string @param encoded string (output from has_argon2i_encode) Returns ARGON2_OK if successful


[View source]
def self.argon2id_verify(password : String, encoded_string : String) #

Verifies a password using Argon2id against an encoded string @param password string @param encoded string (output from has_argon2id_encode) Returns ARGON2_OK if successful


[View source]
def self.encoded_hash(engine_type : EngineType, password : String, salt : String, t_cost : Int32, m_cost : Int32) #

[View source]
def self.encoded_verify(engine_type : EngineType, password : String, encoded_string : String) #

[View source]
def self.generate_salt(salt_size = DEFAULT_SALT_LEN) #

Generate a random hex salt string - defaults to default length recommended by the argon2 spec


[View source]
def self.hash_argon2d_encode(password : String, salt : String, t_cost : Int32, m_cost : Int32) #

Hashes a password with Argon2d, producing an encoded hash @param password string @param salt string @param t_cost Number of iterations @param m_cost Sets memory usage to m_cost kibibytes


[View source]
def self.hash_argon2d_raw(password : String, salt : String, t_cost : Int32, m_cost : Int32) #

Hashes a password with Argon2d, producing a raw hash @param password string @param salt string @param t_cost Number of iterations @param m_cost Sets memory usage to m_cost kibibytes


[View source]
def self.hash_argon2i_encode(password : String, salt : String, t_cost : Int32, m_cost : Int32) #

Hashes a password with Argon2i, producing an encoded hash @param password string @param salt string @param t_cost Number of iterations @param m_cost Sets memory usage to m_cost kibibytes


[View source]
def self.hash_argon2i_raw(password : String, salt : String, t_cost : Int32, m_cost : Int32) #

Hashes a password with Argon2i, producing a raw hash @param password string @param salt string @param t_cost Number of iterations @param m_cost Sets memory usage to m_cost kibibytes


[View source]
def self.hash_argon2id_encode(password : String, salt : String, t_cost : Int32, m_cost : Int32) #

Hashes a password with Argon2id, producing an encoded hash @param password string @param salt string @param t_cost Number of iterations @param m_cost Sets memory usage to m_cost kibibytes


[View source]
def self.hash_argon2id_raw(password : String, salt : String, t_cost : Int32, m_cost : Int32) #

Hashes a password with Argon2id, producing a raw hash @param password string @param salt string @param t_cost Number of iterations @param m_cost Sets memory usage to m_cost kibibytes


[View source]
def self.raw_hash(engine_type : EngineType, password : String, salt : String, t_cost : Int32, m_cost : Int32) #

[View source]
def self.raw_hash_buffer(engine_type : EngineType, password : String, salt : String, t_cost : Int32, m_cost : Int32, out_len : Int32 = OUT_LEN) #

[View source]