container

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateContainer

func CreateContainer(plaintext, password string) (string, error)

func DecryptContainer

func DecryptContainer(containerJSON, password string) (string, error)

Types

type Container

type Container struct {
	ContainerMeta  Meta       `json:"ContainerMeta"`
	DeriveInfo     Derive     `json:"DeriveInfo"`
	EncryptionInfo Encryption `json:"EncryptionInfo"`
	ContainedData  Data       `json:"ContainedData"`
}

func (*Container) SetContainedData

func (c *Container) SetContainedData(encryptedData, hmac string)

func (*Container) SetContainerMeta

func (c *Container) SetContainerMeta(version string)

func (*Container) SetDeriveInfo

func (c *Container) SetDeriveInfo(salt string, iters int)

func (*Container) SetEncryptionInfo

func (c *Container) SetEncryptionInfo(iv string)

type Data

type Data struct {
	EncryptedData string `json:"EncryptedData"`
	HMAC          string `json:"HMAC"`
}

type Derive

type Derive struct {
	Salt  string `json:"Salt"`
	Iters int    `json:"Iters"`
}

type Encryption

type Encryption struct {
	IV string `json:"IV"`
}

type Meta

type Meta struct {
	Version string `json:"Version"`
}

Jump to

Keyboard shortcuts

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