scrypt

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 scrypt mirrors the gem's Age::Scrypt namespace: passphrase-based age recipients and identities. An scrypt recipient must be the only recipient of a message.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Identity

type Identity struct {
	*fage.ScryptIdentity
}

Identity decrypts a passphrase-encrypted message (Age::Scrypt::Identity). Its accepted maximum work factor can be tuned with SetMaxWorkFactor. It satisfies age.Identity.

func NewIdentity

func NewIdentity(passphrase string) (*Identity, error)

NewIdentity builds a passphrase identity, mirroring Age::Scrypt::Identity.new(passphrase). The passphrase must not be empty.

type Recipient

type Recipient struct {
	*fage.ScryptRecipient
}

Recipient encrypts a message under a passphrase (Age::Scrypt::Recipient). Its work factor (log2 of the scrypt cost) can be tuned with SetWorkFactor. It satisfies age.Recipient and must be the sole recipient of a message.

func NewRecipient

func NewRecipient(passphrase string) (*Recipient, error)

NewRecipient builds a passphrase recipient, mirroring Age::Scrypt::Recipient.new(passphrase). The passphrase must not be empty.

Jump to

Keyboard shortcuts

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