Populate paChecksum and paChecksum2
(self, text, h="sha256")
| 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 | """ |
no test coverage detected