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

Method make_checksum

scapy/layers/kerberos.py:1388–1397  ·  view source on GitHub ↗

Populate paChecksum and paChecksum2

(self, text, h="sha256")

Source from the content-addressed store, hash-verified

1386 )
1387
1388 def make_checksum(self, text, h="sha256"):
1389 """
1390 Populate paChecksum and paChecksum2
1391 """
1392 # paChecksum (always sha-1)
1393 self.paChecksum = ASN1_STRING(Hash_SHA().digest(text))
1394
1395 # paChecksum2
1396 self.paChecksum2 = PAChecksum2()
1397 self.paChecksum2.make(text, h=h)
1398
1399 def verify_checksum(self, text):
1400 """

Callers 6

makeMethod · 0.45
as_reqMethod · 0.45
GSS_GetMICExMethod · 0.45
GSS_VerifyMICExMethod · 0.45
GSS_WrapExMethod · 0.45
GSS_UnwrapExMethod · 0.45

Calls 5

ASN1_STRINGClass · 0.90
Hash_SHAClass · 0.90
PAChecksum2Class · 0.85
digestMethod · 0.45
makeMethod · 0.45

Tested by

no test coverage detected