crypto

package
v0.5.15 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2018 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package crypto provides useful functions to sign BF_TX.

Package helloworld is a generated protocol buffer package.

It is generated from these files:

helloworld.proto

It has these top-level messages:

HelloRequest
HelloReply

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CryptoTransaction added in v0.5.0

func CryptoTransaction(content string) []byte

func SignBFTX added in v0.5.0

func SignBFTX(bftx bf_tx.BF_TX) (bf_tx.BF_TX, error)

SignBFTX has the whole process of signing each BF_TX.

Types

type AgentForMaster added in v0.5.0

type AgentForMaster struct {
	FirstName string
	LastName  string
	Sig       string
}

type AgentForOwner added in v0.5.0

type AgentForOwner struct {
	FirstName             string
	LastName              string
	Sig                   string
	ConditionsForCarriage string
}

type BFTX_Decode_request added in v0.5.0

type BFTX_Decode_request struct {
	KeyName string
	// contains filtered or unexported fields
}

func (*BFTX_Decode_request) ProtoMessage added in v0.5.0

func (*BFTX_Decode_request) ProtoMessage()

func (*BFTX_Decode_request) Reset added in v0.5.0

func (m *BFTX_Decode_request) Reset()

func (*BFTX_Decode_request) String added in v0.5.0

func (m *BFTX_Decode_request) String() string

type BFTX_Encode_request added in v0.5.0

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

func (*BFTX_Encode_request) ProtoMessage added in v0.5.0

func (*BFTX_Encode_request) ProtoMessage()

func (*BFTX_Encode_request) Reset added in v0.5.0

func (m *BFTX_Encode_request) Reset()

func (*BFTX_Encode_request) String added in v0.5.0

func (m *BFTX_Encode_request) String() string

type BFTX_Payload added in v0.5.0

type BFTX_Payload struct {
	Shipper             string
	BolNum              int
	RefNum              int
	Consignee           string
	Vessel              int
	PortOfLoading       int
	PortOfDischarge     int
	NotifyAddress       string
	DescOfGoods         string
	GrossWeight         int
	FreightPayableAmt   int
	FreightAdvAmt       int
	GeneralInstructions string
	DateShipped         string
	NumBol              int
	ISSUEDETAILS        IssueDetails

	MASTERINFO MasterInfo

	AGENTFORMASTER AgentForMaster

	AGENTFOROWNER      AgentForOwner
	EncryptionMetaData string
}

type BFTX_encryptionConfig added in v0.5.0

type BFTX_encryptionConfig struct {
	Version string

	Recipients       string
	EncryptionFields EncryptionField
	Publickeys       Publickeys
	// contains filtered or unexported fields
}

type BFTX_transaction added in v0.5.0

type BFTX_transaction struct {
	BFTX_Payload BFTX_Payload
}

type EncryptClient added in v0.5.0

type EncryptClient interface {
	BFTX_Encode(ctx context.Context, in *BFTX_Encode_request) *BFTX_transaction
}

func NewEncryptionClient added in v0.5.0

func NewEncryptionClient(cc *grpc.ClientConn) EncryptClient

type EncryptionField added in v0.5.0

type EncryptionField struct {
	FieldName      string
	AuthorizedUser string
}

type IssueDetails added in v0.5.0

type IssueDetails struct {
	PlaceOfIssue string
	DateOfIssue  string
}

IssueDetails struct

type MasterInfo added in v0.5.0

type MasterInfo struct {
	FirstName string
	LastName  string
	Sig       string
}

type Publickeys added in v0.5.0

type Publickeys struct {
	UserID string
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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