Advertisement
Guest User

Untitled

a guest
Oct 20th, 2014
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. Private Function GeraSHA256(ByVal Chave As String) As String
  2. Dim uEncode As New UnicodeEncoding()
  3. Dim Hash() As Byte
  4. Dim SHA As New SHA256Managed()
  5. Dim Bytehash() As Byte
  6. Hash = uEncode.GetBytes(Chave)
  7. Bytehash = SHA.ComputeHash(Hash)
  8. Return Convert.ToBase64String(Bytehash)
  9. End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement