codice:
    Function GetSHA1HashString(ByVal str As String) As String
        Dim objSHA As New Security.Cryptography.SHA1CryptoServiceProvider
        Dim bytes() As Byte = System.Text.Encoding.ASCII.GetBytes(str)
        Dim res As String = ""

        bytes = objSHA.ComputeHash(bytes)

        For Each b As Byte In bytes
            res = res + b.ToString("x2")
        Next
        Return res
    End Function

    Dim a As String = GetSHA1HashString("A")
Risultato: 6dcd4ce23d88e2ee9568ba546c007c63d9131c1b.

L'x2 è per il formato esadecimale