feat(edit): 服务端代码拆分、优化
This commit is contained in:
@@ -52,7 +52,8 @@ export function decryptStoreSecret(
|
||||
const tag = ciphertextWithTag.subarray(-authenticationTagLength);
|
||||
const decipher = createDecipheriv('aes-256-gcm', key, nonce);
|
||||
decipher.setAuthTag(tag);
|
||||
return Buffer.concat([decipher.update(ciphertext), decipher.final()]).toString(
|
||||
'utf8',
|
||||
);
|
||||
return Buffer.concat([
|
||||
decipher.update(ciphertext),
|
||||
decipher.final(),
|
||||
]).toString('utf8');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user