예제 #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
파일: XRC4Cipher.cs 프로젝트: Xijezu/XChat
        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;
        }