Org.BouncyCastle.Crypto.Engines.RC532Engine.EncryptBlock C# (CSharp) Method

EncryptBlock() private method

private EncryptBlock ( byte input, int inOff, byte outBytes, int outOff ) : int
input byte
inOff int
outBytes byte
outOff int
return int
        private int EncryptBlock(
            byte[]  input,
            int     inOff,
            byte[]  outBytes,
            int     outOff)
        {
            int A = BytesToWord(input, inOff) + _S[0];
            int B = BytesToWord(input, inOff + 4) + _S[1];

            for (int i = 1; i <= _noRounds; i++)
            {
                A = RotateLeft(A ^ B, B) + _S[2*i];
                B = RotateLeft(B ^ A, A) + _S[2*i+1];
            }

            WordToBytes(A, outBytes, outOff);
            WordToBytes(B, outBytes, outOff + 4);

            return 2 * 4;
        }