Example #1
0
File: dce.go Project: pborman/uuid2
// NewDCESecurity returns a DCE Security (Version 2) UUID.
//
// The domain should be one of Person, Group or Org.
// On a POSIX system the id should be the users UID for the Person
// domain and the users GID for the Group.  The meaning of id for
// the domain Org or on non-POSIX systems is site defined.
//
// For a given domain/id pair the same token may be returned for up to
// 7 minutes and 10 seconds.
func NewDCESecurity(domain Domain, id uint32) UUID {
	u, err := uuid.NewDCESecurity(uuid.Domain(domain), id)
	if err != nil {
		return nil
	}
	return u[:]
}
Example #2
0
File: dce.go Project: pborman/uuid2
func (d Domain) String() string {
	return uuid.Domain(d).String()
}