crypt

package
v0.0.0-...-ec858df Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const AllowedCharsAll = "_!#$%&*+,-.0123456789:;<=>?ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
View Source
const AllowedCharsShellFriendly = "_%+-.0123456789:ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"

Variables

This section is empty.

Functions

func DecryptFromContainer

func DecryptFromContainer(container passdata.CryptoContainer) ([]byte, error)

func EncryptToContainer

func EncryptToContainer(payload []byte) (passdata.CryptoContainer, error)

func EncryptToContainerWithPassword

func EncryptToContainerWithPassword(password []byte, payload []byte) (passdata.CryptoContainer, error)

func GeneratePassword

func GeneratePassword(length int, allowedChars string) ([]byte, error)

Types

type Encrypted

type Encrypted struct {
	KeySalt []byte
	Nonce   []byte
	Cipher  []byte
}

type Key

type Key struct {
	KeySalt []byte
	Key     []byte
}

Jump to

Keyboard shortcuts

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