查查20Poly1305
chacha20poly1305的Python项目详细描述
简单的纯python chacha20-poly1305实现基于 tlslite-ng代码。设计 与加密api兼容。
importosfromchacha20poly1305importChaCha20Poly1305key=os.urandom(32)cip=ChaCha20Poly1305(key)nonce=os.urandom(12)ciphertext=cip.encrypt(nonce,b'test')plaintext=cip.decrypt(nonce,ciphertext)print(plaintext)
点
pip install chacha20poly1305