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 756423
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T15:14:35+00:00 2026-05-14T15:14:35+00:00

I have a password hash that is stored in a table and is put

  • 0

I have a password hash that is stored in a table and is put there by the following coldfusion script-

#Hash(Encrypt(Form.UserPassword,GetSiteVars.EnCode))#

I am trying to add some outside functionality within a c# application. I would like to be able to take advantage of the data that already exists so that I can authenticate users. Does anyone know how I can replicate the above coldfusion code in c#?

Thanks for any thoughts.

  • 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-05-14T15:14:36+00:00Added an answer on May 14, 2026 at 3:14 pm

    I’ll leave the original answer content below for historical reference, but it should be noted that this is NOT a working answer to the original question.

    Instead, see the top-voted answer in this thread, by @Terrapin in January 2011. I hope the OP sees this and can change the accepted answer. Heck, I’ll even flag the mods to see if anything can be done about this.


    To build on the answer by Edward Smith, and the follow-up comments by czuroski, here is my solution.

    First, you need an XOR function in C#, which I’ve taken from here and modified slightly.

    using System;
    using System.Collections.Generic;
    using System.Text;
    
    namespace SimpleXOREncryption
    {    
        public static class EncryptorDecryptor
        {
            public static string EncryptDecrypt(string textToEncrypt, int key)
            {            
                StringBuilder inSb = new StringBuilder(textToEncrypt);
                StringBuilder outSb = new StringBuilder(textToEncrypt.Length);
                char c;
                for (int i = 0; i < textToEncrypt.Length; i++)
                {
                    c = inSb[i];
                    c = (char)(c ^ key);
                    outSb.Append(c);
                }
                return outSb.ToString();
            }   
        }
    }
    

    Then, take the result of the XOR and base-64 encode it. After you have that string, MD5 hash it. The result should match the result from the original code snippet:

    #Hash(Encrypt(Form.UserPassword,GetSiteVars.EnCode))#
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a field (regular field, not a password) that is being stored in
Say a user registers for your site, you hash the password they have chosen
I have a Reset Password form being validated by the jQuery Validation plugin. Everything
I have the following password requirements: 1) Should be 6-15 characters in length 2)
I have a piece of code which deals with customers stored in database. There
I understand that salts make the same password hash to different values. However, salts
I have a PHP script that runs as a CGI program and the HTTP
I have a web application that handles employees work sheets. They have username/password combinations
I try to write tests using php for database. I have a table that
I have a long function, as seen below: hash_correct = hashlib.md5(salt + password)).digest().encode(base64) I'd

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.