(cls, string, salt, params)
| 1057 | |
| 1058 | @classmethod |
| 1059 | def string_to_key(cls, string, salt, params): |
| 1060 | # type: (bytes, bytes, Optional[bytes]) -> Key |
| 1061 | if params is not None and params != b"": |
| 1062 | raise ValueError("Invalid RC4 string-to-key parameters") |
| 1063 | utf16string = plain_str(string).encode("UTF-16LE") |
| 1064 | return Key(cls.etype, key=Hash_MD4().digest(utf16string)) |
| 1065 | |
| 1066 | @classmethod |
| 1067 | def encrypt(cls, key, keyusage, plaintext, confounder): |