public static byte[] decode(String hex) {
        return decode(hex.toCharArray());
    }
Converts the specified Hex-encoded String into a raw byte array.  This is a
convenience method that merely delegates to {@link #decode(char[])} using the
argument's hex.toCharArray() value.

@param hex a Hex-encoded String.
@return A byte array containing binary data decoded from the supplied String's char array.
lang/src/main/java/org/apache/shiro/lang/codec/Hex.java