duanhongyi / gmssl

a python crypto for sm2/sm3/sm4
MIT License
485 stars 140 forks source link

兼容python 2嘛? #8

Closed forestdew closed 4 years ago

forestdew commented 5 years ago

大哥,这个是不兼容python 2嘛?

duanhongyi commented 5 years ago

是的

forestdew commented 5 years ago

大哥啊,这个不兼容python2啊!!!! python2中的str和bytes是同一个类型的数据。哎....................................................

duanhongyi commented 5 years ago

@forestdew python2我个人觉得没有支持的必要了,2.7还有6个月官方都不支持了。

forestdew commented 5 years ago

嗯。。。。。。。。。。。。。 大佬,要不你让它支持一下python2,或者你告诉我一下思路,我来改改。 。。。。。。。。。。。。。。。。。。

duanhongyi commented 5 years ago

@forestdew

差别主要在str和bytes上,python3的str是python2 的unicode,python3的bytes是python2的str

forestdew commented 5 years ago

谢谢您,我找到一个支持python2的版本了

forestdew commented 5 years ago

大哥,我又碰到问题了,这个库是只能支持128ASSCII嘛?好像它并不能对汉字进行处理。 谢谢

duanhongyi commented 5 years ago

汉字转成bytes