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)
Syntaxpublic static string EncryptAes256CbcHkdfHmac(
string plaintext,
string masterKey
)
Public Shared Function EncryptAes256CbcHkdfHmac (
plaintext As String,
masterKey As String
) As String
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:
StringBase64 encoded encrypted string with format: [version][salt][iv][ciphertext][hmac]
See Also