### Spritz (RC4) for different N

Hello everybody,

I try to run the algorithm injection (successor RC4) with N = 8 (or different N). Property here already the appropriate functions with mod extended.
Would anyone know what I have to pay attention. and how would I have to change the functions Absorb, AbsorbByte and AbsorbNibble?

 ``123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566`` `````` void Spritz::spritz_absorb_stop(State *state) { unsigned char mod1 = getN(); if (state->a == getN() / 2) { spritz_shuffle(state); } state->a++; state->a = state->a % mod1; } void Spritz::spritz_absorb_nibble(State *state, const unsigned char x) { unsigned char y; unsigned char mod1 = getN(); if (state->a == getN() / 2) { spritz_shuffle(state); } y = getN() / 2 + x; y = y % mod1; std::swap( state->s[state->a], state->s[y] ); state->a++; state->a = state->a % mod1; } void Spritz::spritz_absorb_byte(State *state, const unsigned char b) { if ( getN() == 4 ) { unsigned char low = ( b & 1 ); unsigned char high = ( b >> 1 ); spritz_absorb_nibble(state, low ); spritz_absorb_nibble(state, high ); } else if ( getN() == 6 ) { assert(false); spritz_absorb_nibble(state, ( b % m_D )); spritz_absorb_nibble(state, ( static_cast( static_cast(b) / static_cast(m_D) ) ) ); } else if ( getN() == 8 ) { spritz_absorb_nibble(state, ( b & 3 )); spritz_absorb_nibble(state, ( b >> 2 )); } else assert(false); } void Spritz::spritz_absorb(State *state, const unsigned char *msg, size_t length) { size_t v; for (v = 0; v < length; v++) { spritz_absorb_byte(state, msg[v]); } }``````