x25519

package
v0.0.0-...-198f201 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2026 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package x25519 mirrors the gem's Age::X25519 namespace: native age X25519 key-pair recipients and identities, whose string forms are the familiar "age1…" recipients and "AGE-SECRET-KEY-1…" identities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Identity

type Identity struct {
	*fage.X25519Identity
}

Identity is an X25519 key pair (Age::X25519::Identity). Its String form is an "AGE-SECRET-KEY-1…" secret key. It satisfies age.Identity.

func Generate

func Generate() (*Identity, error)

Generate creates a fresh X25519 key pair, mirroring Age::X25519::Identity.generate.

func ParseIdentity

func ParseIdentity(s string) (*Identity, error)

ParseIdentity parses an "AGE-SECRET-KEY-1…" secret key.

func (*Identity) ToPublic

func (i *Identity) ToPublic() *Recipient

ToPublic returns the public recipient for this identity, mirroring Age::X25519::Identity#to_public.

type Recipient

type Recipient struct {
	*fage.X25519Recipient
}

Recipient is an X25519 public recipient (Age::X25519::Recipient). Its String form is an "age1…" recipient. It satisfies age.Recipient.

func ParseRecipient

func ParseRecipient(s string) (*Recipient, error)

ParseRecipient parses an "age1…" recipient, mirroring Age::X25519::Recipient.from_string.

Jump to

Keyboard shortcuts

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