const decrypted = Buffer.concat([ decipher.update(ciphertext), decipher.final(), ]);

// core-decrypt.ts import * as crypto from 'crypto'; export interface DecryptOptions encryptedData: string; // base64 encoded ciphertext + iv + authTag password: string; encoding?: 'utf8'

const key = crypto.pbkdf2Sync(password, Buffer.from(salt, 'hex'), 100000, 32, 'sha256');

coreDecrypt(encryptedText: string, secretKey: string): string or something like:

const decipher = crypto.createDecipheriv('aes-256-gcm', key, iv); decipher.setAuthTag(authTag);

Scroll to Top
Scroll to Top
0
Would love your thoughts, please comment.x
()
x