You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jmeter.apache.org by bu...@apache.org on 2017/11/05 12:22:53 UTC

[Bug 61724] New: Add __sha1 and __sha256 functions

https://bz.apache.org/bugzilla/show_bug.cgi?id=61724

            Bug ID: 61724
           Summary: Add __sha1 and __sha256 functions
           Product: JMeter
           Version: 3.3
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Main
          Assignee: issues@jmeter.apache.org
          Reporter: orimarko@gmail.com
  Target Milestone: ---

Created attachment 35486
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=35486&action=edit
patch

Add __sha1 and __sha256 functions to JMeter

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 61724] Add digest function

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61724

orimarko <or...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW

--- Comment #10 from orimarko <or...@gmail.com> ---
Add tests patch

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 61724] Add __sha1 and __sha256 functions

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61724

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO
                 CC|                            |p.mouawad@ubik-ingenierie.c
                   |                            |om

--- Comment #3 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
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

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 61724] Add __digest function to provide computing of Hashes (SHA-XXX, MDX)

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61724

orimarko <or...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|REOPENED                    |RESOLVED

--- Comment #13 from orimarko <or...@gmail.com> ---
Resolved in apache-jmeter-r1814470, build number 6​42​9

Thank you

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 61724] Add __digest function to provide computing of Hashes (SHA-XXX, MDX)

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61724

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Add digest function to      |Add __digest function to
                   |provide computing of Hashes |provide computing of Hashes
                   |(SHA-XXX, MDX)              |(SHA-XXX, MDX)

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 61724] Add digest function

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61724

--- Comment #9 from orimarko <or...@gmail.com> ---
Created attachment 35499
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=35499&action=edit
Add patch with tests digest function

Add patch with tests digest function

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 61724] Add __sha1 and __sha256 functions

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61724

--- Comment #6 from orimarko <or...@gmail.com> ---
Created attachment 35494
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=35494&action=edit
Patch with new Digest function and tests

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 61724] Add __digest function to provide computing of Hashes (SHA-XXX, MDX)

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61724

--- Comment #16 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
*** Bug 61763 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 61724] Add __digest function to provide computing of Hashes (SHA-XXX, MDX)

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61724

--- Comment #15 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
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

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 61724] Add __sha1 and __sha256 functions

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61724

orimarko <or...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 61724] Add __sha1 and __sha256 functions

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61724

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |PatchAvailable

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 61724] Add digest function

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61724

orimarko <or...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Add __sha1 and __sha256     |Add digest function
                   |functions                   |

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 61724] Add __sha1 and __sha256 functions

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61724

orimarko <or...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #35486|0                           |1
        is obsolete|                            |

--- Comment #1 from orimarko <or...@gmail.com> ---
Created attachment 35487
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=35487&action=edit
Patch with added two functions and tests

Attached Patch with added two functions and tests

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 61724] Add __sha1 and __sha256 functions

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61724

--- Comment #4 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
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

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 61724] Add __sha1 and __sha256 functions

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61724

orimarko <or...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #35487|0                           |1
        is obsolete|                            |

--- Comment #2 from orimarko <or...@gmail.com> ---
Created attachment 35488
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=35488&action=edit
Add patch with 2 functions and tests

Add patch with 2 functions and tests

-- 
You are receiving this mail because:
You are the assignee for the bug.

Re: [Bug 61724] Add __sha1 and __sha256 functions

Posted by Eduard la Grange <ed...@automytest.com>.



On Mon, Nov 6, 2017 at 9:14 AM +0200, <bu...@apache.org> wrote:










https://bz.apache.org/bugzilla/show_bug.cgi?id=61724

orimarko  changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #35494|0                           |1
        is obsolete|                            |

--- Comment #7 from orimarko  ---
Created attachment 35495
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=35495&action=edit
Patch with new Digest function and tests

Patch with new Digest function fixed and tests

-- 
You are receiving this mail because:
You are the assignee for the bug.





[Bug 61724] Add __sha1 and __sha256 functions

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61724

orimarko <or...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #35494|0                           |1
        is obsolete|                            |

--- Comment #7 from orimarko <or...@gmail.com> ---
Created attachment 35495
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=35495&action=edit
Patch with new Digest function and tests

Patch with new Digest function fixed and tests

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 61724] Add __sha1 and __sha256 functions

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61724

orimarko <or...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #35488|0                           |1
        is obsolete|                            |

--- Comment #5 from orimarko <or...@gmail.com> ---
Created attachment 35493
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=35493&action=edit
Add patch with digest function xdocs

Add patch with digest functions and tests plus function xdocs

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 61724] Add __digest function to provide computing of Hashes (SHA-XXX, MDX)

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61724

--- Comment #14 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
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

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 61724] Add __digest function to provide computing of Hashes (SHA-XXX, MDX)

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61724

orimarko <or...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |---

--- Comment #12 from orimarko <or...@gmail.com> ---
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.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 61724] Add __digest function to provide computing of Hashes (SHA-XXX, MDX)

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61724

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #11 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
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

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 61724] Add digest function to provide computing of Hashes (SHA-XXX, MDX)

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61724

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Add digest function         |Add digest function to
                   |                            |provide computing of Hashes
                   |                            |(SHA-XXX, MDX)

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 61724] Add digest function

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61724

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #8 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Hello,
I am currently merging the patch but I don't see tests .
Can you attach the patch that only contains them ?
Thanks

-- 
You are receiving this mail because:
You are the assignee for the bug.