clarify the siphash key is hardcoded
This commit is contained in:
parent
b2c6a25160
commit
797616c1c6
12
pep-0552.txt
12
pep-0552.txt
|
@ -60,12 +60,12 @@ version. One magic number will correspond to the current pyc format and the
|
|||
other to "hash-based" pycs introduced by this PEP.
|
||||
|
||||
In hash-based pycs, the second field in the pyc header (currently the
|
||||
"timestamp" field) will contain the SipHash_ of the contents of the source
|
||||
file. Another a fast hash like MD5 or BLAKE2_ would also work. We choose SipHash
|
||||
because Python already has a builtin implementation of it from :pep:`456`. The
|
||||
third field in the pyc header (currently the "source size" field) will become a
|
||||
bitset of flags. We define the lowest flag in this bitset called
|
||||
``check_source``
|
||||
"timestamp" field) will contain the SipHash_ (with a hardcoded key) of the
|
||||
contents of the source file. Another a fast hash like MD5 or BLAKE2_ would also
|
||||
work. We choose SipHash because Python already has a builtin implementation of
|
||||
it from :pep:`456`. The third field in the pyc header (currently the "source
|
||||
size" field) will become a bitset of flags. We define the lowest flag in this
|
||||
bitset called ``check_source``
|
||||
|
||||
When Python encounters a hash-based pyc, its behavior depends on the setting of
|
||||
the ``check_source`` flag. If the ``check_source`` flag is set, Python will
|
||||
|
|
Loading…
Reference in New Issue