Visual C++ Examples

ChilkatHOMEASPVisual BasicVB.NETC#Visual C++CMFCDelphiFoxProJavaPerlPHPPythonRubySQL ServerVBScript



Visual C++ Examples

CkString
Byte Array
Bounced Mail
Character Encoding
Digital Certificates
Digital Signatures
Email
Encryption
FTP
HTML-to-XML
HTTP
IMAP
MHT / HTML Email
RSA Encryption
S/MIME
Socket
Spider
Tar
Upload
XML
XMP
Zip Compression


More Examples...
Email Object
POP3
SMTP
RSS
Atom
Self-Extractor

Unreleased...
Service
PPMD
Deflate
Bzip2
LZW
Bz2
DH Key Exchange
DSA
Icon

 

 

 

 

 

 

 

 

HAVAL Hash to Hexidecimalized String

This sample program demonstrates how to HAVAL hash a string.

// The Chilkat Encryption library is also available as an ActiveX component
// or .NET class with the identical set of methods and properties.

// HAVAL hash a string.
void CryptExample(void)
    {
    CkCrypt2 crypt;
    
    // Any string passed to UnlockComponent automatically begins the 30-day trial.
    crypt.UnlockComponent("30-day trial");

    // Use the HAVAL hash algorithm.
    // Other hash algorithms: md5, md2, sha-1 (sha-256), sha-384, sha-512
    crypt.put_HashAlgorithm("haval");
    
    // Set the output string encoding to "hex"
    // Other encoding modes: base64, url, quoted-printable
    crypt.put_EncodingMode("hex");

    CkString strHash;
    crypt.HashStringENC("Hash this string",strHash);

    printf("Hexidecimalized hash string: %s\n",strHash.getString());

    // PRINTS:
    // Hexidecimalized hash string: 1150EBF0AEBADBEB9B592E7D169135AF


 

 

 

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

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

Mail Component · .NET Mail Component · XML Parser