Class: Zip::TraditionalDecrypter

Inherits:
Decrypter show all
Includes:
TraditionalEncryption
Defined in:
lib/zip/crypto/traditional_encryption.rb

Instance Method Summary collapse

Methods included from TraditionalEncryption

#gp_flags, #header_bytesize, #initialize

Instance Method Details

#decrypt(data) ⇒ Object


76
77
78
# File 'lib/zip/crypto/traditional_encryption.rb', line 76

def decrypt(data)
  data.unpack('C*').map { |x| decode x }.pack('C*')
end

#reset!(header) ⇒ Object


80
81
82
83
84
85
# File 'lib/zip/crypto/traditional_encryption.rb', line 80

def reset!(header)
  reset_keys!
  header.each_byte do |x|
    decode x
  end
end