Base64 SHA1 Algorithm in javascript and C #

I am doing some tests comparing the sha1 algorithm implemented in javascript, derived from http://pajhome.org.uk/crypt/ - with its implementation in C #.

Using C # to get a hash for {'method': 'people.get'} I use this statement:

Convert.ToBase64String(new System.Security.Cryptography.SHA1CryptoServiceProvider().ComputeHash(Encoding.ASCII.GetBytes("{'method':'people.get'}")));

which gives me Qy95a0ShZqhbNdt6IF8qNf72jX0=

In javascript, I get almost the same thing: Qy95a0ShZqhbNdt6IF8qNf72jX0using the operator:

b64_sha1("{'method':'people.get'}");

In the case of javascript, the hash does not end with an equal sign (=).

Could this difference cause me problems with authentication on the server?

In my case, as many of you may know, a sentence that I consider a hash is included in the http body, and the server checks it.

thank

+5
2
+5

sha1.js lib, , b64pad, . "". "=" , # API

+4

All Articles