internal static string EncodeHexStringFromInt(byte[] sArray) {
String result = null;
if(sArray != null) {
char[] hexOrder = new char[sArray.Length * 2];
int i = sArray.Length;
int digit, j=0;
while (i-- > 0) {
digit = (sArray[i] & 0xf0) >> 4;
hexOrder[j++] = HexDigit(digit);
digit = sArray[i] & 0x0f;
hexOrder[j++] = HexDigit(digit);
}
result = new String(hexOrder);
}
return result;
}