CryptoSys API Library Manual

Des.FileEncrypt Method (String, String, Byte[], Mode, Byte[], CipherFileOption)

Encrypt a file with advanced options

Syntax

[C#]
public static int FileEncrypt(
	string fileOut,
	string fileIn,
	byte[] key,
	Mode mode,
	byte[] iv,
	CipherFileOption advOptions
)
[VB.NET]
Public Shared Function FileEncrypt ( _
	fileOut As String, _
	fileIn As String, _
	key As Byte(), _
	mode As Mode, _
	iv As Byte(), _
	advOptions As CipherFileOption _
) As Integer

Parameters

fileOut
Name of output file to be created or overwritten
fileIn
Name of input file
key
Key of exactly 8 bytes (64 bits)
mode
Cipher Mode
iv
IV of exactly 8 bytes or null/Nothing for ECB mode
advOptions
Advanced options: see CipherFileOption

Return Value

0 if successful or non-zero error code

Remarks

fileOut and fileIn must not be the same

See Also

VB6/C equivalent: DES_FileExt

[Contents] [Index]

[HOME]   [NEXT: Des.FileDecrypt Method (String, String, Byte, Mode, Byte, CipherFileOption)...]

Copyright © 2001-11 D.I. Management Services Pty Ltd. All rights reserved.