def test_makeMAC(self):
        """
        L{SSHCiphers.makeMAC} computes the HMAC of an outgoing SSH message with
        a particular sequence id and content data.
        """
        # Use the test vectors given in the appendix of RFC 2104.
        vectors = [
            (b"\x0b" * 16, b"Hi There",
             b"9294727a3638bb1c13f48ef8158bfc9d"),
            (b"Jefe", b"what do ya want for nothing?",
             b"750c783e6ab0b503eaa86e310a5db738"),
            (b"\xAA" * 16, b"\xDD" * 50,
             b"56be34521d144c88dbb8c733f0e8b3f6"),
            ]

        for key, data, mac in vectors:
            outMAC = transport.SSHCiphers(b'none', b'none', b'hmac-md5',
                                          b'none')
            outMAC.outMAC = outMAC._getMAC(b"hmac-md5", key)
            (seqid,) = struct.unpack('>L', data[:4])
            shortened = data[4:]
            self.assertEqual(
                mac, binascii.hexlify(outMAC.makeMAC(seqid, shortened)),
                "Failed HMAC test vector; key=%r data=%r" % (key, data))

        L{SSHCiphers.makeMAC} computes the HMAC of an outgoing SSH message with
        a particular sequence id and content data.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/conch/test/test_transport.py