bool UseDefault; // string SecuirtySeed = "000CEBAD"; int PassKeyDefault = 8420; long SerialNumber = 0; string BinaryVersionSerialNumber = ""; int LoopLength = 0; string BinVerSNLast20 = ""; int IntVerSNLast20 = 0; int DigitLoop = 0; int[] DevInfoSerialNumber; Int32 SecuritySeedInt = 0x000CEBAD; Int64 Result; // MessageBox.Show("Serial Number Entered is "+txtSerialNumber.Text); SerialNumber = Convert.ToInt32(txtSerialNumber.Text); lblSerialNumber.Text = SerialNumber.ToString(); BinaryVersionSerialNumber = Convert.ToString(SerialNumber, 2); lblSerialNumberCoded.Text = BinaryVersionSerialNumber.ToString(); LoopLength = BinaryVersionSerialNumber.Length; //Need to know SECURITY SEED 0x000CEBAD BinVerSNLast20 = BinaryVersionSerialNumber.Substring(10, 20); lblTrimmedSerial.Text = BinVerSNLast20.ToString(); IntVerSNLast20 = Convert.ToInt32(BinVerSNLast20); //and it with 5F's // ^ Xor Result = (IntVerSNLast20 ^ SecuritySeedInt); MessageBox.Show(Result.ToString());
Int32 SerialNumber; Int32 Result; SerialNumber = Convert.ToInt32(txtSerialNumber.Text); Result = (SerialNumber & 0x000FFFFF) ^ 0x000CEBAD; MessageBox.Show(Result.ToString());
(X == (X^Y)^Y)
true
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)