UtilEncryptionEncryptFile(SymmetricAlgorithm, String, 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,
string srcFilepath,
string key
)
Public Shared Sub EncryptFile (
algorithm As SymmetricAlgorithm,
srcFilepath As String,
key As String
)
Dim algorithm As SymmetricAlgorithm
Dim srcFilepath As String
Dim key As String
UtilEncryption.EncryptFile(algorithm, srcFilepath,
key)
public:
static void EncryptFile(
SymmetricAlgorithm^ algorithm,
String^ srcFilepath,
String^ key
)
static member EncryptFile :
algorithm : SymmetricAlgorithm *
srcFilepath : string *
key : string -> unit
No code example is currently available or this language may not be supported.
Parameters
- algorithm SymmetricAlgorithm
-
The SymmetricAlgorithm.
- srcFilepath String
-
The source filepath.
- 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.FullName, 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
|