Documentation ¶
Index ¶
Constants ¶
View Source
const ( LicenseTypeUnknown = iota LicenseTypeCloud LicenseTypeOnPremise )
Various license types
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cipher ¶
type Cipher interface { DecryptKey(buffer []byte) (security.Key, error) EncryptKey(k security.Key) (string, error) }
Cipher represents a cipher used by the license type.
type License ¶
type License interface { fmt.Stringer NewMasterKey(id uint16) (security.Key, error) Cipher() (Cipher, error) Contract() uint32 Signature() uint32 Master() uint32 }
License represents an abstract license.
type V1 ¶
type V1 struct { EncryptionKey string // Gets or sets the encryption key. User uint32 // Gets or sets the contract id. Sign uint32 // Gets or sets the signature of the contract. Expires time.Time // Gets or sets the expiration date for the license. Type uint32 // Gets or sets the license type. }
V1 represents a legacy v1 license.
func (*V1) NewMasterKey ¶
NewMasterKey generates a new master key.
type V2 ¶
type V2 struct { EncryptionKey []byte // Gets or sets the encryption key. EncryptionSalt []byte // Gets or sets the encryption key. User uint32 // Gets or sets the contract id. Sign uint32 // Gets or sets the signature of the contract. Index uint32 // Gets or sets the current master. }
V2 represents a v2 license.
func (*V2) NewMasterKey ¶
NewMasterKey generates a new master key.
type V3 ¶
type V3 struct { EncryptionKey []byte // Gets or sets the encryption key. EncryptionSalt []byte // Gets or sets the encryption key. User uint32 // Gets or sets the contract id. Sign uint32 // Gets or sets the signature of the contract. Index uint32 // Gets or sets the current master. }
V3 represents a v3 license.
func (*V3) NewMasterKey ¶
NewMasterKey generates a new master key.
Click to show internal directories.
Click to hide internal directories.