cipher

package
v0.18.4 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package cipher provides an encryption and decryption interface.

It abstracts from the used cipher algorithm

Index

Constants

This section is empty.

Variables

View Source
var (
	// Password is the key one needs to derypt trice logs if enncrypted
	Password string

	// ShowKey, if set, allows to see the encryption passphrase
	ShowKey bool

	Key []byte
)

local config values

Functions

func Decrypt8

func Decrypt8(b []byte) (d []byte)

Decrypt8 translates an Encrypt protected byte slice back in a slice of length 8.

Shorter slices are extented with 0 until length 8. Langer slices are truncated to length 8.

func Encrypt8

func Encrypt8(b []byte) (e []byte)

Encrypt8 translates a byte slice in a protected slice of length 8.

Shorter slices are extented with 0x16 until length 8. Langer slices are truncated to length 8.

func SetUp

func SetUp() error

SetUp uses the Password to create a cipher. If Password is "none" encryption/decryption is disabled.

Types

This section is empty.

Jump to

Keyboard shortcuts

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