decrypt(data, [pad], [padmode]) -> bytes data : Bytes to be encrypted pad : Optional argument for decryption padding. Must only be one byte padmode : Optional argument for overriding the padding mode. The data must be a multiple of 8 bytes and will be decrypted with the already specifie
(self, data, pad=None, padmode=None)
| 659 | return self.crypt(data, des.ENCRYPT) |
| 660 | |
| 661 | def decrypt(self, data, pad=None, padmode=None): |
| 662 | """decrypt(data, [pad], [padmode]) -> bytes |
| 663 | |
| 664 | data : Bytes to be encrypted |
| 665 | pad : Optional argument for decryption padding. Must only be one byte |
| 666 | padmode : Optional argument for overriding the padding mode. |
| 667 | |
| 668 | The data must be a multiple of 8 bytes and will be decrypted |
| 669 | with the already specified key. In PAD_NORMAL mode, if the |
| 670 | optional padding character is supplied, then the un-encrypted |
| 671 | data will have the padding characters removed from the end of |
| 672 | the bytes. This pad removal only occurs on the last 8 bytes of |
| 673 | the data (last data block). In PAD_PKCS5 mode, the special |
| 674 | padding end markers will be removed from the data after decrypting. |
| 675 | """ |
| 676 | data = self._guardAgainstUnicode(data) |
| 677 | if pad is not None: |
| 678 | pad = self._guardAgainstUnicode(pad) |
| 679 | data = self.crypt(data, des.DECRYPT) |
| 680 | return self._unpadData(data, pad, padmode) |
| 681 | |
| 682 | |
| 683 |
nothing calls this directly
no test coverage detected