Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Function HashString(ByVal StringToHash As String, ByVal HachKey As String) As String
- Dim myEncoder As New System.Text.UTF8Encoding
- Dim Key() As Byte = myEncoder.GetBytes(HachKey)
- Dim Text() As Byte = myEncoder.GetBytes(StringToHash)
- Dim myHMACSHA256 As New System.Security.Cryptography.HMACSHA256(Key)
- Dim HashCode As Byte() = myHMACSHA256.ComputeHash(Text)
- Dim hash As String = Replace(BitConverter.ToString(HashCode), "-", "")
- Return hash.ToLower
- End Function
- Dim key As String = "492124fd20e80e0f678f7a03344875f9b6234e2b"
- 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×tamp=" + TS + "&username="
- Dim sign = HashString(content, key)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement