CryptoSys PKI Pro Manual

Cipher.FileDecrypt Method (String, String, Byte[], Byte[], CipherAlgorithm, Mode, Padding, Cipher.Opts)

Decrypt a file.

Syntax

[C#]
public static int FileDecrypt(
	string fileOut,
	string fileIn,
	byte[] key,
	byte[] iv,
	CipherAlgorithm cipherAlg,
	Mode mode,
	Padding pad,
	Cipher.Opts opts
)
[VB.NET]
Public Shared Function FileDecrypt ( _
	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 or if IV is prefixed.
cipherAlg
Type: CipherAlgorithm
Cipher Algorithm
mode
Type: Mode
Cipher Mode
pad
Type: Padding
Padding method to use (optional, ECB and CBC modes only, default=Pkcs5)
opts
Type: Cipher.Opts
Advanced options. Use Cipher.Opts.PrefixIV to expect the IV to be prepended to the input.

Return Value

0 if successful or non-zero error code

Remarks

fileOut and fileIn must not be the same

See Also

VB6/C equivalent: CIPHER_FileDecrypt

[Contents] [Index]

[PREV: Cipher.EncryptAEAD Method (Byte, Byte, Byte, Byte, AeadAlgorithm, Cipher.Opts)...]   [Contents]   [Index]   
   [NEXT: Cipher.FileDecrypt Method (String, String, String, String, CipherAlgorithm, Mode, Padding, Cipher.Opts)...]

Copyright © 2004-24 D.I. Management Services Pty Ltd. All rights reserved. Generated 2024-09-23T07:52:09Z.