File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed
Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 1+ /.gitattributes export-ignore
2+ /.gitignore export-ignore
3+ /.editorconfig export-ignore
4+ /README.md export-ignore
5+ /spec export-ignore
Original file line number Diff line number Diff line change 11name : branca
2- version : 0.3 .0
2+ version : 1.0 .0
33
44authors :
55 - Johannes Rabausch <mail@jrabausch.de>
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ class Branca
5151
5252 # Use custom nonce if set (only for testing).
5353 nonce = @nonce || Nonce .new.to_slice
54- header = Slice ( UInt8 ) .new(1 , VERSION .to_u8) + time + nonce
54+ header = Bytes .new(1 , VERSION .to_u8) + time + nonce
5555
5656 ciphertext = Bytes .new(payload.size + Mac .size)
5757 LibMonocypher .aead_lock(
@@ -103,7 +103,7 @@ class Branca
103103 timestamp = BigEndian .decode(UInt32 , header[1 ..4])
104104 token = Token .new(payload, timestamp)
105105
106- raise ExpiredTokenError .new token if ttl > 0 && (timestamp + ttl) < Time .utc.to_unix
106+ raise ExpiredTokenError .new( token) if ttl > 0 && (timestamp + ttl) < Time .utc.to_unix
107107 token
108108 end
109109end
You can’t perform that action at this time.
0 commit comments