Class: Archive::Zip::Codec::TraditionalEncryption::Base
- Inherits:
-
Object
- Object
- Archive::Zip::Codec::TraditionalEncryption::Base
- Defined in:
- lib/archive/zip/codec/traditional_encryption.rb
Overview
Archive::Zip::Codec::TraditionalEncryption::Base provides some basic methods which are shared between Archive::Zip::Codec::TraditionalEncryption::Encrypt and Archive::Zip::Codec::TraditionalEncryption::Decrypt.
Do not use this class directly.
Instance Method Summary collapse
-
#initialize(io, password, mtime) ⇒ Base
constructor
Creates a new instance of this class.
Constructor Details
#initialize(io, password, mtime) ⇒ Base
Creates a new instance of this class. io must be an IO-like object to be used as a delegate for IO operations. password should be the encryption key. mtime must be the last modified time of the entry to be encrypted/decrypted.
24 25 26 27 28 29 |
# File 'lib/archive/zip/codec/traditional_encryption.rb', line 24 def initialize(io, password, mtime) @io = io @password = password.nil? ? '' : password @mtime = mtime initialize_keys end |