Message272867
| Author |
vstinner |
| Recipients |
vstinner |
| Date |
2016年08月16日.17:25:40 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1471368341.7.0.188364803995.issue27778@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Attached patch adds os.getrandom(): thin wrapper on the Linux getrandom() syscall.
os.getrandom() can return less bytes than requested.
The patch is incomplete: it doesn't include documentation.
I chose to not implement a loop to not loose entropy if a following call fails (ex: fail with EINTR). Rationale:
https://mail.python.org/pipermail/security-sig/2016-July/000072.html
We should also add Solaris support later.
See also #27776: "PEP 524: Make os.urandom() blocking on Linux". |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2016年08月16日 17:25:41 | vstinner | set | recipients:
+ vstinner |
| 2016年08月16日 17:25:41 | vstinner | set | messageid: <1471368341.7.0.188364803995.issue27778@psf.upfronthosting.co.za> |
| 2016年08月16日 17:25:41 | vstinner | link | issue27778 messages |
| 2016年08月16日 17:25:41 | vstinner | create |
|