Ruby Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++CMFCDelphiFoxProJavaPerlPHPPythonRubySQL ServerVBScript



Ruby
Examples

Quick Start
Unicode
Byte Array
Bz2
Certificates
CSV
Email
Encryption
FTP
HTML-to-XML
HTTP
IMAP
MHT
MIME
POP3
RSA
S/MIME
Signatures
SFTP
SMTP
Socket / SSL
Spider
SSH
SSH Key
SSH Tunnel
Tar
HTTP Upload
XML
XMP
Zip

More Examples...
String
Email Object
DKIM / DomainKey
NTLM
FileAccess
RSS
Atom
Self-Extractor
Service
PPMD
Deflate
Bzip2
DH Key Exchange
DSA
LZW

 

 

 

 

 

 

 

Create Password Protected Zip

Ruby script to create a password-protected Zip. (Password protection is the original / older style of Zip encryption. It is not secure. See the example for WinZip compatible AES encryption for instructions on how to create a strong-encrypted zip.)

Download Ruby Programming Example Scripts

# file: ZipPasswordProtected.rb

require 'chilkat'

# Create a password-protected zip.  (Password protection is the old-style
# Zip encryption.  It is somewhat insecure.  It is *not* AES encryption.

zip = Chilkat::CkZip.new()
zip.UnlockComponent("anything for 30-day trial")

zip.put_PasswordProtect(true)
zip.SetPassword("secret")

zip.NewZip("passwordProtected.zip")
zip.AppendFiles("exampleData/*",true)
zip.WriteZip()





 

Need a specific example? Send a request to support@chilkatsoft.com

© 2000-2010 Chilkat Software, Inc. All Rights Reserved.