Bug 61801 - New function : Allow easy HEX and Base64 encode / Decode
Summary: New function : Allow easy HEX and Base64 encode / Decode
Status: RESOLVED WONTFIX
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: Main (show other bugs)
Version: 3.3
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-22 21:39 UTC by Philippe Mouawad
Modified: 2019-10-07 07:16 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Mouawad 2017-11-22 21:39:43 UTC
_encodeDecode(string, mode,output variable) where mode is:
BASE64_ENCODE
BASE64_DECODE
HEX_ENCODE
HEX_DECODE
Comment 1 Felix Schumacher 2019-10-06 10:55:18 UTC
Implementation provided with https://github.com/apache/jmeter/pull/530

I wonder, whether one function to encode and decode with a switch is a good design. This is probably driven by the notion that too many functions are already available.

This might be a good starting point to discuss how we can organize functions, that there are not too many functions visible at the same time (in the docs, in the code, in ...).
Comment 2 Vladimir Sitnikov 2019-10-07 07:07:25 UTC
I agree with Felix, we should not combine unrelated functions under a single name.

How base64 is related to hex?
What if the user wants upper case or lower case hex?

If the listed base64/hex encode/decode are required in core (?), they should be 4 distinct functions rather than a single one.

On top of that, it is not clear why input of encodeDecode is String.
Typically base64 is used to encode byte[] rather than a sting.
Comment 3 Philippe Mouawad 2019-10-07 07:14:49 UTC
Hello,
I created this bugzilla a bit rapidly, when I further thought about it to implement it , it looked less useful particularly when decoding to binary.

So I close it as is.
Let's discuss this before

Regards
Comment 4 Vladimir Sitnikov 2019-10-07 07:16:03 UTC
I guess it is perfectly fine to have a bug id (so we can discuss it).

However, I don't feel the feature is ready for implementation yet.
Comment 5 The ASF infrastructure team 2022-09-24 20:38:11 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/4605