Esempio n. 1
0
    // Token: 0x0600030A RID: 778 RVA: 0x0001B008 File Offset: 0x00019208
    public static byte[] smethod_0(string string_0)
    {
        if (string_0 == null)
        {
            throw new Exception();
        }
        MemoryStream memoryStream = new MemoryStream(string_0.Length * 4 / 5);

        byte[] result;
        try
        {
            int  num  = 0;
            uint num2 = 0u;
            foreach (char c in string_0)
            {
                if (c == 'z' && num == 0)
                {
                    Class79.smethod_1(memoryStream, num2, 0);
                }
                else
                {
                    if (c < '!' || c > 'u')
                    {
                        throw new Exception();
                    }
                    checked
                    {
                        num2 += (uint)(unchecked ((ulong)Class79.uint_0[num]) * (ulong)(unchecked ((long)(checked (c - '!')))));
                    }
                    num++;
                    if (num == 5)
                    {
                        Class79.smethod_1(memoryStream, num2, 0);
                        num  = 0;
                        num2 = 0u;
                    }
                }
            }
            if (num == 1)
            {
                throw new Exception();
            }
            if (num > 1)
            {
                for (int j = num; j < 5; j++)
                {
                    checked
                    {
                        num2 += 84u * Class79.uint_0[j];
                    }
                }
                Class79.smethod_1(memoryStream, num2, 5 - num);
            }
            result = memoryStream.ToArray();
        }
        finally
        {
            ((IDisposable)memoryStream).Dispose();
        }
        return(result);
    }