Cipher.FileDecrypt Method (String, String, String, String, CipherAlgorithm, Mode, Padding, Cipher.Opts)
Decrypt a file passing key and IV as hex strings.
Syntax
[C#]
public static int FileDecrypt(
string fileOut,
string fileIn,
string keyHex,
string ivHex,
CipherAlgorithm cipherAlg,
Mode mode,
Padding pad,
Cipher.Opts opts
)
[VB.NET]
Public Shared Function FileDecrypt ( _
fileOut As String, _
fileIn As String, _
keyHex As String, _
ivHex As String, _
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, in binary format.
- keyHex
- Hex-encoded key of exact length
- ivHex
- Hex-encoded IV, or "" 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
Remarks
fileOut and fileIn must not be the same. The output file is in binary format.
See Also
VB6/C equivalent: CIPHER_FileDecrypt
[Contents] [Index]