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

386
Views
CryptoJS.MD5 JS to Powershell - Fails with Not Authorized

I have this script, I'm trying to convert this script to PowerShell but no luck, fails with 'Not Authorized' during Web Request (JS works fine). Please let me know if I'm missing anything.

Postman JS Code:

var apiKey = pm.environment.get("123456");
var apisecret = postman.getEnvironmentVariable("123456");
var seconds = Math.floor(((new Date().getTime())+200000)/1000);
postman.setEnvironmentVariable("sig",CryptoJS.MD5(apiKey+apisecret+seconds).toString());

PS Code:

$clientId = "123456"
$clientSecret = "123456"
$seconds = ([Math]::Floor((Get-Date).ToFileTimeUTC())+200000/1000)
$initialSig = "$clientId" + "$clientSecret" + "$seconds"
$md5 = New-Object -TypeName System.Security.Cryptography.MD5CryptoServiceProvider
$utf8 = New-Object -TypeName System.Text.UTF8Encoding
$sig = ([System.BitConverter]::ToString($md5.ComputeHash($utf8.GetBytes($initialSig)))).toLower().toString() -replace "-",""

Thank you.

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!