BaseEncoding ignoreCase() option for base16 decoder
See original GitHub issueWhen 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:
- Created 9 years ago
- Comments:9 (2 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It’s certainly non-intuitive that it’s case-sensitive. Which violates the principle of least astonishment
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