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

420
Views
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 answers
Answer question

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 Report
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!