key

package
v0.2.11 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2023 License: Apache-2.0 Imports: 13 Imported by: 2

Documentation

Index

Constants

View Source
const (
	V1IdentityPublicKeyPrefix = "v1.ipk."
	V2IdentityPublicKeyPrefix = "v2.ipk."
)

Variables

This section is empty.

Functions

This section is empty.

Types

type JSONWebKey

type JSONWebKey struct {
	Kty string `json:"kty"`
	Crv string `json:"crv"`
	X   string `json:"x,omitempty"`
	Y   string `json:"y,omitempty"`
	D   string `json:"d,omitempty"`
}

JSONWebKey holds internal container key attributes.

func Ed25519

func Ed25519(random io.Reader) (*JSONWebKey, string, error)

func Legacy

func Legacy(random io.Reader) (*JSONWebKey, string, error)

func P384

func P384(random io.Reader) (*JSONWebKey, string, error)

func (*JSONWebKey) RecoveryKey

func (k *JSONWebKey) RecoveryKey() (string, error)

RecoveryKey returns the private encryption key from the private identity key.

func (*JSONWebKey) Sign

func (k *JSONWebKey) Sign(message []byte) (string, error)

type Key

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

func FromString

func FromString(input string) (*Key, error)

func (*Key) SealingKey

func (k *Key) SealingKey() string

func (*Key) String

func (k *Key) String() string

func (*Key) Verify

func (k *Key) Verify(message, signature []byte) bool

Jump to

Keyboard shortcuts

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