(msg []byte, sign []byte)
| 75 | } |
| 76 | |
| 77 | func (pub *PublicKey) Verify(msg []byte, sign []byte) bool { |
| 78 | var sm2Sign sm2Signature |
| 79 | _, err := asn1.Unmarshal(sign, &sm2Sign) |
| 80 | if err != nil { |
| 81 | return false |
| 82 | } |
| 83 | return Sm2Verify(pub, msg, default_uid, sm2Sign.R, sm2Sign.S) |
| 84 | } |
| 85 | |
| 86 | func (pub *PublicKey) Sm3Digest(msg, uid []byte) ([]byte, error) { |
| 87 | if len(uid) == 0 { |