Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9164631
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T14:43:46+00:00 2026-06-17T14:43:46+00:00

i was going through encryption today and my colleague told me a simpler/custom way

  • 0

i was going through encryption today and my colleague told me a simpler/custom way to do it, what i did is listed down there, so can you please tell me what type of encryption or hashign is that? he told me that this is the mixture of some sort of hashing and encryption. Sorry for stupid question i am new here. 🙂
the below method takes a string (password in my case). reverses it and makes a dictionary (adding dictionary items are listed below) and matches the keys and values and return encrypted data.

public static string Encrypt(string source)
{
    string enCrypted = "";
    try
    {
        source = Reverse(source);
        Dictionary<char, char> sourceTable = AddDictionaryItems();

        char[] sourceArray = source.ToCharArray();
        StringBuilder encryptedData = new StringBuilder();
        foreach (char chr in sourceArray)
        {
            KeyValuePair<char, char> Pair;
            Pair = sourceTable.First(tuple => tuple.Key == chr);
            encryptedData.Append(Pair.Value);
        }
        enCrypted=encryptedData.ToString();
    }
    catch (Exception ex)
    { 

    }
    return enCrypted;
}

the below method adds items into dictionary, items are basically based on ascii codes. i loop through all asciis and then corresponding charachters are added in the dictionary. but the real trick is that when adding an item in the dictionary. e.g., when i add ‘A’ in dictionary as a key, then its value would be ‘D’. the variable “jump” specifies the difference between key and value. so if my password is ‘ABC’ it would return ‘DEF’ or ‘FED’ if i reverse that thing.

public static Dictionary<char, char> AddDictionaryItems()
{
    Dictionary<char, char> dc = new Dictionary<char, char>();
    try
    {
        int initial = 33;
        int jump = 3;
        int final = 127 - jump;

        for (int ascii = initial; ascii < final; ascii++)
        {
            dc.Add((char)ascii, (char)(ascii + jump));
        }
        for (int ascii = final; ascii < final + jump; ascii++)
        {
            dc.Add((char)ascii, (char)(initial));
            initial++;
        }
    }
    catch (Exception ex)
    { 
        throw ex;
    }
    return dc;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T14:43:47+00:00Added an answer on June 17, 2026 at 2:43 pm

    That would be a Substitution Cipher, however unless you are making this for fun, do not use this method for anything that requires security. 1000’s of people crack this encryption method every day for fun (check your local newspaper, it likely has one too, it is usually next to the crossword).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Going through the microsoft authentication tutorial listed here they have you create a master
While going through the checkBox I found there is written CheckBox checkbox = (CheckBox)sender
Going through the man page of tcpdump here It seems kernel can drop the
I need to store an encryption key that is going to be accessed through
While going through MSDN I found that in button properties useSubmitBeheviour there is written
Going through Learn Python the Hard Way, lesson 25. I try to execute the
Is going through the Windows Shop within Windows 8 the only way to know
Going through happstack-lite tutorial : we build functions that have return type of ServerPart
Going through some of my older Delphi projects and upgrading them to D2009, as
Going through Javascript documentation, I found the following two functions on a Javascript object

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.