Sha256: 812585934647c9c2f5bb808b4c65d2f6cf45ef2314e369e2ff36d1f5a9a5210f

Contents?: true

Size: 959 Bytes

Versions: 4

Compression:

Stored size: 959 Bytes

Contents

require 'openssl'
openssl_cipher = ::OpenSSL::Cipher.new('aes-128-cbc')
openssl_cipher.encrypt
openssl_cipher.key = '1234567890ABCDEF1234567890ABCDEF'
result = openssl_cipher.update('Hello World')
result << openssl_cipher.final
puts result.unpack('H*')

# jruby 1.7.0.RC1 (1.9.3p203) 2012-09-25 8e849de on Java HotSpot(TM) 64-Bit Server VM 1.6.0_35-b10-428-11M3811 [darwin-x86_64]
#   => 9dc9ebb434bc421326664c038bb4271d
#
# ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]
#   => b597b74f1de1f19a83d901a6fdb40643
#
# ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin12.2.0]
#   => b597b74f1de1f19a83d901a6fdb40643
#
# jruby 1.6.8 (ruby-1.8.7-p357) (2012-09-18 1772b40) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_35) [darwin-x86_64-java]
#   => 9dc9ebb434bc421326664c038bb4271d
#
# jruby 1.6.5 (ruby-1.8.7-p330) (2011-10-25 9dcd388) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_35) [darwin-x86_64-java]
#   => 9dc9ebb434bc421326664c038bb4271d

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
symmetric-encryption-2.0.0 test.rb
symmetric-encryption-1.1.1 test.rb
symmetric-encryption-1.0.0 test.rb
symmetric-encryption-0.9.1 test.rb