question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BaseEncoding ignoreCase() option for base16 decoder

See original GitHub issue

When dealing with hex encoded input, I have to handle both lower and uppercase input. Since decoder ist strict, I would have to String.toLowerCase() the input before passing it to the decoder, which is another copy process.

Nicer would be BaseEncoding hex = BaseEncoding.base16().ignoreCase();

Issue Analytics

  • State:open
  • Created 9 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
Glamdringcommented, Aug 12, 2017

It’s certainly non-intuitive that it’s case-sensitive. Which violates the principle of least astonishment

0reactions
garnekecommented, Oct 5, 2017

I don’t understand why this closed in 2015 @haozhun ?
It maybe related to “Allow mixed case in from base functions #2669” but only if you limit your scope to strings. I need to be able to use the encodingStream and decodingStream and I need to be able to accept mixed case input streams for base16 decoding. I can be pretty sure the inputs will be consistent but can have no guaranty that they will be upper or lower cased

Read more comments on GitHub >

github_iconTop Results From Across the Web

java - Lightweight method of decoding base16 (hexadecimals ...
Is there a lightweight method or trick for reading in hexadecimals that may contain mixed case? With lightweight I mean: no copying of...
Read more >
BaseEncoding (Guava: Google Core Libraries for Java 19.0 API)
Decoding rejects characters in the wrong case, though padding is optional. To modify encoding and decoding behavior, use configuration methods to obtain a...
Read more >
RFC 4648: The Base16, Base32, and Base64 Data Encodings
Abstract This document describes the commonly used base 64, base 32, and base 16 encoding schemes. It also discusses the use of line-feeds...
Read more >
basez - base 16/32/64 encode/decode data to standard output
Base32 decoding is case insensitive. Base32hex encoding works the same way as base32 but witn an alternative character-set [0-9a-v] to preserve the encoded ......
Read more >
Format elements | BigQuery - Google Cloud
... string as date and time; Format numeric type as string; About BASE encoding ... HEX encoding alphabet (0~9, case-insensitive a~f), an error...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found