G
Guest
I am trying to create an encryption routine (although VERY basic I know), but
I am getting a "input string was not in a correct format" error and not sure
what I am doing wrong. All my variables are int. iNumber is the value
passed into the function. The error is happening on the first line of the
code posted below.
int iHex1 = (int)System.Convert.ToUInt32("&H10000000");
int iHex2 = (int)System.Convert.ToUInt32("&H100000");
..
..
..
iXORValue = iNumber ^ iKey;
iCheckSumTemp = iXORValue / iHex1;
iCheckSum = iCheckSumTemp % iHex1;
..
..
..
return iXORValue.ToString() + "-" + iCheckSum.ToString();
Thanks for any help
Andy
I am getting a "input string was not in a correct format" error and not sure
what I am doing wrong. All my variables are int. iNumber is the value
passed into the function. The error is happening on the first line of the
code posted below.
int iHex1 = (int)System.Convert.ToUInt32("&H10000000");
int iHex2 = (int)System.Convert.ToUInt32("&H100000");
..
..
..
iXORValue = iNumber ^ iKey;
iCheckSumTemp = iXORValue / iHex1;
iCheckSum = iCheckSumTemp % iHex1;
..
..
..
return iXORValue.ToString() + "-" + iCheckSum.ToString();
Thanks for any help
Andy