Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

568
Views
How can I convert an Openssl command to decrypt .ts files into javascript code?

The file is encrypted using AES 128 CBC

Key in HEX:

B20782CBC32A7843E7691D55950C9A6A

IV in HEX:

43A6D967D5C17290D98322F5C8F6660B

Command Openssl that I want to convert (this command work):

openssl aes-128-cbc -d -in file.ts -out decrypt_file.ts -nosalt -iv 43A6D967D5C17290D98322F5C8F6660B -K B20782CBC32A7843E7691D55950C9A6A

My nodejs code (the output file is created but the conversion is incorrect):

var crypto = require('crypto');
var fs = require('fs');

let cipher_name = 'aes-128-cbc';
let iv = Buffer.from('43A6D967D5C17290D98322F5C8F6660B', 'hex');
let key = Buffer.from('B20782CBC32A7843E7691D55950C9A6A', 'hex');

let decoder = crypto.createDecipheriv(cipher_name, key, iv);
let text_crypt = fs.readFileSync('file.ts');
let chunks = [];
chunks.push(decoder.update(text_crypt, 'binary'));
chunks.push(decoder.final('binary'));
fs.writeFileSync('decrypt_file.ts', chunks.join('', 'binary'));
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!