Debian Codegraph @

plugin/world/blowfish_ecb/test/cipher_test.rb

raw symbols SCIP
1 require 'test/unit'
2 require 'blowfish_ecb'
3
4 class CipherTest < Test::Unit::TestCase
5 def test_identity
6 cipher = Blowfish::ECB::Cipher.new('cipher_test')
7 ['hogefugahige', '1234567890', (1..255).to_a.pack('C*'), '', '1'].each do |data|
8 assert_equal(data, cipher.decrypt(cipher.encrypt(data)), "Failed at #{data}")
9 end
10 end
11 end