Calculates a CMAC with the given password, macSize, and symmetric block encryption algorithm.
Cmac.Calculate(plainText, key, algorithm, macSize)
- Input plainText: VarChar(256)
- Input key: VarChar(256) hexadecimal
- Input algorithm: SymmetricBlockAlgorithm Domain value
- Input macSize: Numeric (9.0)
- Returns: VarChar(256)
Example:
&plainText="Lorem ipsum dolor sit amet"
&key="64887e525dce27351f5cb5ce85615e52"
&mac=&Cmac.Calculate(&plainText, &password, SymmetricBlockAlgorithm.AES, 128)
Validates a CMAC for the given parameters
Cmac.Verify(plainText, key, mac, algorithm, macSize)
- Input plainText: VarChar(256)
- Input key: VarChar(256) hexadecimal
- Input mac: VarChar(256) hexadecimal
- Input algorithm: SymmetricBlockAlgorithm Domain value
- Input macSize: Numeric (9.0)
- Returns boolean true if the mac is valid
Example:
&plainText="Lorem ipsum dolor sit amet"
&key="64887e525dce27351f5cb5ce85615e52"
&mac =""
&mac=&Cmac.Calculate(&plainText, &password, &mac, SymmetricBlockAlgorithm.AES, 128)