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

 

 

 

 

 

 

Blowfish Encryption Matching Published Test Vectors

Download: Chilkat .NET Assemblies

This VB.NET example program demonstrates how to use Chilkat Crypt2 w/ the blowfish encryption algorithm to match the published test vector results.

' Blowfish encrypt data to get a result that agrees with published test vectors
'        key bytes               clear bytes             cipher bytes
'0000000000000000        0000000000000000        4EF997456198DD78
'0123456789ABCDEF        1111111111111111        61F9C3802281B096
'
' Test vector data located at: http://www.schneier.com/code/vectors.txt
'
' key bytes               ' clear text            ' cipher text
' 0123456789ABCDEF        1111111111111111        61F9C3802281B096
Dim crypt2 As New Chilkat.Crypt2()
crypt2.UnlockComponent("Anything for 30-day trial")
' Use "blowfish2" for the Blowfish algorithm.
crypt2.CryptAlgorithm = "blowfish2"
crypt2.KeyLength = 64
crypt2.PaddingScheme = 3

Dim key As String
key = "0123456789ABCDEF"

Dim clearText As String
clearText = "1111111111111111"

Dim keyBytes As Byte()
keyBytes = crypt2.Decode(key, "hex")
crypt2.SecretKey = keyBytes

Dim clearBytes As Byte()
clearBytes = crypt2.Decode(clearText, "hex")

Dim eBytes As Byte()
eBytes = crypt2.EncryptBytes(clearBytes)

MessageBox.Show(crypt2.Encode(eBytes, "hex"))

 

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

Mail Component · XML Parser