Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Static method: string EncryptPassword(string, byte[])

Declaration

public static string EncryptPassword(
    string plain,
    byte[] key
)

Summary

Encrypts a password using AES. The result is encoded into base 64 for easy storage.

Parameters

stringplain Plaintext password to encrypt.
byte[]key The key to use for encryption. Must be exactly 32 bytes long.

Returns

The encrypted password as a base64-encoded string.