# Class Cryptokit.Block.mac

    class mac : ?iv:string -> ?pad:Cryptokit.Padding.scheme -> block_cipher -> Cryptokit.hash

Build a MAC (keyed hash function) from the given block cipher. The block cipher is run in CBC mode, and the MAC value is the final value of the initialization vector. Thus, the hash size of the resulting hash is the block size of the block cipher. The optional argument `iv` specifies the first initialization vector, with a default of all zeroes. The optional argument `pad` specifies a padding scheme to be applied to the input data; if not provided, no padding is performed.