How to sign signature data using bouncy castle?

可紊 提交于 2019-12-04 16:03:57

I think you are signing it twice, once directly using Signature and the other one using ContentSigner. You need only to sign the data, not the signature.

So the solution should be to replace signature.sign() with text.getBytes(), or text.getBytes(StandardCharsets.UTF_8) if you want to explicitly define a character set for text instead of using some system default.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!