Пример #1
0
        public int encrypt(ref byte[] raw, int offset, int size)
        {
            // reserve checksum
            size += 4;

            // padding
            size += 8 - size % 8;
            NewCrypt.appendChecksum(ref raw, offset, size);
            _crypt.crypt(ref raw, offset, size);

            return(size);
        }
Пример #2
0
        public int staticEncrypt(ref byte[] raw, int offset, int size, uint xorKey)
        {
            // reserve checksum
            size += 4;

            // reserve for XOR "key"
            size += 4;

            // padding
            size += 8 - size % 8;
            NewCrypt.encXORPass(ref raw, offset, size, xorKey);
            _staticCrypt.crypt(ref raw, offset, size);

            return(size);
        }