MCPcopy Create free account
hub / github.com/StackStorm/st2 / deserialize_key_value

Function deserialize_key_value

st2common/st2common/services/config.py:84–101  ·  view source on GitHub ↗

Deserialize the datastore item value. Note: Right now only strings as supported so only thing this function does is it decrypts secret values. :param value: Value to deserialize. :type value: ``str`` :param secret: True if a value is a secret and is encrypted. :type s

(value, secret=False)

Source from the content-addressed store, hash-verified

82
83
84def deserialize_key_value(value, secret=False):
85 """
86 Deserialize the datastore item value.
87
88 Note: Right now only strings as supported so only thing this function does is it decrypts
89 secret values.
90
91 :param value: Value to deserialize.
92 :type value: ``str``
93
94 :param secret: True if a value is a secret and is encrypted.
95 :type secret: ``bool``
96 """
97 if secret:
98 KeyValuePairAPI._setup_crypto()
99 value = symmetric_decrypt(KeyValuePairAPI.crypto_key, value)
100
101 return value

Callers 2

get_keyFunction · 0.90

Calls 2

symmetric_decryptFunction · 0.90
_setup_cryptoMethod · 0.80

Tested by

no test coverage detected