1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-01 17:38:37 +00:00

Make use of HashFromBytes everywhere

It feels a bit silly to have a function and to not make use of it.
This commit is contained in:
jvoisin 2024-03-11 23:03:23 +01:00 committed by Frédéric Guillot
parent 74e4032ffc
commit 9c8a7dfffe
2 changed files with 6 additions and 6 deletions

View file

@ -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.