Sha256: d4036b1829c30025d5d795732d81ad32517fe0c25b7e8beaf03f32128c6a5b10

Contents?: true

Size: 306 Bytes

Versions: 10

Compression:

Stored size: 306 Bytes

Contents

require "ezcrypto"

class AES128CryptoProvider
  class << self
    def encrypt(term)
      [key.encrypt(term)].pack("m").chomp
    end
    
    def decrypt(term)
      key.decrypt(term.unpack("m").first)
    end
    
    def key
      EzCrypto::Key.with_password "master_key", "some_salt"
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
authlogic-1.0.0 test_libs/aes128_crypto_provider.rb
authlogic-1.1.1 test/libs/aes128_crypto_provider.rb
authlogic-1.1.2 test/libs/aes128_crypto_provider.rb
authlogic-1.2.0 test/libs/aes128_crypto_provider.rb
authlogic-1.2.2 test/libs/aes128_crypto_provider.rb
authlogic-1.3.0 test/libs/aes128_crypto_provider.rb
authlogic-1.3.1 test/libs/aes128_crypto_provider.rb
authlogic-1.2.1 test/libs/aes128_crypto_provider.rb
authlogic-1.1.0 test/libs/aes128_crypto_provider.rb
authlogic-1.3.2 test/libs/aes128_crypto_provider.rb