sonygod / sharpkit

Automatically exported from code.google.com/p/sharpkit
0 stars 0 forks source link

ref parameter passed to method with ref parameter is unwrapped #191

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
    public static void Encrypt(ref byte[] data, int start, int len, ushort key) {
      for (int i = 0; i < data.Length; i++) {
        data[i] = (byte)(data[i] ^ (key >> 8));
        key = (ushort)((data[i] + key) * c1 + c2);
      }
    }

    public static void Encrypt(ref byte[] data, ushort key) {
      Encrypt(ref data, 0, data.Length, key);
    }

 Encrypt$$Byte$Array$$Int32$$Int32$$UInt16:function(data,start,len,key)
        {
            for(var i=0;i < data.Value.length;i++)
            {
                data.Value[i] = Cast((data.Value[i] ^ (key >> 8)),System.Byte.ctor);
                key = Cast(((data.Value[i] + key) * 52845 + 22719),System.UInt16.ctor);
            }
        },

        Encrypt$$Byte$Array$$UInt16:function(data,key)
        {
            LMNetLib.LowUtils.Encrypt$$Byte$Array$$Int32$$Int32$$UInt16(data.Value,0,data.Value.length,key);
        },

Original issue reported on code.google.com by DanelK...@gmail.com on 10 Aug 2012 at 9:59

GoogleCodeExporter commented 9 years ago

Original comment by DanelK...@gmail.com on 19 Aug 2012 at 8:38