crypto

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2021 License: BSD-3-Clause Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidCipherText = fmt.Errorf("invalid cipher text")

ErrInvalidCipherText encryption cipher text is not valid.

View Source
var ErrInvalidKey = fmt.Errorf("invalid encryption key")

ErrInvalidKey encryption key is not valid.

View Source
var ErrKeyAlreadyUsed = fmt.Errorf("encryption key already used")

ErrKeyAlreadyUsed encryption key has already been set for subjectID.

View Source
var ErrKeyExistsForSubjectID = fmt.Errorf("key already exists for subjectID")

ErrKeyExistsForSubjectID encryption key has already been set for subjectID.

View Source
var ErrKeyNotFound = fmt.Errorf("key not found")

ErrKeyNotFound encryption key was not found error.

View Source
var ErrKeyWasDeleted = fmt.Errorf("removed from GDPR request")

ErrKeyWasDeleted encryption key was removed error.

Functions

This section is empty.

Types

type Encryptor

type Encryptor interface {
	Encrypt(key, plainText string) (string, error)
	Decrypt(key, cipherText string) (string, error)
}

Encryptor defines how to encrypt/decrypt string data using base64.

type EventEncryptor

type EventEncryptor interface {
	Encrypt(event rangedb.Event) error
	Decrypt(event rangedb.Event) error
}

EventEncryptor defines how to encrypt/decrypt a rangedb.Event

type KeyStore

type KeyStore interface {
	Get(subjectID string) (string, error)
	Set(subjectID, key string) error
	Delete(subjectID string) error
}

KeyStore defines how encryption keys are stored. Verified by cryptotest.VerifyKeyStore.

type SelfEncryptor

type SelfEncryptor interface {
	Encrypt(encryptor Encryptor) error
	Decrypt(encryptor Encryptor) error
}

SelfEncryptor defines how events encrypt/decrypt themselves.

Directories

Path Synopsis
aes
Code generated by go generate; DO NOT EDIT.
Code generated by go generate; DO NOT EDIT.
provider

Jump to

Keyboard shortcuts

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