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)
| 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 | |
| 590 | KerberosFlags = ASN1F_FLAGS |
no test coverage detected