Skip to content

EncryptionOptions Class ​

Definition ​

Class defining options used in Encryption Operations

  • Namespace: JASE.Crypto
  • Assembly: JASE.Crypto.dll

Properties ​

NameDescription
AlgorithmThe symmetric encryption algorithm to use (e.g., AES256, TripleDES).
AuthKeyThe authentication key used for HMAC signing. (Default: Minimim of 32 bytes MinimumAuthKeyBytes
EncodingThe text encoding used when converting strings to byte arrays (default: UTF8). Only used for string-based input.
IncludeIVIndicates whether the initialization vector (IV) should be included in the output payload.
PaddingThe padding mode to apply to the encryption algorithm (e.g., PKCS7, Zeros).
SaltThe cryptographic salt used for key derivation. (Default: Minimim of 16 bytes MinimumSaltBytes

Methods ​

NameDescription
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).