public static String encodeToString(byte[] bytes) {
        char[] encodedChars = encode(bytes);
        return new String(encodedChars);
    }
Encodes the specified byte array to a character array and then returns that character array
as a String.

@param bytes the byte array to Hex-encode.
@return A String representation of the resultant hex-encoded char array.
src/main/java/org/apache/shiro/lang/codec/Hex.java