This commit is contained in:
Miki 2023-12-20 16:49:33 +01:00
parent d9a1837f3b
commit ebd2f05ae2
69 changed files with 2335 additions and 451 deletions

12
backend.old/hash.go Normal file
View file

@ -0,0 +1,12 @@
package main
import (
"crypto/sha256"
"fmt"
)
func CalcId(str string, len int) string {
id := sha256.Sum256([]byte(str))
return fmt.Sprintf("%X", id)[0:len]
}