secure

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 24, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLinuxProductUUID added in v0.3.0

func GetLinuxProductUUID() string

TODO move to golib/util/cmdutil

func ParamSecurityMain

func ParamSecurityMain()

func UpdateNetCypherKey

func UpdateNetCypherKey(data []byte)

Types

type ParamSecurity

type ParamSecurity struct {
	KeyHash int32
	// contains filtered or unexported fields
}

func GetParamSecurity

func GetParamSecurity() *ParamSecurity

func NewParamSecurity

func NewParamSecurity() *ParamSecurity

func (*ParamSecurity) Decrypt

func (this *ParamSecurity) Decrypt(b []byte, crc *ref.BYTE, dkey []byte) []byte

func (*ParamSecurity) Encrypt

func (this *ParamSecurity) Encrypt(b []byte, crc *ref.BYTE) []byte

func (*ParamSecurity) IsSafe

func (this *ParamSecurity) IsSafe(skey string) bool

func (*ParamSecurity) Reload

func (this *ParamSecurity) Reload()

type SecurityMaster

type SecurityMaster struct {
	PCODE      int64
	OID        int32
	ONAME      string
	IP         int32
	SECURE_KEY []byte
	Cypher     *crypto.Cypher

	PUBLIC_IP int32

	MeterIP string
	// contains filtered or unexported fields
}

func GetSecurityMaster

func GetSecurityMaster() *SecurityMaster

func NewSecurityMaster

func NewSecurityMaster() *SecurityMaster

func (*SecurityMaster) AutoAgentNameOrPattern

func (this *SecurityMaster) AutoAgentNameOrPattern(myIp string)

func (*SecurityMaster) DecideAgentOnameOid

func (this *SecurityMaster) DecideAgentOnameOid(myIp string)

func (*SecurityMaster) Run

func (this *SecurityMaster) Run()

func (*SecurityMaster) UpdateLicense

func (this *SecurityMaster) UpdateLicense(pcode int64, security_key []byte)

func (*SecurityMaster) WaitForInit

func (this *SecurityMaster) WaitForInit()

func (*SecurityMaster) WaitForInitFor

func (this *SecurityMaster) WaitForInitFor(timeoutSec float64)

type SecuritySession

type SecuritySession struct {
	TRANSFER_KEY int32
	SECURE_KEY   []byte
	HIDE_KEY     int32
	Cypher       *crypto.Cypher
}

func GetSecuritySession

func GetSecuritySession() *SecuritySession

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL