使用key对password密文进行解密
(cipher_password, key)
| 28 | |
| 29 | |
| 30 | def 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) |
no test coverage detected