Skip to content

Commit

Permalink
更新
Browse files Browse the repository at this point in the history
  • Loading branch information
deatil committed Dec 27, 2024
1 parent ef61b54 commit e811fca
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions gm/sm2/sm2.go
Original file line number Diff line number Diff line change
Expand Up @@ -911,6 +911,11 @@ func verify(pub *PublicKey, hash []byte, r, s *big.Int) error {
return nil
}

// Calculate Hash
func CalculateHash(pub *PublicKey, h hashFunc, msg, uid []byte) ([]byte, error) {
return calculateHash(pub, h, msg, uid)
}

func calculateHash(pub *PublicKey, h hashFunc, msg, uid []byte) ([]byte, error) {
if len(uid) == 0 {
uid = defaultUID
Expand Down

0 comments on commit e811fca

Please sign in to comment.