Skip to content

fidcz/xxtea-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xxtea

xxtea纯Python实现

参考:https://github.com/xxtea/xxtea-js
虽然上面链接里面有python版本,但是通过调用C实现的
照抄js版本改成python代码实现

使用方法

from xxtea import encryptToBase64, decryptFromBase64

enString = 'Hello World!!!'
Key = 'password'
a = encryptToBase64(enString, Key)
print(a)  # OI1WQdt0sA2ZtgDPe6qMV1F+YYI=
b = decryptFromBase64(a, Key)
print(b)  # Hello World!!!
print(enString == b)  # True

About

xxtea纯Python实现

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages