Skip to content

Commit

Permalink
Merge pull request #2 from hugopeixoto/patch-1
Browse files Browse the repository at this point in the history
Fix typo and whitespace
  • Loading branch information
tuupola committed Jun 18, 2018
2 parents a2b809b + 3de8ad5 commit 7e739e4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions branca.js
Expand Up @@ -56,15 +56,15 @@ Branca.prototype.decode = function (token, ttl) {
}

/* Header was extracted from the binary token. */
let payload = sodium.crypto_aead_xchacha20poly1305_ietf_decrypt(
let payload = sodium.crypto_aead_xchacha20poly1305_ietf_decrypt(
nonce,
ciphertext,
header,
nonce,
this.key
);

/* Check for expiration only when requestested by passing in a TTL. */
/* Check for expiration only when requested by passing in a TTL. */
if (undefined !== ttl) {
let future = timestamp + ttl;
let unixtime = Math.round(Date.now() / 1000);
Expand All @@ -78,4 +78,4 @@ Branca.prototype.decode = function (token, ttl) {

module.exports = function(key) {
return new Branca(key);
}
}

0 comments on commit 7e739e4

Please sign in to comment.