good morning!!!!

Skip to content
Snippets Groups Projects
Commit d8c0b0c8 authored by Jeffrey Wilcke's avatar Jeffrey Wilcke
Browse files

Moved string util

parent d5d2efba
No related branches found
No related tags found
No related merge requests found
util.go 0 → 100644
package main
import (
"strconv"
"crypto/sha256"
"encoding/hex"
)
func Uitoa(i uint32) string {
return strconv.FormatUint(uint64(i), 10)
}
func Sha256Hex(data []byte) string {
hash := sha256.Sum256(data)
return hex.EncodeToString(hash[:])
}
func Sha256Bin(data []byte) []byte {
hash := sha256.Sum256(data)
return hash[:]
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment