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
Blowfish String Encryption
Visual Basic sample source code demonstrating Blowfish encryption of strings. Private Sub Command1_Click()
Dim crypt As New ChilkatCrypt2
crypt.UnlockComponent "UnlockCode"
' Use the Blowfish encryption algorithm
crypt.CryptAlgorithm = "blowfish2"
' 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 base64. We could also use "hex" here.
crypt.EncodingMode = "base64"
' Encrypt...
Text2.Text = crypt.EncryptStringENC(Text1.Text)
' Decrypt...
Text3.Text = crypt.DecryptStringENC(Text2.Text)
End Sub
|
© 2000-2012 Chilkat Software, Inc. All Rights Reserved.