UtilEncryptionEncryptFileT(FileInfo, String) Method

Encrypts a file using the specified SymmetricAlgorithm and writes the encrypted data to the original file.

Definition

Namespace: DevCase.Core.Security.Cryptography.Encryption
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static void EncryptFile<T>(
	FileInfo file,
	string key
)
where T : SymmetricAlgorithm

Parameters

file  FileInfo
The source file to encrypt.
key  String
The key.

Type Parameters

T
The type of SymmetricAlgorithm for encryption.

Example

This is a code example.
C#
No code example is currently available or this language may not be supported.

Exceptions

ArgumentNullException key

See Also