Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ZeroTierIdentity ¶
type ZeroTierIdentity struct {
// contains filtered or unexported fields
}
ZeroTierIdentity contains a public key, a private key, and a string representation of the identity.
func NewZeroTierIdentity ¶
func NewZeroTierIdentity() (id ZeroTierIdentity)
NewZeroTierIdentity creates a new ZeroTier Identity. This can be a little bit time consuming due to one way proof of work requirements (usually a few hundred milliseconds).
func (*ZeroTierIdentity) ID ¶
func (id *ZeroTierIdentity) ID() uint64
ID returns the ZeroTier address as a uint64
func (*ZeroTierIdentity) IDString ¶
func (id *ZeroTierIdentity) IDString() string
IDString returns the NodeID as a 10-digit hex string
func (*ZeroTierIdentity) PrivateKey ¶
func (id *ZeroTierIdentity) PrivateKey() *[64]byte
PrivateKey returns the bytes of the private key (or nil if not set)
func (*ZeroTierIdentity) PrivateKeyString ¶
func (id *ZeroTierIdentity) PrivateKeyString() string
PrivateKeyString returns the full identity.secret if the private key is set, or an empty string if no private key is set.
func (*ZeroTierIdentity) PublicKey ¶
func (id *ZeroTierIdentity) PublicKey() [64]byte
PublicKey returns the public key bytes
func (*ZeroTierIdentity) PublicKeyString ¶
func (id *ZeroTierIdentity) PublicKeyString() string
PublicKeyString returns identity.public contents.