(cls, key_size=192, **kwargs)
| 1966 | |
| 1967 | @classmethod |
| 1968 | def generate_key_string(cls, key_size=192, **kwargs): |
| 1969 | key = os.urandom(key_size // 8 + cls.SIG_SIZE) |
| 1970 | b64key = base64.b64encode(key) |
| 1971 | b64key = b64key.decode("utf-8") |
| 1972 | # Return data must be a base64-encoded string, not a unicode type |
| 1973 | return b64key.replace("\n", "") |
| 1974 | |
| 1975 | @classmethod |
| 1976 | def write_key(cls, path, key_size=192): |
no outgoing calls