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 2d8cae5.
  • Loading branch information
crispgm committed Sep 12, 2024
1 parent 2d8cae5 commit be79107
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
Expand Up @@ -2,7 +2,7 @@ package larkhertz

import (
"context"
"crypto/sha256"
"crypto/sha1"
"encoding/json"
"fmt"
"strings"
Expand Down Expand Up @@ -59,7 +59,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 be79107

Please sign in to comment.