UtilEncryptionEncryptFileT(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<T>(
string srcFilepath,
string key
)
where T : SymmetricAlgorithm
Public Shared Sub EncryptFile(Of T As SymmetricAlgorithm) (
srcFilepath As String,
key As String
)
Dim srcFilepath As String
Dim key As String
UtilEncryption.EncryptFile(srcFilepath, key)
public:
generic<typename T>
where T : SymmetricAlgorithm
static void EncryptFile(
String^ srcFilepath,
String^ key
)
static member EncryptFile :
srcFilepath : string *
key : string -> unit when 'T : SymmetricAlgorithm
No code example is currently available or this language may not be supported.
- srcFilepath String
-
The source filepath.
- key String
-
The key.
- T
-
The type of SymmetricAlgorithm for encryption.
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"
EncryptFile(Of DESCryptoServiceProvider)(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
|