Chilkat Examples

ChilkatHOMEAndroid™Classic ASPCC++C#C# UWP/WinRTDataFlexDelphi ActiveXDelphi DLLVisual FoxProJavaLianjaMFCObjective-CPerlPHP ActiveXPHP ExtensionPowerBuilderPowerShellPureBasicPythonRubySQL ServerSwiftTclUnicode CUnicode C++Visual Basic 6.0VB.NETVB.NET UWP/WinRTVBScriptXojo PluginNode.js

Ruby Examples

Async
Certificates
ECC
Email Object
Encryption
FTP
HTML-to-XML/Text
Gzip
HTTP
IMAP
JSON
Jwt
MHT / HTML Email
PEM
PFX/P12
Java KeyStore (JKS)
POP3
RSA Encryption
MIME
REST
SCP
SMTP
Socket/SSL/TLS
SSH Key
SSH
SSH Tunnel
SFTP
Stream
Tar Archive
XML
XMP
Zip

More Examples...
OpenSSL
Google APIs
Google Cloud Storage
Azure Cloud Storage
Amazon S3 (new)
Google Drive
Dropbox
Firebase
ASN.1
PRNG
Amazon S3
Bounced Email
CSV
Diffie-Hellman
DKIM / DomainKey
DSA
NTLM
QuickBooks
Spider
Digital Signatures

 

 

 

 

 

 

 

(Ruby) MD5 Hash a String

MD5 hash a string.

Chilkat Ruby Downloads

Ruby Library for Linux and MAC OS X

require 'chilkat'

crypt = Chilkat::CkCrypt2.new()

#  Any string argument automatically begins the 30-day trial.
success = crypt.UnlockComponent("30-day trial")
if (success != true)
    print crypt.lastErrorText() + "\n";
    exit
end

content = "The quick brown fox jumps over the lazy dog"

#  The desired output is a hexidecimal string:
crypt.put_EncodingMode("hex")

#  Set the hash algorithm:
crypt.put_HashAlgorithm("md5")

hashStr = crypt.hashStringENC(content)

print hashStr + "\n";

#  The output is:
#  9E107D9D372BB6826BD81D3542A419D6

 

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