hash

 avatar
devsurigao
vbscript
12 days ago
412 B
6
Indexable
    Public Function HashPassword(password As String) As String
        Using sha256 As SHA256 = SHA256.Create()
            Dim bytes = Encoding.UTF8.GetBytes(password)
            Dim hash = SHA256.ComputeHash(bytes)
            Return BitConverter.ToString(hash).Replace("-", "").ToLower()
        End Using
    End Function

    Public CurrentUser As String = ""
    Public CurrentRole As String = ""
Editor is loading...
Leave a Comment