encryption

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHasher

func NewHasher(salt string) (*hashids.HashID, error)

NewHasher creates a new hasher for decoding and encoding int64 slices

func ParseKey

func ParseKey(key []byte) ([]byte, error)

ParseKey parses an encryption key truncating it to the nearest 16 or 24 or 32 bit. If key is less 16 returns error

Types

type Interface

type Interface interface {
	Encrypt(data []byte) ([]byte, error)
	Decrypt(cipher []byte) ([]byte, error)
}

Interface is a higher level interface for encryption and decryption of arbitrary data

func NewInterface

func NewInterface(key []byte) (Interface, error)

NewInterface creates a new symetric encryption interface

Jump to

Keyboard shortcuts

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