We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a826b32 commit 40d0494Copy full SHA for 40d0494
redis/redis.go
@@ -2,7 +2,7 @@ package redis
2
3
import (
4
"context"
5
- "crypto/sha1"
+ "crypto/sha256"
6
"encoding/hex"
7
"io"
8
"time"
@@ -38,7 +38,7 @@ type Script struct {
38
// SendHash methods.
39
// Taken from https://github.com/gomodule/redigo/blob/46992b0f02f74066bcdfd9b03e33bc03abd10dc7/redis/script.go#L32-L41
40
func NewScript(keyCount int, src string) *Script {
41
- h := sha1.New()
+ h := sha256.New()
42
_, _ = io.WriteString(h, src)
43
return &Script{keyCount, src, hex.EncodeToString(h.Sum(nil))}
44
}
0 commit comments