pkiadm/cmd/pkiadmd/crypto.go
Gibheer 039f72c3d5 initial commit
The basic server and client are working and it is possible to add, list,
show, set and remove subjects.

Locations are not yet written to the filesystem yet and need to be
fixed.
2017-05-28 11:33:04 +02:00

12 lines
178 B
Go

package main
import (
"crypto/sha512"
"encoding/base64"
)
func Hash(in []byte) []byte {
raw := sha512.Sum512(in)
return []byte(base64.StdEncoding.EncodeToString(raw[:]))
}