Sha256: 0b3e99969bcce73c332bc6d393c38c91692cb99a6f57add74b39b2656e91c590
Contents?: true
Size: 610 Bytes
Versions: 5
Compression:
Stored size: 610 Bytes
Contents
require 'helper' class TestDeviseAesEncryptable < Test::Unit::TestCase should "be accessible" do encryptor = :aes256 assert ::Devise::Encryptors.const_get(encryptor.to_s.classify) end should "encrypt and decrypt a password" do plain_text = "A super secret password" pepper = "eaa15a1fb0b0707ba443f7ce52a5a0e345391ff83b9955342d2a8e1c755fcd868ba4fb3c156166e13c9d4080cf2b505b4a383adc553c9567d75e3585cbccff98" cipher_text = Devise::Encryptors::Aes256.digest(plain_text, 0, nil, pepper) assert_equal plain_text, Devise::Encryptors::Aes256.decrypt(cipher_text, pepper) end end
Version data entries
5 entries across 5 versions & 1 rubygems