mirror of
https://gitee.com/jzsw-it/yexuejc-base.git
synced 2025-06-20 20:12:41 +08:00
RSA验签方式设值
This commit is contained in:
parent
7368baf553
commit
a250530fd1
@ -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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user