Sha256: 0c7c7c6af269463191a487c6cab91d4da2d6ebdcf1f27866fbe3f6c40ce2baab
Contents?: true
Size: 297 Bytes
Versions: 10
Compression:
Stored size: 297 Bytes
Contents
class CommunityEngineSha1CryptoMethod def self.encrypt(*tokens) tokens = tokens.flatten password = tokens.shift salt = tokens.shift Digest::SHA1.hexdigest(['', salt, password, ''].join('--')) end def self.matches?(crypted, *tokens) encrypt(*tokens) == crypted end end
Version data entries
10 entries across 10 versions & 1 rubygems