Signature.verify() is always returning false

谁说我不能喝 提交于 2019-12-04 21:13:01

1) You don't need to calculate hash if you are using SHA1withRSA (Signature engine do this automatically) line
sig.update(data); needs to be changed to sig.update(dataString.getBytes());

2) Signed text is little bit strange "70:F3:95:11:14:B3" + "AIG_OCR" + "5", did you meant byte sequence - 0x70,0xF3.. ?

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