mirror of
https://github.com/stefanprodan/podinfo.git
synced 2026-08-23 22:26:29 +00:00
Fix sha1 compute
This commit is contained in:
@@ -3,8 +3,8 @@ package server
|
||||
import (
|
||||
"bytes"
|
||||
"crypto/sha1"
|
||||
"encoding/hex"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"os"
|
||||
@@ -268,5 +268,6 @@ func (s *Server) panic(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
func hash(input string) string {
|
||||
h := sha1.New()
|
||||
return fmt.Sprintf("%x", h.Sum([]byte(input)))
|
||||
h.Write([]byte(input))
|
||||
return hex.EncodeToString(h.Sum(nil))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user