Module Crypt
In: lib/facets/more/crypt.rb

Crypt(3)

Methods

check   crypt   generate_salt  

Constants

ITOA64 = "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"

Public Class methods

check the validity of a password against an hashed string

an pure ruby version of crypt(3), a salted one-way hashing of a password

supported hashing algorithms are: md5, sha1, sha256, sha384, sha512, rmd160

only the md5 hashing algorithm is standard and compatible with crypt(3), the others are not standard.

automatically generate a 8-bytes salt if nil

output a length hashed and salted string with size of magic.size + salt.size + 23

generate a size length random salt

[Validate]