Chilkat Examples

ChilkatHOMEAndroid™Classic ASPCC++C#Mono C#.NET Core C#C# UWP/WinRTDataFlexDelphi ActiveXDelphi DLLVisual FoxProJavaLianjaMFCObjective-CPerlPHP ActiveXPHP ExtensionPowerBuilderPowerShellPureBasicCkPythonChilkat2-PythonRubySQL ServerSwift 2Swift 3/4TclUnicode CUnicode C++Visual Basic 6.0VB.NETVB.NET UWP/WinRTVBScriptXojo PluginNode.jsExcelGo

Xojo Plugin Examples

Web API Categories

ASN.1
Amazon Glacier
Amazon S3
Amazon S3 (new)
Amazon SES
Amazon SNS
Amazon SQS
Async
Azure Cloud Storage
Azure Service Bus
Base64
Bounced Email
Box
CAdES
CSR
CSV
Certificates
Compression
DKIM / DomainKey
DSA
Diffie-Hellman
Digital Signatures
Dropbox
Dynamics CRM
ECC
Email Object
Encryption
FTP
FileAccess
Firebase
GMail REST API
Geolocation
Google APIs
Google Calendar
Google Cloud Storage
Google Drive
Google Photos
Google Sheets
Google Tasks
Gzip
HTML-to-XML/Text

HTTP
HTTP Misc
IMAP
JSON
JSON Web Encryption (JWE)
JSON Web Signatures (JWS)
JSON Web Token (JWT)
Java KeyStore (JKS)
MHT / HTML Email
MIME
Microsoft Graph
NTLM
OAuth1
OAuth2
OneDrive
OpenSSL
Outlook
PEM
PFX/P12
POP3
PRNG
REST
REST Misc
RSA
SCP
SFTP
SMTP
SSH
SSH Key
SSH Tunnel
SharePoint
Socket/SSL/TLS
Spider
Stream
Tar Archive
Upload
WebSocket
XAdES
XML
XML Digital Signatures
XMP
Zip
curl

 

 

 

(Xojo Plugin) Hash the Contents of a String (SHA256 and other hash algorithms)

Demonstrates how to hash the contents of a string using SHA256, SHA384, SHA512, MD2, MD5, HAVAL, RIPEMD, etc.

Chilkat Xojo Plugin Download

Xojo Plugin for Windows, Linux, Mac OS X, and ARM

//  This example requires the Chilkat Crypt API to have been previously unlocked.
//  See Unlock Chilkat Crypt for sample code.

Dim crypt As New Chilkat.Crypt2

//  Choose the hash algorithm.
//  Can be  "sha1", "sha256", "sha384", "sha512", "md2", "md5", "haval", "ripemd128", "ripemd160","ripemd256", or "ripemd320".
crypt.HashAlgorithm = "sha256"

//  The byte representation of the string matters when hashing.
//  Tell Chilkat that we want to use the utf-8 byte representation.
crypt.Charset = "utf-8"

Dim hashBytes As MemoryBlock
hashBytes = crypt.HashString("They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.")

//  Let's examine the hash as a hex string.
Dim sb As New Chilkat.StringBuilder
success = sb.AppendEncoded(hashBytes,"hex")
System.DebugLog("SHA256 hash = " + sb.GetAsString())

 

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