diff --git a/lib/krypt/pkcs5/pbkdf2.rb b/lib/krypt/pkcs5/pbkdf2.rb index fc0efbe..354268f 100644 --- a/lib/krypt/pkcs5/pbkdf2.rb +++ b/lib/krypt/pkcs5/pbkdf2.rb @@ -12,6 +12,7 @@ def initialize(digest) def generate(pwd, salt, iter, outlen) raise "outlen too large" if outlen > MAX_FACTOR * @block_size + @digest.reset num_blocks = (outlen.to_f / @block_size).ceil # enforces ASCII-8BIT String.new.tap do |result|