PRIX DE LA FONCTION BINHEX LA PLUS DEBILE DU MONDE, CATEGORIE HORS CONCOURS AVEC FELICITATIONS DU JURY
@SuppressLint( "DefaultLocale" ) class GenericFunctions {
/**
* Converts a byte array into a String.
* @param inBuffer Byte array to convert.
* @return String representing a byte array.
*/
public String hexConvert(byte[] inBuffer) {
String vStr, outStrBuffer = "";
for (int vI=0; vI<inBuffer.length; vI++) {
vStr = Integer.toHexString(inBuffer[vI] & 0xff);
vStr = String.format("%2s", vStr).replace(' ', '0');
outStrBuffer += vStr;
if (vI < (inBuffer.length - 1)) {
outStrBuffer += " ";
}
}
Locale vLocale = Locale.getDefault();
outStrBuffer = outStrBuffer.toUpperCase( vLocale );
return outStrBuffer;
}
}