hsm

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2021 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// String
	String = iota + 1
	// Binary
	Binary
	// DecimalInt
	DecimalInt
	// HexadecimalInt
	HexadecimalInt
)
View Source
const (
	// AsciiEncoding is ASCII encoding
	AsciiEncoding = iota + 1
	// EbcdicEncoding
	EbcdicEncoding
)
View Source
const (
	// HSM_OK is OK response from Thales HSM
	HSM_OK = "00"
	// HSM_PARSE_ERROR implies that the HSM command was malformed
	HSM_PARSE_ERROR = "15"
)
View Source
const (
	// ZMK_KEY_TYPE represents a Zone Master Key
	ZMK_KEY_TYPE = "000"
	//TMK_KEY_TYPE represents a Terminal Master Key
	TMK_KEY_TYPE = "002"
)
View Source
const (
	PercentSign = '%'
)

Variables

This section is empty.

Functions

func Dump

func Dump(v interface{}) string

Types

type EncodingType

type EncodingType int

type ThalesHsm

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

ThalesHsm represents a software Thales HSM

func NewThalesHsm

func NewThalesHsm(ip string, port int, encodingType EncodingType) *ThalesHsm

func (*ThalesHsm) HandleMS

func (th *ThalesHsm) HandleMS(msgData []byte) []byte

func (*ThalesHsm) HandleNC

func (th *ThalesHsm) HandleNC(msgData []byte) []byte

HandleNC handles Thales NC diagnostics command

func (*ThalesHsm) Start

func (th *ThalesHsm) Start()

func (*ThalesHsm) Stop

func (th *ThalesHsm) Stop()

type ThalesMsRequest

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

func (*ThalesMsRequest) InvalidDataResponse

func (resp *ThalesMsRequest) InvalidDataResponse(msRespStruct *ThalesMsResponse) []byte

type ThalesMsResponse

type ThalesMsResponse struct {
	MAB []byte
	// contains filtered or unexported fields
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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