Parent

Archive::Zip::Codec::TraditionalEncryption

Archive::Zip::Codec::TraditionalEncryption is a handle for the traditional encryption codec.

Attributes

mtime[RW]

The last modified time of the entry to be processed. Set this before calling encryptor or decryptor.

Public Instance Methods

decryptor(io, password, &b) click to toggle source

This method signature is part of the interface contract expected by Archive::Zip::Entry for encryption codec objects.

A convenience method for creating an Archive::Zip::Codec::TraditionalEncryption::Decrypt object using that class' open method.

# File lib/archive/zip/codec/traditional_encryption.rb, line 383
def decryptor(io, password, &b)
  Decrypt.open(io, password, mtime, &b)
end
encryptor(io, password, &b) click to toggle source

This method signature is part of the interface contract expected by Archive::Zip::Entry for encryption codec objects.

A convenience method for creating an Archive::Zip::Codec::TraditionalEncryption::Encrypt object using that class' open method.

# File lib/archive/zip/codec/traditional_encryption.rb, line 373
def encryptor(io, password, &b)
  Encrypt.open(io, password, mtime, &b)
end
general_purpose_flags() click to toggle source

This method signature is part of the interface contract expected by Archive::Zip::Entry for encryption codec objects.

Returns an integer representing the general purpose flags of a ZIP archive entry using this encryption codec.

# File lib/archive/zip/codec/traditional_encryption.rb, line 401
def general_purpose_flags
  0b0000000000000001
end
header_size() click to toggle source

This method signature is part of the interface contract expected by Archive::Zip::Entry for encryption codec objects.

Returns the size of the encryption header in bytes.

# File lib/archive/zip/codec/traditional_encryption.rb, line 409
def header_size
  12
end
version_needed_to_extract() click to toggle source

This method signature is part of the interface contract expected by Archive::Zip::Entry for encryption codec objects.

Returns an integer which indicates the version of the official ZIP specification which introduced support for this encryption codec.

# File lib/archive/zip/codec/traditional_encryption.rb, line 392
def version_needed_to_extract
  0x0014
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.