CryptoSys API Library Manual

Cipher.FileEncrypt Method

Encrypt a file with block cipher

Syntax

[C#]
public static int FileEncrypt(
	string fileOut,
	string fileIn,
	byte[] key,
	byte[] iv,
	CipherAlgorithm cipherAlg,
	Mode mode,
	Padding pad,
	Cipher.Opts opts
)
[VB.NET]
Public Shared Function FileEncrypt ( _
	fileOut As String, _
	fileIn As String, _
	key As Byte(), _
	iv As Byte(), _
	cipherAlg As CipherAlgorithm, _
	mode As Mode, _
	pad As Padding, _
	opts As Cipher.Opts _
) As Integer

Parameters

fileOut
Name of output file to be created or overwritten
fileIn
Name of input file
key
Key of of exact length for block cipher algorithm
iv
Initialization Vector (IV) of exactly the block size or null for ECB mode
cipherAlg
Type: CipherAlgorithm
Cipher Algorithm
mode
Type: Mode
Cipher Mode
pad
Type: Padding
Padding method to use (ECB and CBC modes only)
opts
Type: Cipher.Opts
Advanced options

Return Value

0 if successful or nonzero error code

Remarks

fileOut and fileIn must not be the same

See Also

VB6/C equivalent: CIPHER_FileEncrypt

[Contents] [Index]

[PREV: Cipher.FileDecrypt Method...]   [Contents]   [Index]   
   [NEXT: Cipher.InitDecrypt Method (Byte, Byte, CipherAlgorithm, Mode)...]

Copyright © 2001-24 D.I. Management Services Pty Ltd. All rights reserved. Generated 2024-01-07T07:42:00Z.