Skip to content

Commit

Permalink
refactor: rename catch clause variable from _ to error
Browse files Browse the repository at this point in the history
  • Loading branch information
kiki-kanri committed Nov 21, 2023
1 parent e568e32 commit be1ef4f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/ciphers/aes/base/encryptAndDecrypt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export abstract class BaseAESEncryptAndDecrypt extends BaseAESCipher {
try {
const decipher = this.createDecipher(typeof iv === 'string' ? Buffer.from(iv, encodingOptions?.iv || this.encodingOptions.iv) : iv, decipherOptions);
return this.getDecipherResult(decipher, encryptedData, encodingOptions);
} catch (_) {}
} catch (error) {}
}

encrypt(data: BinaryLike, encodingOptions?: AESCipherEncodingOptions.Encrypt, cipherOptions?: TransformOptions) {
Expand All @@ -19,7 +19,7 @@ export abstract class BaseAESEncryptAndDecrypt extends BaseAESCipher {
data: this.getCipherResult(this.createCipher(iv, cipherOptions), data, encodingOptions),
iv: iv.toString(encodingOptions?.iv || this.encodingOptions.iv)
};
} catch (_) {}
} catch (error) {}
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/ciphers/aes/ecb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ export class ECB extends BaseAESCipher {
try {
const decipher = this.createDecipher(iv, decipherOptions);
return this.getDecipherResult(decipher, encryptedData, encodingOptions);
} catch (_) {}
} catch (error) {}
}

encrypt(data: BinaryLike, encodingOptions?: AESCipherEncodingOptions.Encrypt, cipherOptions?: TransformOptions) {
try {
return { data: this.getCipherResult(this.createCipher(null, cipherOptions), data, encodingOptions), iv: null };
} catch (_) {}
} catch (error) {}
}
}

Expand Down

0 comments on commit be1ef4f

Please sign in to comment.