Appearance
EncryptionOptions Class
Definition
Class defining options used in Encryption Operations
- Namespace:
JASE.Crypto - Assembly:
JASE.Crypto.dll
Properties
| Name | Description |
|---|---|
Algorithm | The symmetric encryption algorithm to use (e.g., AES256, TripleDES). |
AuthKey | The authentication key used for HMAC signing. (Default: Minimim of 32 bytes MinimumAuthKeyBytes |
Encoding | The text encoding used when converting strings to byte arrays (default: UTF8). Only used for string-based input. |
IncludeIV | Indicates whether the initialization vector (IV) should be included in the output payload. |
Padding | The padding mode to apply to the encryption algorithm (e.g., PKCS7, Zeros). |
Salt | The cryptographic salt used for key derivation. (Default: Minimim of 16 bytes MinimumSaltBytes |
Methods
| Name | Description |
|---|---|
EncryptionOptions Create(byte[] salt, byte[] authKey = null, SymmetricAlgorithms algorithm = null, EncryptionPaddingMode padding = null, bool includeIV = null, Encoding encoding = null) | Creates an EncryptionOptions instance using raw byte arrays for salt and optional auth key. |
EncryptionOptions Create(string salt, string authKey = null, SymmetricAlgorithms algorithm = null, EncryptionPaddingMode padding = null, bool includeIV = null, Encoding encoding = null) | Creates an EncryptionOptions instance from string-based salt and optional auth key. |
EncryptionOptions CreateForKey(byte[] key, SymmetricAlgorithms algorithm = null, EncryptionPaddingMode padding = null, Encoding encoding = null) | Creates interop EncryptionOptions from a raw symmetric key. The key bytes are used directly (no derivation) and must match a legal key size for algorithm. Produces the standard, interoperable IV ‖ ciphertext layout (IV prepended, PKCS7, no MAC). |