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

 

 

 

 

 

 

 

SSH Key Fingerprint

Generates a fingerprint for an SSH key.

Download Chilkat Ruby Library

require 'chilkat'


key = Chilkat::CkSshKey.new()

#  Load an SSH key from an encrypted OpenSSH-formatted private key:
key.put_Password("secret")

#  First load the PEM into a string:
keyStr = key.loadText("privkey_openssh_encrypted.pem")

#  Import into the SSH key object:
success = key.FromOpenSshPrivateKey(keyStr)
if (success != true)
    print key.lastErrorText() + "\n"
    exit
end

#  Generate the fingerprint:

fingerprint = key.genFingerprint()

print fingerprint + "\n";

#  A sample fingerpring looks like this:
#  ssh-dss 2048 d0:5f:f7:d6:49:60:7b:50:19:f4:41:59:d4:1f:61:7a


 

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

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