private static String toHex(final byte[] data)
	{
		final StringBuffer buf = new StringBuffer();
		for (final byte element: data)
		{
			int halfbyte = (element >>> 4) & 0x0F;
			int two_halfs = 0;
			do
			{
				if ((0 <= halfbyte) && (halfbyte <= 9))
				{
					buf.append((char) ('0' + halfbyte));
				}
				else
				{
					buf.append((char) ('a' + (halfbyte - 10)));
				}
				halfbyte = element & 0x0F;
			}
			while (two_halfs++ < 1);
		}
		return buf.toString();
	}