identity

package
v0.374.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyPair

type KeyPair interface {
	Signer() (Signer, error)
	Verifier() (Verifier, error)
	Public() ([]byte, error)
}

type SignedData

type SignedData struct {
	Data      []byte
	Signature []byte
}

type Signer

type Signer interface {
	Sign(data []byte) (*SignedData, error)
	Public() ([]byte, error)
}

type TinkKeyPair

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

func GenerateTinkKeyPair

func GenerateTinkKeyPair() (*TinkKeyPair, error)

GenerateTinkKeyPair creates a new key pair using Tink's ED25519 key template

func NewTinkKeyPair

func NewTinkKeyPair(handle keyset.Handle) *TinkKeyPair

func (TinkKeyPair) Handle

func (t TinkKeyPair) Handle() keyset.Handle

Handle returns the keyset handle. TODO: Remove this. We don't want to expose the private key.

func (TinkKeyPair) Public

func (t TinkKeyPair) Public() ([]byte, error)

func (TinkKeyPair) Signer

func (t TinkKeyPair) Signer() (Signer, error)

func (TinkKeyPair) Verifier

func (t TinkKeyPair) Verifier() (Verifier, error)

type TinkSigner

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

func (TinkSigner) Public

func (k TinkSigner) Public() ([]byte, error)

func (TinkSigner) Sign

func (k TinkSigner) Sign(data []byte) (*SignedData, error)

type TinkVerifier

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

func (TinkVerifier) Verify

func (k TinkVerifier) Verify(signedData SignedData) error

type Verifier

type Verifier interface {
	Verify(signedData SignedData) error
}

Jump to

Keyboard shortcuts

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