|
@@ -48,3 +48,9 @@ func (signer *Signer) Verify(key *rsa.PublicKey, sum []byte) {
|
|
panic(fmt.Errorf("Verify failed"))
|
|
panic(fmt.Errorf("Verify failed"))
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+// Check func
|
|
|
|
+func (signer *Signer) Check(key *rsa.PublicKey, sum []byte) bool {
|
|
|
|
+ err := rsa.VerifyPSS(key, signer.method, signer.h.Sum(nil), sum, &signer.opts)
|
|
|
|
+ return err == nil
|
|
|
|
+}
|