New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
result length of encrypt here is twice than which in Java #1
Comments
I'm sorry I cann't understand what mean this sentence. Is java encrypt string and the js decrypt ? |
I mean why the encrypt result string is just the twice than what encrypted from Java platform using exactly rsa |
Can you give me a case with too long string which cannot be decrypt by java ? I try it frist. Thanks! |
呃,中国人啊,讲中文吧 |
我测试了一下我自己demo里面的那个字符串: 并非你说的2倍。 另: 我不明白你们服务端为啥会限制这个长度,基于什么原理限制长度。如果你们要开发ios端的,那肯定也不行,到时候怎么处理? |
我试了很多次,确实是两倍 至于后台为什么限制,我管不了的事 我只是想知道为啥不一样长度还能解出来 我想知道原理 |
rsa算法里面,长度很长的字符串进行加密,是分段进行的,长度不足以空格或者其他特殊方式补齐。分段补齐的策略不同,长度就不同。 |
老哥,非常抱歉上面说了两倍的说法 |
本库是基于jsencrypt的封装,该库只支持短数据加解密。你这要求应该只有去修改jsencrypt才能满足要求。只能看下他的加密补齐方式。 |
Hi,bro,
I've met a strange issue, result length of encrypt here is twice than which in Java,
but backend can decrypt it correctly,
however, when I decrypt a LONG source string, backend denied the request.
So, I wonder why the twice
Plus : mode in Java
public static final String SIGN_TYPE_RSA = "RSA/ECB/PKCS1Padding";
The text was updated successfully, but these errors were encountered: