MCPcopy Index your code
hub / github.com/Tencent/CodeAnalysis / decrypt

Function decrypt

server/projects/analysis/util/cdcrypto.py:44–53  ·  view source on GitHub ↗

使用key对password密文进行解密

(cipher_password, key)

Source from the content-addressed store, hash-verified

42
43
44def decrypt(cipher_password, key):
45 """使用key对password密文进行解密"""
46 if cipher_password is None:
47 return None
48 if key is None:
49 raise ServerError(errcode.E_SERVER, "Decrypt key should not be none.")
50 key = __encode(key)
51 aes = pyaes.AESModeOfOperationCTR(key)
52 pwd = aes.decrypt(a2b_hex(cipher_password))
53 return __decode(pwd)

Callers 1

check_ticketMethod · 0.90

Calls 4

ServerErrorClass · 0.90
__encodeFunction · 0.70
__decodeFunction · 0.70
decryptMethod · 0.45

Tested by

no test coverage detected