erosfabbri
erosfabbri

Reputation: 57

How to create SHA256 hash from a string

I need to create a sha256 hash of a password entered in a TextBox. I tried to use ComputeHash(string) but it only works with streams.

Upvotes: 1

Views: 7011

Answers (1)

erosfabbri
erosfabbri

Reputation: 57

Dim hash = New System.Security.Cryptography.SHA256Managed().ComputeHash(System.Text.Encoding.UTF8.GetBytes("The-password"))

Upvotes: 2

Related Questions