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

126
Views
Cifrar grandes datos

El siguiente código funciona bien cuando cifro 190 bytes o menos. Pero si pruebo 191 o más, se lanza una excepción. ¿Cuál es la forma correcta de cifrar piezas de datos más grandes?

 async function go(size) { var { publicKey, privateKey } = await crypto.subtle.generateKey({ name: "RSA-OAEP", modulusLength: 2048, publicExponent: new Uint8Array([1, 0, 1]), hash: "SHA-256", }, true, ["encrypt", "decrypt"]) try { var res = await window.crypto.subtle.encrypt( { name: "RSA-OAEP" }, publicKey, new Uint8Array(size), ) console.log(`${size} - OK: ${res.byteLength}`) } catch (ex) { console.log(`${size} - ERROR: ${ex.constructor.name} ${ex}`) } } go(10) // Ok go(100) // Ok go(190) // Ok go(191) // Error go(200) // Error go(500) // Error

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!