1. Genki Sugawara
  2. Zip/Ruby
  3. Issues
Issue #3 new

encryption is a no-op

Anonymous created an issue

In the following script, encryption doesn't do anything at all:

{{{

!ruby

require 'zipruby' require 'base64'

buf = Zip::Archive.open_buffer(Zip::CREATE) do |ar| ar.add_buffer('bar.txt', 'zoo'); end

h1 = buf.hash puts Base64.encode64(buf)

Zip::Archive.open_buffer(buf) do |ar| ar.encrypt("foo") end

h2 = buf.hash puts Base64.encode64(buf)

puts "encrypted: #{h1 != h2}" }}}

Comments (0)

  1. Log in to comment