Translating algorithm/code from Ruby to PHP -


  डाइजेस्ट = HMAC.digest (Digest.new (SHA1), Base64.decode64 (कुंजी), HashString) वापस Base64.encode64 (digest.to_s ())। Chomp ()  

उपरोक्त PHP में क्या होगा?

इसे ऐसा करना चाहिए:

  $ digest = hash_hmac (" Sha1 ", $ हैश_स्ट्रिंग, बेस 64_डेकोड ($ कुंजी), सच है); वापसी base64_encode ($ डाइजेस्ट);  

Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

jquery - SimpleModal Confirm fails to submit form -

php - Multiple Select with Explode: only returns the word "Array" -