UtilEncryptionSymmetricEncryptT Method

Encrypts a string using the specified SymmetricAlgorithm.

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 string SymmetricEncrypt<T>(
	string str,
	string key,
	Encoding enc = null
)
where T : SymmetricAlgorithm

Parameters

str  String
The string to encrypt.
key  String
The key.
enc  Encoding  (Optional)
The text Encoding.

Type Parameters

T
The source SymmetricAlgorithm for encryption.

Return Value

String

[Missing <returns> documentation for "M:DevCase.Core.Security.Cryptography.Encryption.UtilEncryption.SymmetricEncrypt``1(System.String,System.String,System.Text.Encoding)"]

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