macsec

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2026 License: CC0-1.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TransactionIMacsecPskPluginAddTestKey  = binder.FirstCallTransaction + 0
	TransactionIMacsecPskPluginCalcIcv     = binder.FirstCallTransaction + 1
	TransactionIMacsecPskPluginGenerateSak = binder.FirstCallTransaction + 2
	TransactionIMacsecPskPluginWrapSak     = binder.FirstCallTransaction + 3
	TransactionIMacsecPskPluginUnwrapSak   = binder.FirstCallTransaction + 4
)
View Source
const (
	MethodIMacsecPskPluginAddTestKey  = "addTestKey"
	MethodIMacsecPskPluginCalcIcv     = "calcIcv"
	MethodIMacsecPskPluginGenerateSak = "generateSak"
	MethodIMacsecPskPluginWrapSak     = "wrapSak"
	MethodIMacsecPskPluginUnwrapSak   = "unwrapSak"
)
View Source
const DescriptorIMacsecPskPlugin = "android.hardware.macsec.IMacsecPskPlugin"

Variables

This section is empty.

Functions

This section is empty.

Types

type IMacsecPskPlugin

type IMacsecPskPlugin interface {
	AsBinder() binder.IBinder
	AddTestKey(ctx context.Context, keyId []byte, CAK []byte, CKN []byte) error
	CalcIcv(ctx context.Context, keyId []byte, data []byte) ([]byte, error)
	GenerateSak(ctx context.Context, keyId []byte, data []byte, sakLength int32) ([]byte, error)
	WrapSak(ctx context.Context, keyId []byte, sak []byte) ([]byte, error)
	UnwrapSak(ctx context.Context, keyId []byte, sak []byte) ([]byte, error)
}

func NewMacsecPskPluginStub

func NewMacsecPskPluginStub(
	impl IMacsecPskPluginServer,
) IMacsecPskPlugin

NewMacsecPskPluginStub creates a server-side IMacsecPskPlugin wrapping the given server implementation. The returned value satisfies IMacsecPskPlugin and can be passed to proxy methods; its AsBinder() returns a *binder.StubBinder that is auto-registered with the binder driver on first use.

type IMacsecPskPluginServer

type IMacsecPskPluginServer interface {
	AddTestKey(ctx context.Context, keyId []byte, CAK []byte, CKN []byte) error
	CalcIcv(ctx context.Context, keyId []byte, data []byte) ([]byte, error)
	GenerateSak(ctx context.Context, keyId []byte, data []byte, sakLength int32) ([]byte, error)
	WrapSak(ctx context.Context, keyId []byte, sak []byte) ([]byte, error)
	UnwrapSak(ctx context.Context, keyId []byte, sak []byte) ([]byte, error)
}

IMacsecPskPluginServer is the server-side interface that user implementations provide to NewMacsecPskPluginStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).

type MacsecPskPluginProxy

type MacsecPskPluginProxy struct {
	Remote binder.IBinder
}

func NewMacsecPskPluginProxy

func NewMacsecPskPluginProxy(
	remote binder.IBinder,
) *MacsecPskPluginProxy

func (*MacsecPskPluginProxy) AddTestKey

func (p *MacsecPskPluginProxy) AddTestKey(
	ctx context.Context,
	keyId []byte,
	CAK []byte,
	CKN []byte,
) error

func (*MacsecPskPluginProxy) AsBinder

func (p *MacsecPskPluginProxy) AsBinder() binder.IBinder

func (*MacsecPskPluginProxy) CalcIcv

func (p *MacsecPskPluginProxy) CalcIcv(
	ctx context.Context,
	keyId []byte,
	data []byte,
) ([]byte, error)

func (*MacsecPskPluginProxy) GenerateSak

func (p *MacsecPskPluginProxy) GenerateSak(
	ctx context.Context,
	keyId []byte,
	data []byte,
	sakLength int32,
) ([]byte, error)

func (*MacsecPskPluginProxy) UnwrapSak

func (p *MacsecPskPluginProxy) UnwrapSak(
	ctx context.Context,
	keyId []byte,
	sak []byte,
) ([]byte, error)

func (*MacsecPskPluginProxy) WrapSak

func (p *MacsecPskPluginProxy) WrapSak(
	ctx context.Context,
	keyId []byte,
	sak []byte,
) ([]byte, error)

type MacsecPskPluginStub

type MacsecPskPluginStub struct {
	Impl      IMacsecPskPlugin
	Transport binder.VersionAwareTransport
}

MacsecPskPluginStub dispatches incoming binder transactions to a typed IMacsecPskPlugin implementation.

func (*MacsecPskPluginStub) Descriptor

func (s *MacsecPskPluginStub) Descriptor() string

func (*MacsecPskPluginStub) OnTransaction

func (s *MacsecPskPluginStub) OnTransaction(
	ctx context.Context,
	code binder.TransactionCode,
	_data *parcel.Parcel,
) (*parcel.Parcel, error)

Jump to

Keyboard shortcuts

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