mirror of
https://github.com/emmansun/gmsm.git
synced 2025-04-26 20:26:19 +08:00
Update sm2.go
trigger build
This commit is contained in:
parent
54b8eb12be
commit
9a011f124a
@ -604,7 +604,7 @@ func (z *zr) Read(dst []byte) (n int, err error) {
|
|||||||
|
|
||||||
var zeroReader = &zr{}
|
var zeroReader = &zr{}
|
||||||
|
|
||||||
// IsSM2PublicKey check if given public key is SM2 public key or not
|
// IsSM2PublicKey check if given public key is a SM2 public key or not
|
||||||
func IsSM2PublicKey(publicKey interface{}) bool {
|
func IsSM2PublicKey(publicKey interface{}) bool {
|
||||||
pub, ok := publicKey.(*ecdsa.PublicKey)
|
pub, ok := publicKey.(*ecdsa.PublicKey)
|
||||||
return ok && strings.EqualFold(P256().Params().Name, pub.Curve.Params().Name)
|
return ok && strings.EqualFold(P256().Params().Name, pub.Curve.Params().Name)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user