Briefly, look code here and here
This library was inspired by problem with Apache Commons Codec library in Android. We noticed that we often use a small part of this library. This small part can be extracted to one little class
Here is part of according stacktrace in Android
java.lang.NoSuchMethodError: No static method encodeHexString([B)Ljava/lang/String; in class Lorg/apache/commons/codec/binary/Hex; or its super classes (declaration of 'org.apache.commons.codec.binary.Hex' appears in /system/framework/org.apache.http.legacy.boot.jar) at org.apache.commons.codec.digest.DigestUtils.sha512Hex(DigestUtils.java:720)
Here is the link to SO about this problem
Here is the very nice deep explanation of the problem.
The solution is to avoid using apache.commons.codec library. It is usually used only to calculate MD5, SHA512 or SHA1 digest in Android or other Java project.
This project shows how to calculate digests using native Java SDK without any dependency
The only class you need is here