MCPcopy
hub / github.com/1Panel-dev/MaxKB / get_key_pair

Function get_key_pair

apps/common/utils/rsa_util.py:42–52  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

40
41
42def get_key_pair():
43 rsa_value = rsa_cache.get(cache_key)
44 if rsa_value is None:
45 with lock:
46 rsa_value = rsa_cache.get(cache_key)
47 if rsa_value is not None:
48 return rsa_value
49 rsa_value = get_key_pair_by_sql()
50 version, get_key = Cache_Version.SYSTEM.value
51 rsa_cache.set(get_key(key='rsa_key'), rsa_value, timeout=None, version=version)
52 return rsa_value
53
54
55def get_key_pair_by_sql():

Callers 4

encryptFunction · 0.70
decryptFunction · 0.70
rsa_long_encryptFunction · 0.70
rsa_long_decryptFunction · 0.70

Calls 3

get_key_pair_by_sqlFunction · 0.70
getMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected