Skip to content

Commit

Permalink
fix: golangci-lint
Browse files Browse the repository at this point in the history
  • Loading branch information
sheldon committed Sep 6, 2022
1 parent 2547721 commit bf7df4a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crypto/sm2/sm2.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ type PrivKeySm2 [PrivKeySize]byte

// Bytes returns the privkey byte format.
func (privKey PrivKeySm2) Bytes() []byte {
return []byte(privKey[:])
return privKey[:]
}

type PubKeySm2 [PubKeySize]byte
Expand Down Expand Up @@ -164,7 +164,7 @@ func (pubKey PubKeySm2) Address() crypto.Address {
}

func (pubKey PubKeySm2) Bytes() []byte {
return []byte(pubKey[:])
return pubKey[:]
}

func (pubKey PubKeySm2) VerifySignature(msg []byte, sig []byte) bool {
Expand Down Expand Up @@ -198,7 +198,7 @@ func (pubKey PubKeySm2) String() string {
func (pubKey PubKeySm2) Equals(other crypto.PubKey) bool {
if otherSm2, ok := other.(PubKeySm2); ok {
return bytes.Equal(pubKey[:], otherSm2[:])
} else {
return false
}

return false
}

0 comments on commit bf7df4a

Please # to comment.