Core-decrypt Page
const plain = coreDecrypt( encryptedData: '...', // from core-encrypt password: 'my-secret', ); If you give me more details (use case, stack, encryption format), I’ll tailor the feature exactly to your needs.
// core-decrypt.ts import * as crypto from 'crypto'; export interface DecryptOptions encryptedData: string; // base64 encoded ciphertext + iv + authTag password: string; encoding?: 'utf8' core-decrypt
const decrypted = Buffer.concat([ decipher.update(ciphertext), decipher.final(), ]); const plain = coreDecrypt( encryptedData: '
const decipher = crypto.createDecipheriv('aes-256-gcm', key, iv); decipher.setAuthTag(authTag); const plain = coreDecrypt( encryptedData: '...'