MCPcopy
hub / github.com/saltstack/salt / dumps

Method dumps

salt/crypt.py:2041–2049  ·  view source on GitHub ↗

Serialize and encrypt a python object

(self, obj, nonce=None)

Source from the content-addressed store, hash-verified

2039 return data[: -data[-1]]
2040
2041 def dumps(self, obj, nonce=None):
2042 """
2043 Serialize and encrypt a python object
2044 """
2045 if nonce:
2046 toencrypt = self.PICKLE_PAD + nonce.encode() + salt.payload.dumps(obj)
2047 else:
2048 toencrypt = self.PICKLE_PAD + salt.payload.dumps(obj)
2049 return self.encrypt(toencrypt)
2050
2051 def loads(self, data, raw=False, nonce=None):
2052 """

Calls 1

encryptMethod · 0.95