V
V
Vitaly2015-09-26 16:08:32
JavaScript
Vitaly, 2015-09-26 16:08:32

How to generate sha1 md5 key in javascript?

Here is an excerpt from the description of the data that needs to be sent in a post request to the server:

The request signature is calculated as follows (PHP): $sign=sha1(md5($data.$password)); $data - content of the given request tag; $password - the merchant's personal password, which he received during registration, is located in the merchant settings menu (Ex: 3A90E5J0f6OUIfqN1Qu59gYrjDgDblfL)

How do I generate this "request signature" in JavaScript or nodejs server?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Vladimir Martyanov, 2015-09-26
@vilgeforce

Take ready-made implementations of MD5 and SHA1, use them. If you are not looking for easy ways - make your own implementations of the indicated algorithms (hehe) and then see point 1.

A
Alexander Taratin, 2015-09-26
@Taraflex

https://gist.github.com/jo/8619441
https://github.com/openpeer/cifre

S
SagePtr, 2015-09-27
@SagePtr

In general, instead of interfering with different hashing algorithms, hmac has long been invented.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question