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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T21:19:24+00:00 2026-06-08T21:19:24+00:00

I am trying to connect my system to a banks payment system. The problem

  • 0

I am trying to connect my system to a banks payment system. The problem is, their documentation was mostly not correct, if it wasn’t a complete disaster.

In the documentation of 3D secure system, the bank asks me to fill out a html form and submit it to their system. The form should include some data AND a SHA1 hash of the data with the data. I tried many times but the bank’s system returned “Hash not correct” error all the time.

After some inspection on their example C# code, I found a function they used to get hash results. The problem is function was doing some other stuff to the data rather than just hashing them. And bigger problem is I cannot find out what this piece of code is doing to the string that hashed.

public static string CreateHash(string notHashedStr)
    {
        SHA1 sha1 = new SHA1CryptoServiceProvider();
        byte[] notHashedBytes = System.Text.Encoding.ASCII.GetBytes(notHashedStr);
        byte[] hashedByte = sha1.ComputeHash(notHashedBytes);
        string hashedStr = System.Convert.ToBase64String(hashedByte);

        return hashedStr;
    }

I have nearly no experience on .Net framework and also I am on a mac, so I cannot test the code easily, and MSDN is definitely not for me(I am a Ruby developer most of the time, and I know enough C). If anyone can explain what these functions do to the string to be hashed, i’ll be very glad.

  • 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-08T21:19:25+00:00Added an answer on June 8, 2026 at 9:19 pm

    It’s very simple.

    1. Get the ASCII encoded bytes from notHashedStr.
    2. Create a SHA1 hash from that bytes
    3. Convert that hash in a Base64 encoded string.
    4. return that Base64-SHA1-ASCII-String.

    I never did any ruby, but it must look a bit like this.

    require 'digest/sha1'
    returnValue = Digest::SHA1.base64digest 'notHashedStr'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Am trying to connect to a remote system which is not in the same
I'm now trying to connect my iPod Touch(iOS4 jailbroken) with Ecomote(a small embedded system)
I'm trying to connect from a Windows XP system to an SVN server but
Iam trying to connect my android device with a bluetooth compatible device. I know
Im trying to connect my project via sFTP. and everytime I run the project
Im trying to connect MySql from VB.NET in visual basic 2010. I wanted to
I trying to connect to a Java Service with some special security requirements It
I am trying to connect to a Servlet with my j2me application and it's
When I am trying to connect to my SVN repository on some remote server
I am trying to connect to a MySQL Server using JDBC tool in java

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.