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

Method string_to_key

scapy/libs/rfc3961.py:1405–1416  ·  view source on GitHub ↗

string-to-key per RFC3961 This is typically used to create a Key object from a password + salt

(cls, etype, string, salt, params=None)

Source from the content-addressed store, hash-verified

1403
1404 @classmethod
1405 def string_to_key(cls, etype, string, salt, params=None):
1406 # type: (EncryptionType, bytes, bytes, Optional[bytes]) -> Key
1407 """
1408 string-to-key per RFC3961
1409
1410 This is typically used to create a Key object from a password + salt
1411 """
1412 try:
1413 ep = _enctypes[etype]
1414 except ValueError:
1415 raise ValueError("Unknown etype '%s'" % etype)
1416 return ep.string_to_key(string, salt, params)
1417
1418
1419############

Callers 2

add_credMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected