lib/garcon/core_ext/string.rb
# Common Unix cryptography method.
# This adds a default salt to the built-in crypt method.
#
Common Unix cryptography method.
This adds a default salt to the built-in crypt method.
Common Unix cryptography method . This adds a default salt to the built - in crypt method .
def crypt(salt=nil)
    salt ||= ((SecureRandom.random_number(26) +
              (SecureRandom.random_number(2) == 0 ? 65 : 97)).chr +
              (SecureRandom.random_number(26) +
              (SecureRandom.random_number(2) == 0 ? 65 : 97)).chr)
    _crypt(salt)
  end
def crypt ( salt = nil ) salt ||= ( ( SecureRandom . random_number ( 26 ) + ( SecureRandom . random_number ( 2 ) == 0 ? 65 : 97 ) ) . chr + ( SecureRandom . random_number ( 26 ) + ( SecureRandom . random_number ( 2 ) == 0 ? 65 : 97 ) ) . chr ) _crypt ( salt ) end
Common Unix cryptography method.
Common Unix cryptography method .
salt
<not_specific>