Ophestra Umiker
ad0034b09a
App ID is inherent to App, and it makes no sense to generate it as part of the app sealing process. Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
18 lines
213 B
Go
18 lines
213 B
Go
package app
|
|
|
|
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
|
|
}
|