我正在尝试实施 Salted Challenge Response Authentication Mechanism ( RFC 5802 ),但遇到了一些问题。
Hi(str, salt, i):
U1 := HMAC(str, salt + INT(1))
U2 := HMAC(str, U1)
...
Ui-1 := HMAC(str, Ui-2)
Ui := HMAC(str, Ui-1)
Hi := U1 XOR U2 XOR ... XOR Ui
where "i" is the iteration count, "+" is the string concatenation
operator, and INT(g) is a 4-octet encoding of the integer g, most
significant octet first.
我不确定如何添加 INT(1)。我有一个用于盐的字节数组。我需要做的只是位移 1 并将其添加到数组的末尾吗?