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

212
Vistas
How can I hide or encrypt my js code for normal users? Is this a right way to put my key in the front-end?

enter image description here

Hello, In terms of this picture, you can see my js code is easy to read for any user, and my important key and logic are naked.

1.Is it possible to hide or encrypt my code to prevent someone from reading my code maliciously? 2.What's the right way to store a public key or symmetric-key in the front-end? Is it correct to write it like this picture?

By the way, this testing project is written by Blazor WebAssembly.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

What you're looking for is code mangling/minification with a library such as uglify-js https://www.npmjs.com/package/uglify-js. This is not a replacement for security though, your JS should not contain sensitive data, that should be handled by a backend.

The short answer to your question is there is no way to obfuscate a key this way. If your frontend can decrypt that key to use it then a user can too.

about 4 years ago · Juan Pablo Isaza Denunciar
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