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

312
Views
AES CTR 128 Decryption with key and iv values using CryptoJs Javascript

I am trying to decrypt the below message which has been encrypted using AES CTR 128(The encryption is done in PHP need to decrypt in Javascript).


const message = "DEnw6dO5nEZ4k532f3I8U6Vy1m/kgeqZhPAUqjVwCDwBRTUcxkgSn95ROXdy3lPF7ybbIiDIUYtmfru6AaNvUlP9HxOdlMkjSJDMDz7pcDj+Hqioipp/hqfSqPfSkFI8Q+VkBV9b2zNy9lamy4NmaFBo03KvVm3Hw2cMWHeRgE8DTJYPoYrBqIlKJ3PT7E3edd433UGRC/wdZ1jkf1cgpD3HdMHDDRtLnA2q/mbmuYHs7hZSz+CLzBHP6iq4+jEO/6FrLCQSPXqEwyRvTQ73ngS1KOoI5LdhQV7s7vrKJcxHWEBX5A84F7VRo+at/0aE0m71GwmHvJSs5ZrLCkuiLKHqyzO4SUHNeP0f1VqQmuphC0o8M912xfquBI9tv0TIipbvw2hNKKL66tYCBSx8W0C6rodJ+yirHs+Q5CorBqzrYr28it3gqs0bHrkN7A=="

const key = "AJ89HFJHAJ89HFJH"
        
const iv = "hsjsjdkdueooqpjj"

CryptoJS.AES.decrypt(message, key, { iv: iv, mode: CryptoJS.mode.CTR })

console.log("Here is decrypted",decrypted.toString(CryptoJS.enc.Utf8))

After this I am getting below error message in console

enter image description here

Below is the PHP code which has been used

$encryption_text = openssl_encrypt($text, $crypto_details['ciphering'], $crypto_details['cryptokey'], $crypto_details['option'], $crypto_details['iv']);

Checked multiple resources but not able to find correct solution for this please guide me.

Thanks.

about 4 years ago · Santiago Gelvez
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!