2016-06-24 15:38 GMT+02:00 Barry Warsaw <[email protected]>:
>>Expected usage to write portable code::
>>
>>    def my_random(n):
>>        if hasattr(os, 'getrandom'):
>>            return os.getrandom(n, 0)
>>        return os.urandom(n)
>
> I would actually expect that this would be handled in the secrets module, so
> the recommendation would be that most users wouldn't use os.urandom() or
> os.getrandom() unless they specifically wanted the low-level functions and
> knew what they were doing.  Thus, "expected usage to write portable code"
> would be to use secrets.token_bytes().

Oh ok. I will update this section.

Victor
_______________________________________________
Security-SIG mailing list
[email protected]
https://mail.python.org/mailman/listinfo/security-sig

Reply via email to