CryptoSys API examples VB6 to VB.NET

BLF_FileHex

Encrypts or decrypts a file using a specified mode.

VB6/VBA

Debug.Print "Testing BLF_FileHex ..."
Dim nRet As Long

' Encrypt plaintext file to cipher
nRet = BLF_FileHex("bigfile.cbc", "bigfile.dat", _
    "fedcba9876543210fedcba9876543210", ENCRYPT, "CBC", "0123456789abcdef")
Debug.Print nRet

Output

Testing BLF_FileHex ...
 0 

VB.NET

Console.WriteLine("Testing BLF_FileHex ...")
Dim nRet As Integer

' Encrypt plaintext file to cipher
nRet = Blowfish.FileEncrypt("bigfile.cbc", "bigfile.dat", _
    "fedcba9876543210fedcba9876543210", Mode.CBC, "0123456789abcdef")
Console.WriteLine(nRet)

[Contents]

[HOME]   [NEXT: BLF_Hex...]

Copyright © 2009-20 D.I. Management Services Pty Ltd. All rights reserved.