public static String encodeBase32(byte[] data) {
        return data == null ? null : Base32Hex.encodeAsString(data).toLowerCase();
    }
Encodes a byte array into a base32 String using the base32hex profile.
Implementation is case-insensitive and returns encoded strings in lower case.

@param data a byte array to encode.
@return a base32 encode String.
xmppserver/src/main/java/org/jivesoftware/util/StringUtils.java