Click or drag to resize

CryptographyEncrypt(String, String) Method

Encrypts a string using the default symmetrical encryption but without salt.

Namespace: InnerDrive.Core
Assembly: InnerDrive.Core (in InnerDrive.Core.dll) Version: 5.0.8475.0
Syntax
C#
public static Task<string> Encrypt(
	string plainText,
	string key
)

Parameters

plainText  String
The string to encrypt.
key  String
The key to encrypt the plaintext.

Return Value

TaskString
A Base64-encoded String containing the ciphertext.
Remarks
Uses the default encryption algorithm, DES.

Adapted from work by Frank Fong and William Rawls of the Code Project.

The plain text must be at least 0 and no more than MaxPlaintextLength; the key length must be at least MinKeyLength and no more than MaxKeyLength.

See Also