MCPcopy Create free account
hub / github.com/secdev/scapy / new_random_key

Method new_random_key

scapy/libs/rfc3961.py:1393–1402  ·  view source on GitHub ↗

Generates a seed then calls random-to-key

(cls, etype)

Source from the content-addressed store, hash-verified

1391
1392 @classmethod
1393 def new_random_key(cls, etype):
1394 # type: (EncryptionType) -> Key
1395 """
1396 Generates a seed then calls random-to-key
1397 """
1398 try:
1399 ep = _enctypes[etype]
1400 except ValueError:
1401 raise ValueError("Unknown etype '%s'" % etype)
1402 return cls.random_to_key(etype, os.urandom(ep.seedsize))
1403
1404 @classmethod
1405 def string_to_key(cls, etype, string, salt, params=None):

Callers 3

calc_fast_armorkeyMethod · 0.80
GSS_Init_sec_contextMethod · 0.80

Calls 1

random_to_keyMethod · 0.45

Tested by

no test coverage detected