You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var mac = new ChaskeyCipher.Mac(); // instantiate a cipher in MAC mode
mac.set([1,2,3,4]); // set the key
console.log(mac.sign(new Uint8Array(0)));
console.log(mac.sign(new Uint8Array(0)));
console.log(mac.sign(new Uint8Array(17)));
console.log(mac.sign(new Uint8Array(0)));
prints the following:
I expect the last line to be
The reason is that the formatter object's byte buffer is not reset completely upon reset. It is filled with zeros instead of truncated to zero length.
The text was updated successfully, but these errors were encountered: