Help us shape the future of Go! Take the 2026 Go Developer Survey

secureclock

package
v0.0.9 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const DescriptorISecureClock = "android.hardware.security.secureclock.ISecureClock"
View Source
const (
	ISecureClockTimeStampMacLabel string = "Auth Verification"
)
View Source
const (
	MethodISecureClockGenerateTimeStamp = "generateTimeStamp"
)
View Source
const (
	TransactionISecureClockGenerateTimeStamp = binder.FirstCallTransaction + 0
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ISecureClock

type ISecureClock interface {
	AsBinder() binder.IBinder
	GenerateTimeStamp(ctx context.Context, challenge int64) (TimeStampToken, error)
}

func NewSecureClockStub

func NewSecureClockStub(
	impl ISecureClockServer,
) ISecureClock

NewSecureClockStub creates a server-side ISecureClock wrapping the given server implementation. The returned value satisfies ISecureClock 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 ISecureClockServer

type ISecureClockServer interface {
	GenerateTimeStamp(ctx context.Context, challenge int64) (TimeStampToken, error)
}

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

type SecureClockProxy

type SecureClockProxy struct {
	Remote binder.IBinder
}

func NewSecureClockProxy

func NewSecureClockProxy(
	remote binder.IBinder,
) *SecureClockProxy

func (*SecureClockProxy) AsBinder

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

func (*SecureClockProxy) GenerateTimeStamp

func (p *SecureClockProxy) GenerateTimeStamp(
	ctx context.Context,
	challenge int64,
) (TimeStampToken, error)

type SecureClockStub

type SecureClockStub struct {
	Impl      ISecureClock
	Transport binder.VersionAwareTransport
}

SecureClockStub dispatches incoming binder transactions to a typed ISecureClock implementation.

func (*SecureClockStub) Descriptor

func (s *SecureClockStub) Descriptor() string

func (*SecureClockStub) OnTransaction

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

type TimeStampToken

type TimeStampToken struct {
	Challenge int64
	Timestamp Timestamp
	Mac       []byte
}

func (*TimeStampToken) MarshalParcel

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

func (*TimeStampToken) UnmarshalParcel

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

type Timestamp

type Timestamp struct {
	MilliSeconds int64
}

func (*Timestamp) MarshalParcel

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

func (*Timestamp) UnmarshalParcel

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

Jump to

Keyboard shortcuts

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