62 questions
0 votes
1 answer
279 views
No exception thrown from Base32 after commons-codec upgrade
I have a TOTP Authenticator project which generates a six-digit one-time password using TOTP (RFC 6238). Internally it uses Base32 class from Apache Commons Codec: Base32 base32 = new Base32(); ...
1 vote
0 answers
409 views
How to use java.util.Base64 instead of Base64OutputSteam to decode a stream of characters to byte array?
I'm currently using a stream based approach to convert incoming Base64 characters to a byte[] using the Apache commons-codec class org.apache.commons.codec.binary.Base64OutputStream. import java.io....
0 votes
0 answers
440 views
Maven transitive dependency on system scoped dependency
I have a spring boot project (2.1.3) in which I had to add a jar file supplied by one of our partners (Referred with com.aesenc group id). I added it as a system scoped dependency even though it is ...
2 votes
1 answer
470 views
Is MacOS Catalina stripping executable file permissions in zip files?
I have created a zip file using OpenJDK 11 and Apache Commons Compress 1.20 which is returned by an API using a Netty server. This zip file contains a gradle wrapper that has executable file ...
0 votes
2 answers
792 views
OutOfMemoryError with apache commons Base64 static method decodeBase64
While decoding an Base64 encoded string to byte array (Have to do this as I have a key which can act on byte array to decrypt), I am getting outOfMemory. What are the effective ways to handle this ...
0 votes
0 answers
760 views
Cannot compute SHA-512 with DigestUtils
I have a function to compute SHA-512 digest. public Hash hash(byte[] data) { return new Hash(org.apache.commons.codec.digest.DigestUtils.sha512(data)); } It gives me the following error The ...
0 votes
2 answers
70 views
After trying to decode Base64, reciving E/AndroidRuntime: FATAL EXCEPTION: main
I´m building a simple app for android 4.4 and up, i have a method to decode base64 string using the apache-commons-codec library. import org.apache.commons.codec.binary.Base64; public static String ...
0 votes
1 answer
247 views
Apache common codec - Why Hex.encode() isn't static?
Base64 have many static encode methods returning byte[] as Base64.encodeBase64(stringToEncode.getBytes(StandardCharsets.UTF_8.name())); Also MessageDigest using static getInstance to encode/digest ...
1 vote
1 answer
7k views
Base64 cannot be resolved (Java 1.7)
I have the following snippet and I have some unresolved classes - mainly, Base64 String auth = username + ":" + password; byte[] encodedAuth = Base64.encodeBase64(auth.getBytes(StandardCharsets....
0 votes
1 answer
3k views
Base 64 encoding an image file in Groovy using Apache Commons
I am trying to encode an image file to a Base64 String using the directions on this site. The only difference is I have a groovy script (instead of Java), my entire script is just.... @Grapes( @...
2 votes
1 answer
424 views
Android v1p1beta1 Speech - java.lang.NoSuchMethodError: No static method decodeBase64
When I build test speech app with Android Studio using google v1 speech library it works fine. Using v1p1beta1 speech library, a run time error occurs when it accesses the json credentials file and ...
1 vote
0 answers
234 views
How to get two-sequence representation of UTF-8 character using JavaMail's MimeUtility or Apache Commons and quoted-printable?
I'm having a string which contains the German ü character. Its UTF value is 0xFC, but its quoted-printable sequence should actually be =C3=BC instead of =FC. However, using JavaMail's MimeUtility like ...
0 votes
1 answer
84 views
Using different encoder/decoder to convert binary to base64
Will using one type of encoder, to encode a binary message to base64(like the default one with jvm) and another(like apache commons codec) to decode this string to binary affect consistency of results?...
0 votes
0 answers
470 views
Issues with Hex.encodeHexString(byte[] hexStringByteArray);
I was used Hex.encodeHexString(byte[] hexStringByteArray); api for convert byte array to String but in two different situations not able to get the excepted values. Excepted String tcpPort = "1443"; ...
0 votes
1 answer
6k views
Java Exceptions: Inappropriate key specification and short read of DER length
Using Base64 functions from the Apache Commons API and working with DSA I am trying to load a base 64 encoded public key from a file here is the method being used /** * Load a base-64 encoded public ...