Skip to content
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

解决 #7

Open
sangjunke opened this issue Aug 12, 2019 · 3 comments
Open

解决 #7

sangjunke opened this issue Aug 12, 2019 · 3 comments

Comments

@sangjunke
Copy link

确实会出现解密不出来的情况,在大佬的帮助下解决了;
在 Reset 方法 和 Encrypt 方法处 进行补位操作

@sanchiqingfeng
Copy link

老哥,能不能把具体补位的方式给发一下

@sangjunke
Copy link
Author

老哥,能不能把具体补位的方式给发一下

不好意思时间有点久忘记了 我上传了个demo 你可以试一试

@unsigned-
Copy link

unsigned- commented Dec 28, 2021

Encrypt方法,在Dofinal之后,在对C1的X和Y坐标转换成16进制之后,如果不足时64个16进制字节时各自补前导"0"。
Reset方法处理X/Y坐标时增加长度参数:
//var xWords = this.GetWords(this.p2.getX().toBigInteger().toRadix(16));
//var yWords = this.GetWords(this.p2.getY().toBigInteger().toRadix(16));
var xWords = this.GetWords(this.p2.getX().toBigInteger().toRadix(16), 32);
var yWords = this.GetWords(this.p2.getY().toBigInteger().toRadix(16), 32);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants