散列在dotnet的核心 字符串时,我得到了奇怪的结果我发现这个类似的问题:Computing SHA1 with ASP.NET Core 并发现如何convert a byte array to string在.NET核心 这是我的代码: private static string CalculateSha1(string text)
{
var enc = Encoding.Ge
我想创建一个32位字符串,我可以将其用作加密密钥。此字符串/关键应该从一个纯文本字符串中获得,如: 'I am a string'
我的做法首先是哈希吧: hashed_string = Digest::SHA1.hexdigest('I am a string') # => 'bd82fb0e81ee9f15f5929e0564093bc9f8015f1d'
然后到只使用前32个字符: