Sha256: 780c37b64edacef72c989bc97dd7c007be599c04fb843115c1a64932bdc52ba3
Contents?: true
Size: 301 Bytes
Versions: 13
Compression:
Stored size: 301 Bytes
Contents
# salted crypt require 'base64' require 'digest' class Trocla::Formats::Ssha < Trocla::Formats::Base def format(plain_password,options={}) salt = options['salt'] || Trocla::Util.salt(16) "{SSHA}"+Base64.encode64("#{Digest::SHA1.digest("#{plain_password}#{salt}")}#{salt}").chomp end end
Version data entries
13 entries across 13 versions & 2 rubygems