I'm trying to solve this challenge but I can't understand the algorithm.
it takes the name and generate the serial with this algoritm
private int Encrypt(string Input)
{
int num = 0;
checked
{
int num2 = Input.Length - 1;
int num3 = num;
int num6;
for (;;)
{
int num4 = num3;
int num5 = num2;
if (num4 > num5)
{
break;
}
char @string = Conversions.ToChar(Input.Substring(num3));
num6 = (int)Math.Round(unchecked(Conversions.ToDouble(Conversion.Oct(Strings.Asc(Conversions.ToString(num6))) + Conversion.Oct(Strings.Asc(@string))) + 666.0));
num3++;
}
return num6;
}
}
for example, I entered 'A' and calculated serial as shown: num6 = octal + octal + decimal
‘A’ = 65 = 101 in octal
666 = 1232 in octal
num6 = 0
num6: Octal = 0 + 101 + 1232 = 1333
Decimal = 731
but the output is : 60767
How?