MCPcopy Create free account
hub / github.com/secdev/scapy / make

Method make

scapy/layers/kerberos.py:569–587  ·  view source on GitHub ↗

Make a signature. :param key: the key to use to make the checksum :param text: the bytes to make a checksum of :param key_usage_number: (optional) specify the key usage number. Guessed otherwise

(self, key, text, key_usage_number=None, cksumtype=None)

Source from the content-addressed store, hash-verified

567 key.verify_checksum(key_usage_number, text, self.checksum.val)
568
569 def make(self, key, text, key_usage_number=None, cksumtype=None):
570 """
571 Make a signature.
572
573 :param key: the key to use to make the checksum
574 :param text: the bytes to make a checksum of
575 :param key_usage_number: (optional) specify the key usage number.
576 Guessed otherwise
577 """
578 if key_usage_number is None:
579 key_usage_number = self.get_usage()
580 self.cksumtype = cksumtype or key.cksumtype
581 self.checksum = ASN1_STRING(
582 key.make_checksum(
583 keyusage=key_usage_number,
584 text=text,
585 cksumtype=self.cksumtype,
586 )
587 )
588
589
590KerberosFlags = ASN1F_FLAGS

Callers 3

make_checksumMethod · 0.45
_fast_wrapMethod · 0.45
tgs_reqMethod · 0.45

Calls 3

get_usageMethod · 0.95
ASN1_STRINGClass · 0.90
make_checksumMethod · 0.45

Tested by

no test coverage detected