hmac

hmac(hash-based message authentication code)とは、hash、decodeしたsecret keyとmessageからhmacを作成するalgorithmです。

Uint8Array.toHMAC.js

1. k(decodeしたsecret key)の長さが64未満の場合、0を追加します。
2. 1(64回)に0x36^を適用します。
3. 2とmessageをconcatします。
4. 3にhashを適用します。
5. 1(64回)に0x5c^を適用します。
6. 5と4をconcatします。
7. 6にhashを適用します。