When creating a new COSE_Mac with layer 0 having one of the HMAC algorithms and layer 1 using one of the AES-KW algorithms, the encoding fails because the HMAC classes do not define get_key_length() method. Also, the SymmetricKey constructor used after that has out-of-date kwargs so it fails also.