Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

382
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda