how to input a password for Zip::File

Hello

for this module:
https://www.rubydoc.info/github/rubyzip/rubyzip/Zip/File

for a password protected zipped file, do you know how I can input a
password to unzip it?

Thank you.
Regards.

Quoting Piperみかこ (potthua@gmail.com):

   for this module:
   [1]Class: Zip::File — Documentation for rubyzip/rubyzip (master)
   for a password protected zipped file, do you know how I can input a
   password to unzip it?

The readme file has:

--8<----8<----8<----8<----8<----8<----8<----8<----8<--
### 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 buf

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.
--8<----8<----8<----8<----8<----8<----8<----8<----8<--

The example is for writing a file, but it is said the feature may be
also used for reading. Did you try something like that? I have no
direct example to provide (never needed). You may always opt to
contact the gem authors. There are contacts at the end of the readme
file.

Best

Carlo

···

Subject: how to input a password for Zip::File
  Date: Sun 21 Aug 22 04:24:19PM +0800

--
  * Se la Strada e la sua Virtu' non fossero state messe da parte,
* K * Carlo E. Prelz - fluido@fluido.as che bisogno ci sarebbe
  * di parlare tanto di amore e di rettitudine? (Chuang-Tzu)