Created attachment 35486 [details] patch Add __sha1 and __sha256 functions to JMeter
Created attachment 35487 [details] Patch with added two functions and tests Attached Patch with added two functions and tests
Created attachment 35488 [details] Add patch with 2 functions and tests Add patch with 2 functions and tests
Thank you for your contribution, I have few remarks: - Why salt is not also there for SHA1 ? - I think 1 more generic function is enough - It would be better to have something like __digest(algorithm, string to digest, salt (optional),uppercase (optional defaults to false), varName (optional)). This would allow more generic algorithm addition - synchronized does not seem to be needed for me
Also: - patch file should be built from jmeter folder (the one that contains src) - if possible, documentation functions.xml should be updated, I'll do it if you don't have time - Apache License 2 Header should be added to java files
Created attachment 35493 [details] Add patch with digest function xdocs Add patch with digest functions and tests plus function xdocs
Created attachment 35494 [details] Patch with new Digest function and tests
Created attachment 35495 [details] Patch with new Digest function and tests Patch with new Digest function fixed and tests
Hello, I am currently merging the patch but I don't see tests . Can you attach the patch that only contains them ? Thanks
Created attachment 35499 [details] Add patch with tests digest function Add patch with tests digest function
Add tests patch
I merged the function with slight modifications: - Salt is added at end as it seems to be the standard (https://github.com/mozilla/openbadges-backpack/wiki/How-to-hash-&-salt-in-various-languages.) - Completed documentation and stated that spaces are taken into account - Added more tests for spaces Can you review those changes to see if there are issues and to see how to improve your future contributions that I hope will be exist :-) ! Thanks for this great contribution ! For future patches, can you just ensure that you create patch from root of jmeter project. Author: pmouawad Date: Tue Nov 7 08:25:42 2017 New Revision: 1814464 URL: http://svn.apache.org/viewvc?rev=1814464&view=rev Log: Bug 61724 - Add __digest function to provide computing of Hashes (SHA-XXX, MDX) Bugzilla Id: 61724 Added: jmeter/trunk/src/functions/org/apache/jmeter/functions/DigestEncode.java (with props) Modified: jmeter/trunk/src/core/org/apache/jmeter/functions/AbstractFunction.java jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties jmeter/trunk/xdocs/changes.xml jmeter/trunk/xdocs/usermanual/functions.xml
There are 2 errors in jenkins build [checkstyle] /home/jenkins/jenkins-slave/workspace/JMeter-trunk/trunk/src/core/org/apache/jmeter/functions/AbstractFunction.java:152:1: error: File contains tab characters (this is the first instance). [checkstyle] /home/jenkins/jenkins-slave/workspace/JMeter-trunk/trunk/src/functions/org/apache/jmeter/functions/DigestEncode.java:0: error: File does not end with a newline.
Resolved in apache-jmeter-r1814470, build number 6429 Thank you
Author: pmouawad Date: Wed Nov 8 19:44:02 2017 New Revision: 1814627 URL: http://svn.apache.org/viewvc?rev=1814627&view=rev Log: Bug 61724 - Add __digest function to provide computing of Hashes (SHA-XXX, MDX) Add tests Bugzilla Id: 61724
Author: pmouawad Date: Mon Nov 13 20:58:16 2017 New Revision: 1815133 URL: http://svn.apache.org/viewvc?rev=1815133&view=rev Log: Bug 61724 - Add __digest function to provide computing of Hashes (SHA-XXX, MDX) Suffix class with Function Bugzilla Id: 61724 Added: jmeter/trunk/src/functions/org/apache/jmeter/functions/DigestEncodeFunction.java - copied, changed from r1814986, jmeter/trunk/src/functions/org/apache/jmeter/functions/DigestEncode.java Removed: jmeter/trunk/src/functions/org/apache/jmeter/functions/DigestEncode.java Modified: jmeter/trunk/test/src/org/apache/jmeter/functions/TestDigestFunction.java
*** Bug 61763 has been marked as a duplicate of this bug. ***