mil.dod.th.ose.remote/test/mil/dod/th/ose/remote/api/EncryptionHelper.java
public static String toHex(final byte[] data, final int length)
    {
        final StringBuffer buf = new StringBuffer();
        final String digits = "0123456789abcdef";
        for (int i = 0; i != length; i++)
        {
            final int variName = data[i] & 0xff;//NOCHECKSTYLE '0xff'
            
            buf.append(digits.charAt(variName >> 4));//NOCHECKSTYLE '4'
            buf.append(digits.charAt(variName & 0xf));//NOCHECKSTYLE '0xf'
        }
        
        return buf.toString();
    }
/**
     * Return length many bytes of the passed in byte array as a hex string.
     * 
     * @param data the bytes to be converted.
     * @param length the number of bytes in the data block to be converted.
     * @return a hex representation of length bytes of data.
     */
Return length many bytes of the passed in byte array as a hex string.

@param data the bytes to be converted.
@param length the number of bytes in the data block to be converted.
@return a hex representation of length bytes of data.
Return length many bytes of the passed in byte array as a hex string . @param data the bytes to be converted . @param length the number of bytes in the data block to be converted . @return a hex representation of length bytes of data .
public static String toHex(final byte[] data, final int length)
    {
        final StringBuffer buf = new StringBuffer();
        final String digits = "0123456789abcdef";
        for (int i = 0; i != length; i++)
        {
            final int variName = data[i] & 0xff;
            buf.append(digits.charAt(variName >> 4));
            buf.append(digits.charAt(variName & 0xf));
        }
        return buf.toString();
    }
public static String toHex ( final byte [ ] data , final int length ) { final StringBuffer buf = new StringBuffer ( ) ; final String digits = "0123456789abcdef" ; for ( int i = 0 ; i != length ; i ++ ) { final int variName = data [ i ] & 0xff ; buf . append ( digits . charAt ( variName >> 4 ) ) ; buf . append ( digits . charAt ( variName & 0xf ) ) ; } return buf . toString ( ) ; }
Return length many bytes of the passed in byte array as a hex string.
Return length many bytes of the passed in byte array as a hex string .
//NOCHECKSTYLE '0xff' //NOCHECKSTYLE '4' //NOCHECKSTYLE '0xf'