Advertisement
Guest User

Untitled

a guest
Mar 29th, 2017
221
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. Public Function HashString(ByVal StringToHash As String, ByVal HachKey As String) As String
  2. Dim myEncoder As New System.Text.UTF8Encoding
  3. Dim Key() As Byte = myEncoder.GetBytes(HachKey)
  4. Dim Text() As Byte = myEncoder.GetBytes(StringToHash)
  5. Dim myHMACSHA256 As New System.Security.Cryptography.HMACSHA256(Key)
  6. Dim HashCode As Byte() = myHMACSHA256.ComputeHash(Text)
  7. Dim hash As String = Replace(BitConverter.ToString(HashCode), "-", "")
  8. Return hash.ToLower
  9. End Function
  10.  
  11.  
  12. Dim key As String = "492124fd20e80e0f678f7a03344875f9b6234e2b"
  13. Dim content = "POST&https%3A%2F%2Fapi.pinterest.com%2Fv3%2Fregister%2Femail%2F&client_id=1431602&email=test1243%40o2.pl&first_name=albetr&gender=male&locale=en_US&password=xx55xx&timestamp=" + TS + "&username="
  14. Dim sign = HashString(content, key)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement