iFindTA / PBGMService

国密算法 sm2/sm3/sm4 Objc封装!作者观点:重点不是算法而是密钥安全性!
MIT License
120 stars 27 forks source link

iOS端和Java端互相不能解密 #7

Open zhanglinfeng opened 6 years ago

zhanglinfeng commented 6 years ago

自己加密的自己能解,但Java加密的,iOS不能解,iOS加密的Java不能解,大神帮忙分析下下么原因啊,曲线双方是一样的。Java的公钥多了2位,前面多了04,请问如何解Java加密的密文呢

debugviewer commented 5 years ago

自己加密的自己能解,但Java加密的,iOS不能解,iOS加密的Java不能解,大神帮忙分析下下么原因啊,曲线双方是一样的。Java的公钥多了2位,前面多了04,请问如何解Java加密的密文呢

排查一下看是不是字符编码问题?

iosYangChuan commented 5 years ago

您好,我也遇到这个问题了? 编码都正确的, 位数不去掉前面的04和后台匹配,但是不能正常解密。去掉了之后位数又和后台对应不上。 又点头大。有没有java 配套的,能正常完成加密、解密的包?麻烦博主抽时间看看这个问题呢?https://github.com/looly/hutool/tree/v4-master/hutool-crypto/src

iosYangChuan commented 5 years ago

上面的连接是我们用到的java连接

zhuxinleibandou commented 4 years ago

请问解决了吗

iosYangChuan commented 4 years ago

最后发现还是不得行 就采用的js的方式 js里面写加密然后原生调用

------------------ 原始邮件 ------------------ 发件人: "zhuxinleibandou"<notifications@github.com>; 发送时间: 2020年9月29日(星期二) 中午11:19 收件人: "iFindTA/PBGMService"<PBGMService@noreply.github.com>; 抄送: "恶果"<664090128@qq.com>; "Comment"<comment@noreply.github.com>; 主题: Re: [iFindTA/PBGMService] iOS端和Java端互相不能解密 (#7)

请问解决了吗

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.