Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/pyca/cryptography
/ random_serial_number
Function
random_serial_number
src/cryptography/x509/base.py:797–798 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
795
796
797
def
random_serial_number() -> int:
798
return
int.from_bytes(os.urandom(20),
"big"
) >> 1
Callers
nothing calls this directly
Calls
1
from_bytes
Method · 0.80
Tested by
no test coverage detected