diff options
Diffstat (limited to 'fst/shared.go')
| -rw-r--r-- | fst/shared.go | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/fst/shared.go b/fst/shared.go new file mode 100644 index 00000000..39544863 --- /dev/null +++ b/fst/shared.go @@ -0,0 +1,18 @@ +// Package fst exports shared fortify types. +package fst + +import ( + "crypto/rand" + "encoding/hex" +) + +type ID [16]byte + +func (a *ID) String() string { + return hex.EncodeToString(a[:]) +} + +func NewAppID(id *ID) error { + _, err := rand.Read(id[:]) + return err +} |
