BCrypt.Net.BCrypt.Key C# (CSharp) Method

Key() private method

Key the Blowfish cipher.
private Key ( byte keyBytes ) : void
keyBytes byte The key byte array.
return void
        private void Key(byte[] keyBytes)
        {
            int i;
            int koffp = 0;
            uint[] lr = { 0, 0 };
            int plen = _P.Length, slen = _S.Length;

            for (i = 0; i < plen; i++)
                _P[i] = _P[i] ^ StreamToWord(keyBytes, ref koffp);

            for (i = 0; i < plen; i += 2)
            {
                Encipher(lr, 0);
                _P[i] = lr[0];
                _P[i + 1] = lr[1];
            }

            for (i = 0; i < slen; i += 2)
            {
                Encipher(lr, 0);
                _S[i] = lr[0];
                _S[i + 1] = lr[1];
            }
        }