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
But encode() then checks if it is non-zero. If it is zero, it uses the current system time to encode the token. If it is not zero, it uses the timestamp field of the Branca struct:
This means, if an instance of Branca is created at one point, and some given time later is used to encode a token, the token would use the timestamp of when the instance was created, not when the token was created.
The text was updated successfully, but these errors were encountered:
The Branca builder sets the
timestamp
to the current system time when callingnew()
:branca/src/lib.rs
Line 201 in 94725c9
But
encode()
then checks if it is non-zero. If it is zero, it uses the current system time to encode the token. If it is not zero, it uses thetimestamp
field of theBranca
struct:branca/src/lib.rs
Line 278 in 94725c9
This means, if an instance of
Branca
is created at one point, and some given time later is used to encode a token, the token would use the timestamp of when the instance was created, not when the token was created.The text was updated successfully, but these errors were encountered: