UtilEncryptionEncryptFile(SymmetricAlgorithm, FileInfo, String) Method
Encrypts a file using the specified SymmetricAlgorithm
and writes the encrypted data to the original file.
Namespace: DevCase.Core.Security.Cryptography.EncryptionAssembly: 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(
SymmetricAlgorithm algorithm,
FileInfo file,
string key
)
Public Shared Sub EncryptFile (
algorithm As SymmetricAlgorithm,
file As FileInfo,
key As String
)
Dim algorithm As SymmetricAlgorithm
Dim file As FileInfo
Dim key As String
UtilEncryption.EncryptFile(algorithm, file,
key)
public:
static void EncryptFile(
SymmetricAlgorithm^ algorithm,
FileInfo^ file,
String^ key
)
static member EncryptFile :
algorithm : SymmetricAlgorithm *
file : FileInfo *
key : string -> unit
No code example is currently available or this language may not be supported.
Parameters
- algorithm SymmetricAlgorithm
-
The SymmetricAlgorithm.
- file FileInfo
-
The source file to encrypt.
- key String
-
The key.
This is a code example.
No code example is currently available or this language may not be supported.
Dim file As New FileInfo("C:\File.txt")
Dim key As String = "MyKey"
Dim algorithm As New DESCryptoServiceProvider()
EncryptFile(algorithm, file, key)
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
ArgumentNullException
|
key
|