CSPspEmu.Hle.Formats.EncryptedPrx.Scramble C# (CSharp) Method

Scramble() protected method

protected Scramble ( uint buf, int size, int code ) : int
buf uint
size int
code int
return int
        protected int Scramble(uint* buf, int size, int code)
        {
            buf[0] = 5;
            buf[1] = buf[2] = 0;
            buf[3] = (uint)code;
            buf[4] = (uint)size;

            if (Kirk.hleUtilsBufferCopyWithRange((byte*)buf, size + 0x14, (byte *)buf, size + 0x14, Kirk.CommandEnum.PSP_KIRK_CMD_DECRYPT) != Kirk.ResultEnum.OK)
            {
                return -1;
            }

            return 0;
        }