VB.NET Examples

ChilkatHOMEAndroid™ASPVisual BasicVB.NETC#iOS (IPhone)Objective-CC++CMFCDelphiFoxProJavaPerl
PHP ExtensionPHP ActiveXPythonPowerShellRubySQL ServerVBScript

VB.NET Examples

Bounced Mail
Bz2
Character Encoding
CSV
Digital Certificates
Digital Signatures
Email
FTP
HTML Conversion
HTTP
IMAP
Encryption
MHT / HTML Email
POP3
PFX
RSA
S/MIME
SMTP
Socket
Spider
SSH
SSH Tunnel
SSH Key
SFTP
Tar Archive
Upload
XML
XMP
Zip Compression
Misc

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

Byte Array
VB.NET FTPS
System.IO

 

 

 

 

 

 

AES Encrypt a String w/ Hex Encoding Output

Download: Chilkat .NET Assemblies

Demonstrates how to AES encrypt a string and encoding the result as a hexidecimalized string. The padding scheme for this example requires Chilkat Crypt 4.0.0.

        Dim crypt As New Chilkat.Crypt2()
        crypt.UnlockComponent("anything for 30-day trial")

        crypt.CryptAlgorithm = "aes"
        crypt.PaddingScheme = 4     ' Pad with SPACE characters.
        crypt.KeyLength = 128
        crypt.SecretKey = crypt.GenerateSecretKey("password")
        crypt.EncodingMode = "hex"  ' Hex encode the output.

        ' Encrypt a 30-byte string
        Dim encrypted As String
        encrypted = crypt.EncryptStringENC("123456789012345678901234567890")
        MsgBox(Convert.ToString(encrypted.Length) + ", " + encrypted)

        ' Decrypt and unpad by trimming...
        Dim decrypted As String
        decrypted = crypt.DecryptStringENC(encrypted).Trim()
        MsgBox(decrypted)




 

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

Mail Component · XML Parser