Skip to content

Conversation

@jmetertea
Copy link
Contributor

Description

New function : Allow easy HEX and Base64 encode / Decode
_encodeDecode(string, mode,output variable) where mode is:
BASE64_ENCODE
BASE64_DECODE
HEX_ENCODE
HEX_DECODE

Motivation and Context

Bug 61801 - New function : Allow easy HEX and Base64 encode / Decode

How Has This Been Tested?

Java JUnit tests

Screenshots (if appropriate):

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist:

  • My code follows the code style of this project.
  • I have updated the documentation accordingly.

Bug 61801 - New function : Allow easy HEX and Base64 encode / Decode
Bug 61801 - New function : Allow easy HEX and Base64 encode / Decode
New function HEX and Base64
@FSchumacher
Copy link
Contributor

Most implementations of those en-/decoders, that I know of, are restricted to one direction, only. This function works in both directions, which might be a bit confusing.

Why not use base64_decode, base64_encode, hex_decode and hex_encode (or leaving out the underscore to be in sync with urldecode and urlencode.

If we really want to have one encoder/decoder, would it be better to separate this at least into two functions?

@jmetertea
Copy link
Contributor Author

@FSchumacher The enhancement created by Philippe Mouawad
I personally think that there are many functions and we shouldn't split this to two functions.
original request: https://bz.apache.org/bugzilla/show_bug.cgi?id=61801

@vlsi
Copy link
Collaborator

vlsi commented Oct 7, 2019

@jmetertea ,

  1. please use human-readable PR names. Current "Patch 13" is obscure.
  2. please refrain from pushing more commits here until the design of the feature is agreed. The current design of a single function for both encoding and decoding would likely be never committed.

@jmetertea jmetertea changed the title Patch 13 Bug 61801 HEX and Base64 function Oct 7, 2019
@pmouawad
Copy link
Contributor

Hello,
Thanks for this PR.
Can you open discussion on dev mailing list referencing it as a proposal ?
Closing it as it won't be merged as is.

Thanks

@pmouawad pmouawad closed this Oct 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants