MAC v16
The MAC
function uses a user-specified MAC
function to return the hashed MAC
value of a RAW
or CLOB
value. The MAC
function is available in three forms:
Parameters
src
src
specifies the value for which the MAC
value is generated. Specify a RAW
, BLOB
, or CLOB
value.
typ
typ
specifies the MAC
function used. EDB Postgres Advanced Server supports the MAC
functions shown in the table.
MAC functions | |
---|---|
HMAC_MD5 | CONSTANT INTEGER := 1; |
HMAC_SH1 | CONSTANT INTEGER := 2; |
key
key
specifies the key used to calculate the hashed MAC
value.
Examples
This example finds the hashed MAC
value of the string cleartext source
:
DBMS_CRYPTO.MAC
uses a key value of my secret
key when calculating the MAC
value of cleartext source
.
- On this page
- Parameters
- Examples