Skip to content
This repository has been archived by the owner on Feb 25, 2019. It is now read-only.

Commit

Permalink
refactor(JWK): remove default values for aad params
Browse files Browse the repository at this point in the history
  • Loading branch information
EternalDeiwos committed Aug 21, 2017
1 parent d0039f5 commit 793b322
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/JWK.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ class JWK {
* @param {(String|Buffer)} [aad] - Additional non-encrypted integrity protected data (AES-GCM).
* @return {Promise.<Object>} A promise that resolves an object containing the base64url encoded `iv`, `ciphertext` and `tag` (AES-GCM).
*/
encrypt (data, aad = Buffer.from('')) {
encrypt (data, aad) {
let { alg, cryptoKey } = this
return JWA.encrypt(alg, cryptoKey, data, aad)
}
Expand All @@ -218,7 +218,7 @@ class JWK {
* @param {(String|Buffer)} [aad] - Additional non-encrypted integrity protected data (AES-GCM).
* @return {Promise.<String>} A promise that resolves the plaintext data.
*/
decrypt (ciphertext, iv, tag, aad = Buffer.from('')) {
decrypt (ciphertext, iv, tag, aad) {
let { alg, cryptoKey } = this
return JWA.decrypt(alg, cryptoKey, ciphertext, iv, tag, aad)
}
Expand Down

0 comments on commit 793b322

Please sign in to comment.