Chilkat
HOME
Android™
ASP
Visual Basic
VB.NET
C#
iOS (IPhone)
Objective-C
C++
C
MFC
Delphi
FoxPro
Java
Perl
PHP Extension
PHP ActiveX
Python
PowerShell
Ruby
SQL Server
VBScript
AES Encrypt a String w/ Hex Encoding OutputDownload: 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.