string-to-key per RFC3961 This is typically used to create a Key object from a password + salt
(cls, etype, string, salt, params=None)
| 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 | ############ |
no outgoing calls
no test coverage detected