This is from #81. The bstr is necessary to convert the data for the CMAC if a bytearray was input.