THEVENOT Guy - 2014-08-31

Hi Don, and All,

I came across a bug, about the hashing algorithms, while I download the last version of the plugin NppCrypt ( v1.009 ), at the address :

http://sourceforge.net/p/notepad-plus/discussion/482781/thread/ea720090/#08f8

I wanted to verify the MD5 sum of the downloaded archive "nppcryptv1009.zip". To that purpose, I used NppHash ( one of your plugins, Don ! ) and, also, my present version of NppCrypt ( v1.007 )

So, I was very surprised to get an other MD5 signature, than the one indicated by Jean-Paul Richter ?!

First of all, I verified, with two external DOS tools ( md5.exe and md5sums.exe ) => b4b1194b94ad6998308da34940a4bef8 was the right MD5 signature for the archive nppcryptv1009.zip :-)

Then, I tried to do the same operations, with my N++ v6.4.5 configuration. This time, hopefully, the results, with, both, NppHash and NppCrypt were correct :-)

So, many tests and many hours afterwards, I found out that it's because of the new version of the library SciLexer.dll !! This new version of Scintilla came up , the first time, with Notepad++ v6.5

Moreover, this bug is not specific to the MD5 hash algorithm and affects all types of hashing :-(

As an example, and to reproduce this bug, just follow the method below :

  • Download the Notepad++ 7z package of the 6.6.8 version, from the address :

http://notepad-plus-plus.org/fr/download/v6.6.8.html

  • Extract all the files of this 7z archive in a new folder

  • Rename the npp.6.6.8.bin.7z archive as a standard file : Test.txt

  • Download the NppHashMaker.v1.0.zip archive, from the address :

http://npp-plugins.tuxfamily.org/plugins

  • Extract, only, the file NppHasher.dll, in the plugins sub-folder of this new folder

  • Start Notepad++ v6.6.8

  • Open the pseudo-file Test.txt, that is to be hashed

  • Select all the text, by CTRL + A

  • Select the menu Plugins - NppHash - SHA1

=> You obtain the SHA1 signature 71317A15C39866280C810303BA6FF664FBD65A12 which is completely different of the right one, found at the address ( last line ) :

http://sourceforge.net/p/notepad-plus/discussion/1290588/thread/f2c77688/

Note that the v6.6.8 version of N++ uses the version 3.3.4.0 of Scintilla ( 1 052 672 bytes )

Now, we'll try the same test, with the previous version of Scintilla

  • Quit Notepad++

  • Delete the present file Scilexer.dll

  • Copy the old version 2.2.7.0 of Scintilla ( 921 600 bytes ) in the new folder, close to N++ 6.6.8

( If you DON'T have any version of N++, prior to the version 6.5, download the npp.6.4.5.bin.7z archive and, JUST, extract the file SciLexer.dll ( version 2.2.7.0 ), in the new folder )

  • Re-start Notepad++ v6.6.8

  • Open the pseudo-file Test.txt, that is to be hashed

  • Select all the text, by CTRL + A

  • Select the menu Plugins - NppHash - SHA1

=> This time, you get the right SHA1 signature 8AF613FB26B1CACC6FEC22BE4901429C869D8A55 of the npp.6.6.8.bin.7z archive

Hope you'll be able to solve this bug, easily enough, Don :-)

Best Regards,

guy038

P.S. :

I forgot to mention that hashing give identical results, whatever the version of Scintilla, if small amount of text is selected !

 
Last edit: THEVENOT Guy 2014-08-31