aboutsummaryrefslogtreecommitdiffhomepage
path: root/fst/shared.go
blob: 395448636fa0723c31035bcb75690b1c574699c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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
}