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

283
Views
crypto.scrypt -> createDecipheriv -> error. NodoJS

Encontré un problema en el que intentaba derivar una clave de 256 bits de una contraseña de entrada con la esperanza de usarla con crypto.createCipheriv/createDecipheriv. Esto me da el siguiente error: [ERR_INVALID_ARG_TYPE]: the "key" argument must be of type string or an instance of Buffer, TypedArray, DataView, or KeyObject. Recieved undefined No estoy seguro de por qué... this.key = crypto.scrypt(this.passphrase, 'baewithsalt',256, (err)=>{if(err) throw err;}); cuando se usa en... this.decipher = crypto.createDecipher(this.algorithm, this.key, this.iv); me dice que la clave no está definida. Tengo estas variables inicializadas justo encima de eso... this.passphrase ='whatever'; this.algorithm = 'aes-256-cbc'; this.iv =crypto.randomBytes(16); ¿Qué estoy haciendo mal y por qué no puedo usar scrypt para generar una clave a partir de una contraseña para cipheriv/decipheriv? Pido disculpas si el formato puede estar ligeramente desviado, no tengo Internet y lo escribí a través de mi teléfono.

over 4 years ago · Santiago Trujillo
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!