SQL> declare
2 l_in_val varchar2(2000) := 'CriticalData';
3 l_key varchar2(2000) := '1234567890123456';
4 l_mac raw(2000);
5 begin
6 l_mac := dbms_crypto.mac (
7 src => UTL_I18N.STRING_TO_RAW (l_in_val, 'AL32UTF8'),
8 typ => dbms_crypto.hmac_sh1,
9 key => UTL_I18N.STRING_TO_RAW (l_key, 'AL32UTF8')
10 );
11 dbms_output.put_line('MAC='||l_mac);
12 end;
13 /
SQL>
|