(self)
| 879 | |
| 880 | |
| 881 | def _init_decrypter(self): |
| 882 | self._decrypter = _ZipDecrypter(self._pwd) |
| 883 | # The first 12 bytes in the cypher stream is an encryption header |
| 884 | # used to strengthen the algorithm. The first 11 bytes are |
| 885 | # completely random, while the 12th contains the MSB of the CRC, |
| 886 | # or the MSB of the file time depending on the header type |
| 887 | # and is used to check the correctness of the password. |
| 888 | header = self._fileobj.read(12) |
| 889 | self._compress_left -= 12 |
| 890 | return self._decrypter(header)[11] |
| 891 | |
| 892 | def __repr__(self): |
| 893 | result = ['<%s.%s' % (self.__class__.__module__, |
no test coverage detected