mirror of
https://gitee.com/jzsw-it/yexuejc-base.git
synced 2025-09-28 08:23:20 +08:00
RSA验签方式设值
This commit is contained in:
@@ -376,7 +376,8 @@ public class RSA {
|
|||||||
* @return
|
* @return
|
||||||
* @throws UnsupportedEncodingException
|
* @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;
|
boolean isValid = false;
|
||||||
try {
|
try {
|
||||||
signature.initVerify(publicKey);
|
signature.initVerify(publicKey);
|
||||||
|
Reference in New Issue
Block a user