sharedsecret

package
v0.0.5 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 (
	TransactionISharedSecretGetSharedSecretParameters = binder.FirstCallTransaction + 0
	TransactionISharedSecretComputeSharedSecret       = binder.FirstCallTransaction + 1
)
View Source
const (
	MethodISharedSecretGetSharedSecretParameters = "getSharedSecretParameters"
	MethodISharedSecretComputeSharedSecret       = "computeSharedSecret"
)
View Source
const (
	ISharedSecretKeyAgreementLabel string = "KeymasterSharedMac"
	ISharedSecretKeyCheckLabel     string = "Keymaster HMAC Verification"
)
View Source
const DescriptorISharedSecret = "android.hardware.security.sharedsecret.ISharedSecret"

Variables

This section is empty.

Functions

This section is empty.

Types

type ISharedSecret

type ISharedSecret interface {
	AsBinder() binder.IBinder
	GetSharedSecretParameters(ctx context.Context) (SharedSecretParameters, error)
	ComputeSharedSecret(ctx context.Context, params []SharedSecretParameters) ([]byte, error)
}

func NewSharedSecretStub

func NewSharedSecretStub(
	impl ISharedSecretServer,
) ISharedSecret

NewSharedSecretStub creates a server-side ISharedSecret wrapping the given server implementation. The returned value satisfies ISharedSecret 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 ISharedSecretServer

type ISharedSecretServer interface {
	GetSharedSecretParameters(ctx context.Context) (SharedSecretParameters, error)
	ComputeSharedSecret(ctx context.Context, params []SharedSecretParameters) ([]byte, error)
}

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

type SharedSecretParameters

type SharedSecretParameters struct {
	Seed  []byte
	Nonce []byte
}

func (*SharedSecretParameters) MarshalParcel

func (s *SharedSecretParameters) MarshalParcel(
	p *parcel.Parcel,
) error

func (*SharedSecretParameters) UnmarshalParcel

func (s *SharedSecretParameters) UnmarshalParcel(
	p *parcel.Parcel,
) error

type SharedSecretProxy

type SharedSecretProxy struct {
	Remote binder.IBinder
}

func NewSharedSecretProxy

func NewSharedSecretProxy(
	remote binder.IBinder,
) *SharedSecretProxy

func (*SharedSecretProxy) AsBinder

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

func (*SharedSecretProxy) ComputeSharedSecret

func (p *SharedSecretProxy) ComputeSharedSecret(
	ctx context.Context,
	params []SharedSecretParameters,
) ([]byte, error)

func (*SharedSecretProxy) GetSharedSecretParameters

func (p *SharedSecretProxy) GetSharedSecretParameters(
	ctx context.Context,
) (SharedSecretParameters, error)

type SharedSecretStub

type SharedSecretStub struct {
	Impl      ISharedSecret
	Transport binder.VersionAwareTransport
}

SharedSecretStub dispatches incoming binder transactions to a typed ISharedSecret implementation.

func (*SharedSecretStub) Descriptor

func (s *SharedSecretStub) Descriptor() string

func (*SharedSecretStub) OnTransaction

func (s *SharedSecretStub) 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