Org.BouncyCastle.Crypto.Engines.Cast6Engine.DecryptBlock C# (CSharp) Method

DecryptBlock() private method

private DecryptBlock ( byte src, int srcIndex, byte dst, int dstIndex ) : int
src byte
srcIndex int
dst byte
dstIndex int
return int
        internal override int DecryptBlock(
            byte[]	src,
            int		srcIndex,
            byte[]	dst,
            int		dstIndex)
        {
            // process the input block
            // batch the units up into 4x32 bit chunks and go for it
            uint A = Pack.BE_To_UInt32(src, srcIndex);
            uint B = Pack.BE_To_UInt32(src, srcIndex + 4);
            uint C = Pack.BE_To_UInt32(src, srcIndex + 8);
            uint D = Pack.BE_To_UInt32(src, srcIndex + 12);
            uint[] result = new uint[4];
            CAST_Decipher(A, B, C, D, result);
            // now stuff them into the destination block
            Pack.UInt32_To_BE(result[0], dst, dstIndex);
            Pack.UInt32_To_BE(result[1], dst, dstIndex + 4);
            Pack.UInt32_To_BE(result[2], dst, dstIndex + 8);
            Pack.UInt32_To_BE(result[3], dst, dstIndex + 12);
            return BLOCK_SIZE;
        }