Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

421
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda