private void encipher ( int [ ] P , int [ ] S , int [ ] lr , int off ) { int i , n , l = lr [ off ] , r = lr [ off + 1 ] ; l ^= P [ 0 ] ; for ( i = 0 ; i <= BLOWFISH_NUM_ROUNDS - 2 ; ) { // Feistel substitution on left word n = S [ ( l >> 24 ) & 0xff ] ; n += S [ 0x100 | ( ( l >> 16 ) & 0xff ) ] ; n ^= S [ 0x200 | ( ( l >> 8 ) & 0xff ) ] ; n += S [ 0x300 | ( l & 0xff ) ] ; r ^= n ^ P [ ++ i ] ; // Feistel substitution on right word n = S [ ( r >> 24 ) & 0xff ] ; n += S [ 0x100 | ( ( r >> 16 ) & 0xff ) ] ; n ^= S [ 0x200 | ( ( r >> 8 ) & 0xff ) ] ; n += S [ 0x300 | ( r & 0xff ) ] ; l ^= n ^ P [ ++ i ] ; } lr [ off ] = r ^ P [ BLOWFISH_NUM_ROUNDS + 1 ] ; lr [ off + 1 ] = l ; }
Blowfish encipher a single 64 - bit block encoded as two 32 - bit halves