Hi all, I need to generate an HMAC hash using SHA512 according to a certain API's specs and the only HMAC example I've seen () does not work as I need it do, even adapting it from a 64-bit blocksize to 512 and adding Ward's_SHA512 UDF. I've tried the following: Func _HashHMAC512($key, $message)
$key = _StringRepeat("0", 512 - StringLen($key)) & $key ; keys shorter than blocksize are zero-padded ('?' is concatenation)
$o_key_pad = BitXOR(0x5c * 512, $key) ; Where blocksize is that of the underlying hash function
$i_key_pad = BitXOR(0x36 * 512, $key) ; Where ? is exclusive or (XOR)
Retu