Click or drag to resize

CryptographyHelperEncryptAes256CbcHkdfHmac Method

HKDF-based authenticated encryption using AES-256-CBC + HMAC (encrypt-then-MAC). Uses HKDF (HMAC-based Key Derivation Function) for per-message key separation. Features: Random salt, domain separation, version byte, and constant-time HMAC verification.

Namespace:  WorkflowGen.My.Security
Assembly:  WorkflowGen.My (in WorkflowGen.My.dll) Version: 8.3.5.0 (8.3.5.20250916)
Syntax
public static string EncryptAes256CbcHkdfHmac(
	string plaintext,
	string masterKey
)

Parameters

plaintext
Type: SystemString
The string to encrypt
masterKey
Type: SystemString
The master key (should be at least 32 bytes of high entropy)

Return Value

Type: String
Base64 encoded encrypted string with format: [version][salt][iv][ciphertext][hmac]
See Also