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

422
Vistas
How to un-encrypt a string in javascript

Here is the the format of encription

The password structure is as follows: <section1>-<section2>-<section3>-<section4>-<section5>

Section 1

The first name length added to the last name length. i.e. 'David Lindley' = 5 + 7 = 12

Section 2

The captialised last letter of the first name i.e. 'David Lindley' = 'D'

Section 3

The lowercasefirst character of the last name i.e. 'David Lindley' = 'l'

Section 4

The total number of vowels (a, e, i, o, u) in the full name i.e. 'David Lindley' = 4

Section 5

A hash of the name based on the following:

  1. Any duplicate characters removed i.e. 'David Lindley' = 'Davi Lney'
  2. Remove any blank spaces from step 1 i.e. 'Davi Lney' = 'DaviLney'
  3. Replace every character from step 2 with its lowercase UTF-8/16 character code i.e. 'DaviLney' = [100, 97, 118, 105, 108, 110, 101, 121]
  4. The output from step 3 added together: i.e. 100 + 97 + 118 + 105 + 108 + 110 + 101 + 121 = 860 The output from step 4 is the code for Section 5

Example password

'David Lindley' = '12-D-l-4-860'

Explained

The first number is there first name and last name added together

second letter is there first capital letter

third letter is there first lowercase letter

final number is following the space removal and duplicate letters, then adding the UTF-8/16 character code matching each letter

So my questions is how would i write a function that would take a encrypted string and then un-encrypt it to get there regular name

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

0

I'm not an expert in cryptography but I don't think you can since there is a loss of information. A reverse algorithm would have to compute an enormous amount of combinations using a dictionary of names, by encrypting them and checking them against your encrypted string. Basically brute forcing it.

You could then stop at the first match or maybe output a list of matches.

If you don't have to use this method and just need to encrypt/decrypt simple strings, I suggest you take to look at symmetric encryption

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