Hello
I am converting some PHP code to PL/SQL. The code creates a hash using hash_hmac function in PHP which generate a keyed hash value using the HMAC method with the given Algorithm. Its breif documentation is available https://www.php.net/manual/en/function.hash-hmac.php
Following is the PHP code:
$hash
= hash_hmac(
'md5'
,
$string
,
$key
);
My requirement is to generate a hash using MD5 and the given key.
I did following:
select standard_hash ('mystring', 'MD5') from dual;
It generates a hash for mystring using MD5 but as per the requirement I should also give a secret key as given in the PHP code.
I am not good at encryption etc and don't know much about it.
I will be really thankful if someone can please let me know how to do this with PL/SQL.
Regards,
Habib