示例#1
0
        private void tryCipher(ref byte[] pSource, int off, ref byte[] pTarget, int len)
        {
            RC4Cipher.State ss = new RC4Cipher.State();
            ss.m_nBox = new byte[256];
            rc4.m_state.m_nBox.CopyTo(ss.m_nBox, 0);
            ss.x = rc4.m_state.x;
            ss.y = rc4.m_state.y;

            rc4.code(ref pSource, off, ref pTarget, len);

            ss.m_nBox.CopyTo(rc4.m_state.m_nBox, 0);
            rc4.m_state.x = ss.x;
            rc4.m_state.y = ss.y;
        }
示例#2
0
        private void tryCipher(ref byte[] pSource, int off, ref byte[] pTarget, int len)
        {
            RC4Cipher.State ss = new RC4Cipher.State();
            ss.m_nBox = new byte[256];
            rc4.m_state.m_nBox.CopyTo(ss.m_nBox, 0);
            ss.x = rc4.m_state.x;
            ss.y = rc4.m_state.y;

            rc4.code(ref pSource, off, ref pTarget, len);

            ss.m_nBox.CopyTo(rc4.m_state.m_nBox, 0);
            rc4.m_state.x = ss.x;
            rc4.m_state.y = ss.y;
        }