Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/secdev/scapy
/ random_to_key
Method
random_to_key
scapy/libs/rfc3961.py:423–427 ·
view source on GitHub ↗
(cls, seed)
Source
from the content-addressed store, hash-verified
421
422
@classmethod
423
def
random_to_key(cls, seed):
424
# type: (bytes) -> Key
425
if
len(seed) != cls.seedsize:
426
raise
ValueError(
"Wrong seed length"
)
427
return
Key(cls.etype, key=seed)
428
429
430
# RFC3961 sect 4
Callers
nothing calls this directly
Calls
1
Key
Class · 0.85
Tested by
no test coverage detected