vbox

package module
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2022 License: Unlicense Imports: 6 Imported by: 4

README

vbox

encrypted black box!

Install

go get -u github.com/lemon-mint/vbox
import "github.com/lemon-mint/vbox"

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlackBox

type BlackBox struct {
	// contains filtered or unexported fields
}

func NewBlackBox

func NewBlackBox(key []byte) *BlackBox

func (*BlackBox) Base64Open added in v1.3.0

func (b *BlackBox) Base64Open(src string) ([]byte, bool)

Base64Open decode the data from base64 raw URL encoding and Open it.

func (*BlackBox) Base64Seal added in v1.3.0

func (b *BlackBox) Base64Seal(src []byte) string

Base64Seal Seal and encode the data to base64 raw URL encoding.

func (*BlackBox) Open

func (b *BlackBox) Open(src []byte) ([]byte, bool)

Open allocates a new slice and copies the decrypted data into it.

func (*BlackBox) OpenOverWrite added in v1.1.0

func (b *BlackBox) OpenOverWrite(src []byte) ([]byte, bool)

OpenOverWrite overwrites the input slice with the decrypted data. Better Performance than Open. But the input slice will be overwritten.

func (*BlackBox) Seal

func (b *BlackBox) Seal(src []byte) []byte

Seal allocates a new slice and copies the encrypted data into it.

Jump to

Keyboard shortcuts

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