Message392789
The problem is that random seed will do
```
if isinstance(a, str):
a = a.encode()
a += _sha512(a).digest()
a = int.from_bytes(a, 'big')
```
and that will modify the bytearray in place.
>>> a = bytearray("1234", "utf-8")
>>> a += b"digest"
>>> a
bytearray(b'1234digest')
IMHO, seed shouldn't modify the input. Since str, and bytes are immutable that will only happen when passing a bytearray which is not consistent. |
|
Date |
User |
Action |
Args |
2021-05-03 10:20:29 | miguendes | set | recipients:
+ miguendes, rhettinger, mark.dickinson, arjaz |
2021-05-03 10:20:29 | miguendes | set | messageid: <1620037229.44.0.0196799679551.issue44018@roundup.psfhosted.org> |
2021-05-03 10:20:29 | miguendes | link | issue44018 messages |
2021-05-03 10:20:29 | miguendes | create | |
|