GetMacBlock() public method

public GetMacBlock ( byte mac ) : void
mac byte
return void
コード例 #1
0
        public int DoFinal(
            byte[]      output,
            int outOff)
        {
            int blockSize = cipher.GetBlockSize();

            // pad with zeroes
            if (this.padding == null)
            {
                while (bufOff < blockSize)
                {
                    Buffer[bufOff++] = 0;
                }
            }
            else
            {
                padding.AddPadding(Buffer, bufOff);
            }

            cipher.ProcessBlock(Buffer, 0, mac, 0);

            cipher.GetMacBlock(mac);

            Array.Copy(mac, 0, output, outOff, macSize);

            Reset();

            return(macSize);
        }
コード例 #2
0
        public int DoFinal(byte[] output, int outOff)
        {
            int blockSize = cipher.GetBlockSize();

            if (padding == null)
            {
                while (bufOff < blockSize)
                {
                    Buffer[bufOff++] = 0;
                }
            }
            else
            {
                padding.AddPadding(Buffer, bufOff);
            }
            cipher.ProcessBlock(Buffer, 0, mac, 0);
            cipher.GetMacBlock(mac);
            global::System.Array.Copy((global::System.Array)mac, 0, (global::System.Array)output, outOff, macSize);
            Reset();
            return(macSize);
        }