define-hmac-function

define-hmac-function is a Lisp macro in `hmac-def.el'.

(define-hmac-function NAME H B L &optional BIT)

Define a function NAME(TEXT KEY) which computes HMAC with function H.

HMAC function is H(KEY XOR opad, H(KEY XOR ipad, TEXT)):

H is a cryptographic hash function, such as SHA1 and MD5, which takes
a string and return a digest of it (in binary form).
B is a byte-length of a block size of H. (B=64 for both SHA1 and MD5.)
L is a byte-length of hash outputs. (L=16 for MD5, L=20 for SHA1.)
If BIT is non-nil, truncate output to specified bits.