(self)
| 1011 | |
| 1012 | |
| 1013 | def _init_decrypter(self): |
| 1014 | self._decrypter = _ZipDecrypter(self._pwd) |
| 1015 | # The first 12 bytes in the cypher stream is an encryption header |
| 1016 | # used to strengthen the algorithm. The first 11 bytes are |
| 1017 | # completely random, while the 12th contains the MSB of the CRC, |
| 1018 | # or the MSB of the file time depending on the header type |
| 1019 | # and is used to check the correctness of the password. |
| 1020 | header = self._fileobj.read(12) |
| 1021 | self._compress_left -= 12 |
| 1022 | return self._decrypter(header)[11] |
| 1023 | |
| 1024 | def __repr__(self): |
| 1025 | result = ['<%s.%s' % (self.__class__.__module__, |
no test coverage detected