Click or drag to resize

CryptographyEncrypt Method (String, String)

Encrypt the specified string value with the specified password, using the AesManaged algorithm.

Namespace:  AskiaPortalCmn.Security
Assembly:  AskiaPortalCmn (in AskiaPortalCmn.dll) Version: 1.7.0-build068
Syntax
public static string Encrypt(
	string value,
	string password
)

Parameters

value
Type: SystemString
String to encrypt.
password
Type: SystemString
Password used to encrypt/decrypt the string.

Return Value

Type: String
Encrypted string.
Examples

Example of usage.
Based on http://stackoverflow.com/a/14286740/2134982

string encrypted = Cryptography.Encrypt(dataToEncrypt, password);
string decrypted = Cryptography.Decrypt(encrypted, password);
See Also