Chilkat HOME ASP Visual Basic VB.NET C# Visual C++ C MFC Delphi FoxPro Java Perl PHP Python Ruby SQL Server VBScript
|
Rijndael String Encryption
Visual Basic sample source code demonstrating Rijndael encryption of strings. Private Sub Command1_Click()
Dim crypt As New ChilkatCrypt2
crypt.UnlockComponent "UnlockCode"
' Use the Rijndael encryption algorithm
crypt.CryptAlgorithm = "rijndael"
' Use 256-bit encryption.
crypt.KeyLength = 256
' Set the password to be "Secret"
crypt.SecretKey = crypt.GenerateSecretKey("Secret")
' Convert Unicode string to iso-8859-1 before encrypting.
crypt.Charset = "iso-8851-1"
' We want the output in string form, so encode it
' using hex. We could also use "base64" here.
crypt.EncodingMode = "hex"
' Encrypt...
Text2.Text = crypt.EncryptStringENC(Text1.Text)
' Decrypt...
Text3.Text = crypt.DecryptStringENC(Text2.Text)
End Sub
|
Need a specific example? Send a request to support@chilkatsoft.com
© 2000-2008 Chilkat Software, Inc. All Rights Reserved.