Skip to content

Commit

Permalink
Revert "feat(signature): switch from sha1 to sha256 to adapt feishu's…
Browse files Browse the repository at this point in the history
… breaking change"

This reverts commit 53149ea.
  • Loading branch information
crispgm committed Sep 12, 2024
1 parent 53149ea commit c6bb874
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions card.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package larkgin

import (
"crypto/sha256"
"crypto/sha1"
"encoding/json"
"fmt"
"strings"
Expand Down Expand Up @@ -58,7 +58,7 @@ func (opt LarkMiddleware) cardSignature(nonce string, timestamp string, body str
b.WriteString(token)
b.WriteString(body)
bs := []byte(b.String())
h := sha256.New()
h := sha1.New()
h.Write(bs)
bs = h.Sum(nil)
return fmt.Sprintf("%x", bs)
Expand Down

0 comments on commit c6bb874

Please sign in to comment.