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

Version Path
community_engine-3.2.0 lib/community_engine/community_engine_sha1_crypto_method.rb
community_engine-3.0.0 lib/community_engine/community_engine_sha1_crypto_method.rb
community_engine-2.3.2 lib/community_engine/community_engine_sha1_crypto_method.rb
community_engine-2.3.1 lib/community_engine/community_engine_sha1_crypto_method.rb
community_engine-2.3.0 lib/community_engine/community_engine_sha1_crypto_method.rb
community_engine-2.1.0 lib/community_engine/community_engine_sha1_crypto_method.rb
community_engine-2.0.0 lib/community_engine/community_engine_sha1_crypto_method.rb
community_engine-2.0.0.beta3 lib/community_engine/community_engine_sha1_crypto_method.rb
community_engine-2.0.0.beta2 lib/community_engine/community_engine_sha1_crypto_method.rb
community_engine-2.0.0.beta1 lib/community_engine/community_engine_sha1_crypto_method.rb