Module: EncryptedZip
- Defined in:
- lib/encryptedzip.rb,
lib/encryptedzip/version.rb
Constant Summary collapse
- VERSION =
"0.0.1"
Class Attribute Summary collapse
-
.encrypted_filepath ⇒ Object
writeonly
Sets the attribute encrypted_filepath.
-
.password_path ⇒ Object
writeonly
Sets the attribute password_path.
-
.public_key_file ⇒ Object
Returns the value of attribute public_key_file.
Class Method Summary collapse
Class Attribute Details
.encrypted_filepath=(value) ⇒ Object
Sets the attribute encrypted_filepath
9 10 11 |
# File 'lib/encryptedzip.rb', line 9 def encrypted_filepath=(value) @encrypted_filepath = value end |
.password_path=(value) ⇒ Object
Sets the attribute password_path
9 10 11 |
# File 'lib/encryptedzip.rb', line 9 def password_path=(value) @password_path = value end |
.public_key_file ⇒ Object
Returns the value of attribute public_key_file.
9 10 11 |
# File 'lib/encryptedzip.rb', line 9 def public_key_file @public_key_file end |
Class Method Details
.create_encrypted_zip(options = {}) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/encryptedzip.rb', line 12 def self.create_encrypted_zip(={}) check_errors() password = generate_password create_password_file(password) create_zip(encrypted_filepath, [:files]) Zip::Archive.encrypt(encrypted_filepath, password) create_zip([:output_filepath], [password_path, encrypted_filepath]) clean_up [:output_filepath] end |