Class Block.mac
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.
method add_substring : bytes -> int -> int -> unitadd_substring b pos lenaddslencharacters from byte arrayb, starting at character numberpos, to the running hash computation.
method add_string : string -> unitadd_string stradds all characters of stringstrto the running hash computation.
method add_byte : int -> unitadd_byte badds the character having codebto the running hash computation.bmust be between0and255inclusive.
method result : stringTerminate the hash computation and return the hash value for the input data provided via the
add_*methods. The hash value is a string of lengthhash_sizecharacters. After callingresult, the hash can no longer accept additional data. Hence, do not call any of theadd_*methods afterresult.
method wipe : unitErase all internal buffers and data structures of this hash, overwriting them with zeroes. See
Cryptokit.transform.wipe.