gspackoper

package
v6.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2024 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	POBegin                     uint32 = 1<<5 - 2
	POGenOper                   uint32 = 1<<5 - 1
	POChangeCryKey              uint32 = 1<<6 - 1
	POVersion                   uint32 = 1<<7 - 1
	POClientPubKey              uint32 = 1<<7 - 2
	POChangeCryKeyFromGSTServer uint32 = 1<<7 - 3
	POChangeCryKeyFromGSTClient uint32 = 1<<7 - 4
	POHello                     uint32 = 1<<7 - 5 //test use, Empty package
	POEnd                       uint32 = 1 << 7
)

Variables

View Source
var File_packOper_pro_proto protoreflect.FileDescriptor

Functions

func GetSha256_32bytes

func GetSha256_32bytes(data []byte) [32]byte

func IsChangeCryKey

func IsChangeCryKey(Data []byte) bool

func IsChangeCryKeyFromGSTClient added in v6.3.0

func IsChangeCryKeyFromGSTClient(Data []byte) bool

func IsChangeCryKeyFromGSTClientFromUint32 added in v6.3.0

func IsChangeCryKeyFromGSTClientFromUint32(OperType uint32) bool

func IsChangeCryKeyFromGSTServer added in v6.3.0

func IsChangeCryKeyFromGSTServer(Data []byte) bool

func IsChangeCryKeyFromGSTServerFromUint32 added in v6.3.0

func IsChangeCryKeyFromGSTServerFromUint32(OperType uint32) bool

func IsChangeCryKeyFromUint32 added in v6.3.0

func IsChangeCryKeyFromUint32(OperType uint32) bool

func IsClientPubKey added in v6.3.0

func IsClientPubKey(Data []byte) bool

func IsClientPubKeyFromUint32 added in v6.3.0

func IsClientPubKeyFromUint32(OperType uint32) bool

func IsPOGen

func IsPOGen(Data []byte) bool

func IsPOGenFromUint32 added in v6.3.0

func IsPOGenFromUint32(OperType uint32) bool

func IsPOHello added in v6.3.0

func IsPOHello(OperType uint32) bool

func IsPOVersion

func IsPOVersion(Data []byte) bool

func IsPOVersionFromUint32 added in v6.3.0

func IsPOVersionFromUint32(OperType uint32) bool

func JsonPacking_OperChangeKey

func JsonPacking_OperChangeKey() (data []byte, key []byte)

func JsonPacking_OperChangeKeyRSAFromGSTClient added in v6.3.0

func JsonPacking_OperChangeKeyRSAFromGSTClient(crykey []byte) []byte

func JsonPacking_OperChangeKeyRSAFromGSTServer added in v6.3.0

func JsonPacking_OperChangeKeyRSAFromGSTServer(crykey []byte) []byte

func NewPackPOClientPubKey added in v6.3.0

func NewPackPOClientPubKey(keyCry []byte) []byte

func NewPackPOGen added in v6.3.0

func NewPackPOGen(data []byte) []byte

func NewPackPOHello added in v6.3.0

func NewPackPOHello() []byte

func NewPackPOVersion added in v6.3.0

func NewPackPOVersion() []byte

Types

type PackOper added in v6.3.0

type PackOper struct {
	// contains filtered or unexported fields
}

func UnPack_Oper

func UnPack_Oper(data []byte) *PackOper

func (*PackOper) Descriptor deprecated added in v6.3.0

func (*PackOper) Descriptor() ([]byte, []int)

Deprecated: Use packOperPro.ProtoReflect.Descriptor instead.

func (*PackOper) GetClientPubKeyData added in v6.3.0

func (po *PackOper) GetClientPubKeyData() []byte

func (*PackOper) GetData added in v6.3.0

func (x *PackOper) GetData() []byte

func (*PackOper) GetEncryKey added in v6.3.0

func (po *PackOper) GetEncryKey() []byte

func (*PackOper) GetHashHex added in v6.3.0

func (x *PackOper) GetHashHex() []byte

func (*PackOper) GetOperData added in v6.3.0

func (x *PackOper) GetOperData() []byte

func (*PackOper) GetOperType added in v6.3.0

func (x *PackOper) GetOperType() uint32

func (*PackOper) GetRand added in v6.3.0

func (x *PackOper) GetRand() []byte

func (*PackOper) GetSha256 added in v6.3.0

func (po *PackOper) GetSha256() []byte

func (*PackOper) GetSha256_buf added in v6.3.0

func (po *PackOper) GetSha256_buf() []byte

GetSha256_buf速度比GetSha256_old快15%-20%。

func (*PackOper) GetSha256_nobuf added in v6.3.0

func (po *PackOper) GetSha256_nobuf() []byte

GetSha256_nobuf的速度比GetSha256_buf的速度快18%-20%。

func (*PackOper) GetSha256_old added in v6.3.0

func (po *PackOper) GetSha256_old() []byte

func (*PackOper) GetSha256_pool added in v6.3.0

func (po *PackOper) GetSha256_pool() []byte

为了更好的安全性,默认情况下没有使用GetSha256_pool函数。 GetSha256_pool的速度比GetSha256_buf的速度快10%-15%。

func (*PackOper) IsChangeCryKey added in v6.3.0

func (po *PackOper) IsChangeCryKey() bool

func (*PackOper) IsChangeCryKeyFromGSTClient added in v6.3.0

func (po *PackOper) IsChangeCryKeyFromGSTClient() bool

func (*PackOper) IsChangeCryKeyFromGSTServer added in v6.3.0

func (po *PackOper) IsChangeCryKeyFromGSTServer() bool

func (*PackOper) IsClientPubKey added in v6.3.0

func (po *PackOper) IsClientPubKey() bool

func (*PackOper) IsOk added in v6.3.0

func (po *PackOper) IsOk() error

func (*PackOper) IsPOGen added in v6.3.0

func (po *PackOper) IsPOGen() bool

func (*PackOper) IsPOHello added in v6.3.0

func (po *PackOper) IsPOHello() bool

func (*PackOper) IsPOVersion added in v6.3.0

func (po *PackOper) IsPOVersion() bool

func (*PackOper) ProtoMessage added in v6.3.0

func (*PackOper) ProtoMessage()

func (*PackOper) ProtoReflect added in v6.3.0

func (x *PackOper) ProtoReflect() protoreflect.Message

func (*PackOper) Reset added in v6.3.0

func (x *PackOper) Reset()

func (*PackOper) String added in v6.3.0

func (x *PackOper) String() string

Jump to

Keyboard shortcuts

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