_interface

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VerifyChallengeOutputOK = VerifyChallengeOutput(iota)
	VerifyChallengeOutputFailed
	VerifyChallengeOutputError
)

TODO: expand allowed values

Variables

This section is empty.

Functions

func BytesToLeakedPtr

func BytesToLeakedPtr(s []byte) (uint32, uint32)

func BytesToPtr

func BytesToPtr(s []byte) (uint32, uint32)

func PtrToBytes

func PtrToBytes(ptr uint32, size uint32) []byte

func PtrToString

func PtrToString(ptr uint32, size uint32) string

func StringToLeakedPtr

func StringToLeakedPtr(s string) (uint32, uint32)

func StringToPtr

func StringToPtr(s string) (uint32, uint32)

Types

type Allocation

type Allocation uint64

Allocation is a combination of pointer location in WASM memory and size of it

func MakeChallengeDecode

func MakeChallengeDecode(callback func(in MakeChallengeInput, out *MakeChallengeOutput), in Allocation) (out Allocation)

func NewAllocation

func NewAllocation(ptr, size uint32) Allocation

func (Allocation) Pointer

func (p Allocation) Pointer() uint32

func (Allocation) Size

func (p Allocation) Size() uint32

type MakeChallengeInput

type MakeChallengeInput struct {
	Key []byte

	Parameters map[string]string

	Headers inline.MIMEHeader
	Data    []byte
}

type MakeChallengeOutput

type MakeChallengeOutput struct {
	Data    []byte
	Code    int
	Headers inline.MIMEHeader
	Error   string
}

type VerifyChallengeInput

type VerifyChallengeInput struct {
	Key        []byte
	Parameters map[string]string

	Result []byte
}

type VerifyChallengeOutput

type VerifyChallengeOutput uint64

func VerifyChallengeDecode

func VerifyChallengeDecode(callback func(in VerifyChallengeInput) VerifyChallengeOutput, in Allocation) (out VerifyChallengeOutput)

Jump to

Keyboard shortcuts

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