MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / _init_decrypter

Method _init_decrypter

tools/python-3.11.9-amd64/Lib/zipfile.py:881–890  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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__,

Callers 2

__init__Method · 0.95
seekMethod · 0.95

Calls 2

_ZipDecrypterFunction · 0.85
readMethod · 0.45

Tested by

no test coverage detected