jiami

package module
v0.0.0-...-d9d1f5f Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2022 License: MIT Imports: 6 Imported by: 1

README

jiami

encryption wrapping for golang

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AesGcm

type AesGcm struct{}

func NewAesGcm

func NewAesGcm() *AesGcm

func (*AesGcm) Decrypt

func (*AesGcm) Decrypt(key *Key, en *Encoded) ([]byte, error)

func (*AesGcm) Encrypt

func (*AesGcm) Encrypt(key *Key, in *Plain) (*Encoded, error)

type Encoded

type Encoded struct {
	Salt []byte
	IV   []byte
	Data []byte
}

type Key

type Key struct {
	Passphrase []byte
	Key        []byte
	Salt       []byte
}

func (*Key) Init

func (k *Key) Init() error

type Plain

type Plain struct {
	// Required
	Data []byte

	// Optional
	Salt           []byte
	IV             []byte
	AdditionalData []byte
}

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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