golcrypt

package
v0.0.0-...-1bfd785 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2023 License: MIT Imports: 14 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(blob []byte, key []byte, scheme string) ([]byte, error)

func Encrypt

func Encrypt(blob []byte, key []byte, scheme string) ([]byte, error)

func KeyForAES

func KeyForAES(key []byte) []byte

func MD5

func MD5(content []byte) string

Types

type AESBlock

type AESBlock struct {
	DataBlob DataBlob
	Cipher   Cipher
	Key      Key
}

func (*AESBlock) Decrypt

func (aesBlock *AESBlock) Decrypt() error

func (*AESBlock) Encrypt

func (aesBlock *AESBlock) Encrypt() error

type Cipher

type Cipher []byte

type DataBlob

type DataBlob []byte

type Dory

type Dory struct {
	BaseUrl       string
	Backend       string //local-auth
	Key           string
	Value         []byte
	Token         string
	KeyTTL        int //seconds, usable in cache mode only i.e. when persist is false
	Persist       bool
	ReadNotDelete bool
}

func (*Dory) Del

func (dory *Dory) Del() (err error)

func (*Dory) FetchSecret

func (dory *Dory) FetchSecret() (value []byte, err error)

func (*Dory) Get

func (dory *Dory) Get() (err error)

func (*Dory) List

func (dory *Dory) List() (err error)

func (*Dory) Ping

func (dory *Dory) Ping() (err error)

func (*Dory) PurgeAll

func (dory *Dory) PurgeAll() (err error)

func (*Dory) PurgeSecret

func (dory *Dory) PurgeSecret() (err error)

func (*Dory) RefreshSecret

func (dory *Dory) RefreshSecret() (value []byte, err error)

func (*Dory) Set

func (dory *Dory) Set() (err error)

func (*Dory) ShareSecret

func (dory *Dory) ShareSecret(value []byte) (err error)

func (*Dory) ShareSecretFromFile

func (dory *Dory) ShareSecretFromFile(filepath string) (err error)

type Key

type Key []byte

Jump to

Keyboard shortcuts

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