出于某种原因,每次我计算 sha512 哈希并将其转换为字符串时,最后两个字符是 ==。知道为什么吗?
Function GetSHA512FromStringAsString(ByVal strdata As String)
Dim data As Byte() = StringToByte(strdata)
Dim result() As Byte
Dim shaM As New SHA512Managed()
result = shaM.ComputeHash(data)
Return ByteToString(result)
End Function
Function ByteToString(ByVal dBytes() As Byte)
Dim strText = Convert.ToBase64String(dBytes)
Return strText
End Function
谢谢!