From: roob noob Date: 2012-05-17T08:09:56+09:00 Subject: Re: what is going wrong here? The case of the noob not understanding initialize okay the problem is that .reset is not actually reseting the ciphers state as shown here: require 'openssl' message = "whatever" sha256 = OpenSSL::Digest::SHA256.new cipher = OpenSSL::Cipher::Cipher.new("AES-256-CTR") 2.times do key = @sha256.digest("whatever") @sha256.reset @cipher.encrypt @cipher.key = key ciphertext = @cipher.update(@message) ciphertext << @cipher.final @cipher.reset puts ciphertext end #> �a�xtT�� #> 9]K���/ would love if someone can confirm this bug and please get it fixed ASAP thanks :) -- Posted via http://www.ruby-forum.com/.