docstore/pkg/index/id.go
2021-02-18 22:52:36 +01:00

14 lines
194 B
Go

// Copyright (C) 2021 Marius Schellenberger
package index
import (
"crypto/rand"
"encoding/hex"
)
func newID() string {
b := make([]byte, 16)
rand.Read(b)
return hex.EncodeToString(b)
}