crypto

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DecryptionKey

type DecryptionKey interface {
	EncryptionKey

	// Decrypt bytes.
	Decrypt([]byte) ([]byte, error)
}

EncryptionKey represents a key that can be used for decryption.

func DecryptionKeyFromBytes added in v0.1.12

func DecryptionKeyFromBytes(k []byte) (DecryptionKey, error)

DecryptionKeyFromBytes returns a DecryptionKey from k.

type EncryptionKey

type EncryptionKey interface {
	// Encrypt bytes.
	Encrypt([]byte) ([]byte, error)

	// Marshal to bytes.
	MarshalBinary() ([]byte, error)
}

EncryptionKey represents a key that can be used for encryption.

func EncryptionKeyFromBytes added in v0.1.12

func EncryptionKeyFromBytes(k []byte) (EncryptionKey, error)

EncryptionKeyFromBytes returns an EncryptionKey from k.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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