cli

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PasswordEnvVar            = "SUPACK_PASSWORD"
	MinPasswordLength         = 8
	RecommendedPasswordLength = 12
)

Variables

This section is empty.

Functions

func GetPassword

func GetPassword(prompt string, passwordFile string) ([]byte, error)

GetPassword gets password from env var, file, or prompts interactively (no confirmation)

func GetPasswordWithConfirmation

func GetPasswordWithConfirmation(passwordFile string) ([]byte, error)

GetPasswordWithConfirmation gets password from env var, file, or prompts with confirmation

func ReadKeyfile

func ReadKeyfile(path string) ([]byte, error)

ReadKeyfile reads a keyfile and returns its contents

func ReadPassword

func ReadPassword(prompt string) ([]byte, error)

ReadPassword reads a password from stdin without echoing Returns []byte that can be securely zeroed after use

func ReadPasswordFile

func ReadPasswordFile(path string) ([]byte, error)

ReadPasswordFile reads password from a file

func ReadPasswordWithConfirmation

func ReadPasswordWithConfirmation() ([]byte, error)

ReadPasswordWithConfirmation reads a password and asks for confirmation

func SecureZero

func SecureZero(data []byte)

SecureZero zeros sensitive data from memory

Types

This section is empty.

Jump to

Keyboard shortcuts

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