MCPcopy Create free account
hub / github.com/Tencent/CodeAnalysis / decrypt

Function decrypt

server/projects/file/utils/cdcrypto.py:30–39  ·  view source on GitHub ↗

使用key对password密文进行解密

(cipher_password, key)

Source from the content-addressed store, hash-verified

28
29
30def decrypt(cipher_password, key):
31 """使用key对password密文进行解密"""
32 if cipher_password is None:
33 return None
34 if key is None:
35 raise Exception("Decrypt key should not be none.")
36 key = __encode(key)
37 aes = pyaes.AESModeOfOperationCTR(key)
38 pwd = aes.decrypt(a2b_hex(cipher_password))
39 return __decode(pwd)

Callers 1

check_ticketMethod · 0.90

Calls 3

__encodeFunction · 0.70
__decodeFunction · 0.70
decryptMethod · 0.45

Tested by

no test coverage detected