@@ -14,7 +14,7 @@ export function create (opts?: CreateOptions): AESCipher {
1414 const iterations = opts ?. iterations ?? 32767
1515 const algorithmTagLength = opts ?. algorithmTagLength ?? 16
1616
17- async function encryptWithKey ( data : Uint8Array , key : Uint8Array ) : Promise < Uint8Array > { // eslint-disable-line require-await
17+ async function encryptWithKey ( data : Uint8Array , key : Uint8Array ) : Promise < Uint8Array > {
1818 const nonce = crypto . randomBytes ( nonceLength )
1919
2020 // Create the cipher instance.
@@ -31,7 +31,7 @@ export function create (opts?: CreateOptions): AESCipher {
3131 * Uses the provided password to derive a pbkdf2 key. The key
3232 * will then be used to encrypt the data.
3333 */
34- async function encrypt ( data : Uint8Array , password : string | Uint8Array ) : Promise < Uint8Array > { // eslint-disable-line require-await
34+ async function encrypt ( data : Uint8Array , password : string | Uint8Array ) : Promise < Uint8Array > {
3535 // Generate a 128-bit salt using a CSPRNG.
3636 const salt = crypto . randomBytes ( saltLength )
3737
@@ -53,7 +53,7 @@ export function create (opts?: CreateOptions): AESCipher {
5353 * this decryption cipher must be the same as those used to create
5454 * the encryption cipher.
5555 */
56- async function decryptWithKey ( ciphertextAndNonce : Uint8Array , key : Uint8Array ) : Promise < Uint8Array > { // eslint-disable-line require-await
56+ async function decryptWithKey ( ciphertextAndNonce : Uint8Array , key : Uint8Array ) : Promise < Uint8Array > {
5757 // Create Uint8Arrays of nonce, ciphertext and tag.
5858 const nonce = ciphertextAndNonce . subarray ( 0 , nonceLength )
5959 const ciphertext = ciphertextAndNonce . subarray ( nonceLength , ciphertextAndNonce . length - algorithmTagLength )
@@ -77,7 +77,7 @@ export function create (opts?: CreateOptions): AESCipher {
7777 * @param {Uint8Array } data - The data to decrypt
7878 * @param {string|Uint8Array } password - A plain password
7979 */
80- async function decrypt ( data : Uint8Array , password : string | Uint8Array ) : Promise < Uint8Array > { // eslint-disable-line require-await
80+ async function decrypt ( data : Uint8Array , password : string | Uint8Array ) : Promise < Uint8Array > {
8181 // Create Uint8Arrays of salt and ciphertextAndNonce.
8282 const salt = data . subarray ( 0 , saltLength )
8383 const ciphertextAndNonce = data . subarray ( saltLength )
0 commit comments