feat: boot.img.lz4

This commit is contained in:
Mikaël Cluseau
2018-11-13 14:44:15 +11:00
parent 7ef45a39f9
commit 12ade36fd1
104 changed files with 4963 additions and 127 deletions

View File

@ -0,0 +1,19 @@
package main
import (
"crypto/sha1"
"encoding/base64"
"encoding/json"
)
func hash(values ...interface{}) string {
ba, err := json.Marshal(values)
if err != nil {
panic(err) // should not happen
}
h := sha1.Sum(ba)
enc := base64.StdEncoding.WithPadding(base64.NoPadding)
return enc.EncodeToString(h[:])
}