Open adammankowski1 opened 3 years ago
Hello,
I found out that NppToolBucket generates wrong SHA1 checksum for latin letters (tried with: "ł").
Letter "ł" checksum sha1 d8d824647b9ebeea3ede7cf0f9f5d2405881bf20 C# D50591FF745CC83091F4EE12B2EE702CB24B0B45 ToolBucket
Letter "l" checksum sha1 07c342be6e560e7f43842e2e21b774e61d85f047 C# 07C342BE6E560E7F43842E2E21B774E61D85F047 ToolBucket
The code I generated checksum in the C#:
using (var cryptoProvider = new SHA1CryptoServiceProvider()) { byte[] messageBytes = Encoding.UTF8.GetBytes("ł"); //d8d824647b9ebeea3ede7cf0f9f5d2405881bf20 var hash = BitConverter.ToString(cryptoProvider.ComputeHash(messageBytes)).ToLower().Replace("-", string.Empty); }
Online sha1 checksum generator like Online MD5 Hash Generator & SHA1 returns the same checksum as C# methods.
I was having a similar problem, and I found that if I changed the Encoding to ANSI prior to generating the checksum, it gave me the expected result.
Hello,
I found out that NppToolBucket generates wrong SHA1 checksum for latin letters (tried with: "ł").
Letter "ł" checksum sha1 d8d824647b9ebeea3ede7cf0f9f5d2405881bf20 C# D50591FF745CC83091F4EE12B2EE702CB24B0B45 ToolBucket
Letter "l" checksum sha1 07c342be6e560e7f43842e2e21b774e61d85f047 C# 07C342BE6E560E7F43842E2E21B774E61D85F047 ToolBucket
The code I generated checksum in the C#:
Online sha1 checksum generator like Online MD5 Hash Generator & SHA1 returns the same checksum as C# methods.