Guest User

Untitled

a guest
Jun 25th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. print base64.b64encode(hmac.new("key".encode("ascii"),"hello".encode("ascii"), hashlib.sha512).digest())
  2.  
  3. <?php
  4. echo base64_encode(hash_hmac('sha512', "hello", "key"));
  5. ?>
  6.  
  7. if i use hexdigest() method in python in place of digest() method then hash result same, but i need to use digest() method, so is there any equivalent method in php. so i can get same hash result.
  8.  
  9. Thanks in advance.
Add Comment
Please, Sign In to add comment