chore: strengthen backend eslint profile
This commit is contained in:
@@ -11,8 +11,9 @@ export class TbankCrypto {
|
||||
|
||||
static fromBase64(key: string): TbankCrypto {
|
||||
const decoded = Buffer.from(key, 'base64');
|
||||
if (decoded.length !== KEY_SIZE_BYTES)
|
||||
if (decoded.length !== KEY_SIZE_BYTES) {
|
||||
throw new Error('Invalid token encryption key');
|
||||
}
|
||||
return new TbankCrypto(decoded);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user