Miguel Brito <miguel.mdebr...@gmail.com> added the comment:
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. ---------- nosy: +miguendes _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue44018> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com