Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
503ce8e491 | ||
|
|
59dd4d922f |
No files matched your search
@@ -125,7 +125,7 @@ Constants (per module): NAME, KEYBYTES, NONCEBYTES, MACBYTES, MACBYTES_LONG, RAT
|
||||
|
||||
### Random Generator (CSPRNG)
|
||||
|
||||
Seeded once from the OS with random key and nonce, then a cryptographically secure AEGIS keystream: each call increments the nonce, so no output block ever repeats. `random_key()` and `random_nonce()` draw from it. The into variant can directly fill Numpy integer arrays and other structures that support Buffer API, making it far faster than any alternatives (e.g. Numpy's own random module).
|
||||
Seeded once from the OS, then a cryptographically secure AEGIS keystream with thread local key/nonce making it thread safe. `random_key()` and `random_nonce()` draw from it. The into variant can directly fill Numpy integer arrays and other structures that support Buffer API, making it far faster than any alternatives (e.g. Numpy's own random module).
|
||||
|
||||
- random().bytes(n) -> bytearray
|
||||
- random().into(buffer) -> None
|
||||
|
||||
@@ -104,6 +104,9 @@ class FileStorage:
|
||||
flags = os.O_RDWR | os.O_CREAT | os.O_EXCL
|
||||
else:
|
||||
raise ValueError(f"Unsupported mode: {mode}")
|
||||
# O_BINARY (Windows only): keep the CRT from translating \r\n in
|
||||
# binary data, which corrupts ciphertext and shifts offsets
|
||||
flags |= getattr(os, "O_BINARY", 0)
|
||||
self._fd = os.open(path, flags, 0o644)
|
||||
self._closed = False
|
||||
self._lock = threading.Lock()
|
||||
|
||||
@@ -305,6 +305,11 @@ def run_benchmark(wheel: Path, py_version: str) -> bool:
|
||||
|
||||
def main():
|
||||
"""Build wheels for all supported Python versions."""
|
||||
# Windows CI consoles default to cp1252; emit ✓/✗/⚠ as UTF-8
|
||||
for stream in (sys.stdout, sys.stderr):
|
||||
if hasattr(stream, "reconfigure"):
|
||||
stream.reconfigure(encoding="utf-8", errors="replace")
|
||||
|
||||
# CI matrix jobs build per-platform wheels but never upload; a separate
|
||||
# publish job uploads everything once all platforms have succeeded.
|
||||
no_upload = "--no-upload" in sys.argv
|
||||
|
||||
Reference in new issue
Block a user