Basic docs on encryption

This commit is contained in:
Johnny Shields 2015-01-17 19:38:13 +09:00
parent 721c1f05ed
commit 7aa6b10265
1 changed files with 13 additions and 0 deletions

View File

@ -145,6 +145,19 @@ Zip::File.open('foo.zip') do |zip_file|
end
```
### Password Protection (Experimental)
RubyZip supports reading/writing zip files with traditional zip encryption (a.k.a. "ZipCrypto"). AES encryption is not yet supported. It can be used with buffer streams, e.g.:
```ruby
Zip::OutputStream.write_buffer(::StringIO.new(''), Zip::TraditionalEncrypter.new('password')) do |out|
out.put_next_entry("my_file.txt")
out.write my_data
end.string
```
This is an experimental feature and the interface for encryption may change in future versions.
## Known issues
### Modify docx file with rubyzip