crypto

package module
v0.0.0-...-08edebc Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2021 License: MIT Imports: 4 Imported by: 4

README

crypto

Handy crypto helpers used across Textile projects

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

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

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