aboutsummaryrefslogtreecommitdiff
path: root/internal/crypto/crypto.go
diff options
context:
space:
mode:
authorGravatar jvoisin <julien.voisin@dustri.org> 2024-03-11 23:03:23 +0100
committerGravatar Frédéric Guillot <f@miniflux.net> 2024-03-11 15:22:22 -0700
commit9c8a7dfffe2f4596dcbde2c923a7539914bb252f (patch)
tree34c6e03b5317c91bf106481f1e4417c1049fe159 /internal/crypto/crypto.go
parent74e4032ffc9faad4fec602f283a32d2af8dec47e (diff)
downloadv2-9c8a7dfffe2f4596dcbde2c923a7539914bb252f.tar.gz
v2-9c8a7dfffe2f4596dcbde2c923a7539914bb252f.tar.zst
v2-9c8a7dfffe2f4596dcbde2c923a7539914bb252f.zip
Make use of HashFromBytes everywhere
It feels a bit silly to have a function and to not make use of it.
Diffstat (limited to 'internal/crypto/crypto.go')
-rw-r--r--internal/crypto/crypto.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/internal/crypto/crypto.go b/internal/crypto/crypto.go
index 0b0ab6c6..c99beeb8 100644
--- a/internal/crypto/crypto.go
+++ b/internal/crypto/crypto.go
@@ -17,8 +17,7 @@ import (
// HashFromBytes returns a SHA-256 checksum of the input.
func HashFromBytes(value []byte) string {
- sum := sha256.Sum256(value)
- return fmt.Sprintf("%x", sum)
+ return fmt.Sprintf("%x", sha256.Sum256(value))
}
// Hash returns a SHA-256 checksum of a string.