MCPcopy Index your code
hub / github.com/saltstack/salt / generate_key_string

Method generate_key_string

salt/crypt.py:1968–1973  ·  view source on GitHub ↗
(cls, key_size=192, **kwargs)

Source from the content-addressed store, hash-verified

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):

Calls

no outgoing calls