RSA验签方式设值

This commit is contained in:
yexuejc committed 2018-12-21 14:57:32 +08:00
1 parent 7368baf553
commit a250530fd1
1 file changed
+2 -1
@@ -376,7 +376,8 @@ public class RSA {
* @return
* @throws UnsupportedEncodingException
*/
public static boolean verify(String plaintext, String signStr, RSAPublicKey publicKey) throws UnsupportedEncodingException {
public static boolean verify(String plaintext, String signStr, RSAPublicKey publicKey) throws UnsupportedEncodingException, NoSuchAlgorithmException {
signature = Signature.getInstance(signAlgorithm.getValue());
boolean isValid = false;
try {
signature.initVerify(publicKey);