password

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2025 License: BSD-2-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct{}

Provider implements the domain.PasswordProvider interface.

func NewProvider

func NewProvider() *Provider

NewProvider creates a new password provider.

func (*Provider) GetMasterPassword

func (p *Provider) GetMasterPassword(ctx context.Context, cfg domain.PasswordConfig) ([]byte, error)

GetMasterPassword retrieves the master password from file, env, or interactive prompt.

func (*Provider) GetNewMasterPassword

func (p *Provider) GetNewMasterPassword(ctx context.Context, minLength int) ([]byte, error)

GetNewMasterPassword prompts the user to enter and confirm a new password.

type StaticPasswordProvider

type StaticPasswordProvider struct {
	Password []byte
}

StaticPasswordProvider implements domain.PasswordProvider with a pre-set password. Used during re-encryption to provide the new password to the identity provider.

func (*StaticPasswordProvider) GetMasterPassword

func (s *StaticPasswordProvider) GetMasterPassword(ctx context.Context, cfg domain.PasswordConfig) ([]byte, error)

func (*StaticPasswordProvider) GetNewMasterPassword

func (s *StaticPasswordProvider) GetNewMasterPassword(ctx context.Context, minLength int) ([]byte, error)

Jump to

Keyboard shortcuts

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