blobcrypto

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package blobcrypto performs whole-blob crypto operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(c Crypter, payload gather.Bytes, blobID blob.ID, output *gather.WriteBuffer) error

Decrypt decrypts the provided data using provided blobID to derive initialization vector.

func Encrypt

func Encrypt(c Crypter, payload gather.Bytes, prefix, suffix blob.ID, output *gather.WriteBuffer) (blob.ID, error)

Encrypt encrypts the given data using crypter-defined key and returns a name that should be used to save the blob in the repository.

Types

type Crypter

type Crypter interface {
	HashFunc() hashing.HashFunc
	Encryptor() encryption.Encryptor
}

Crypter ecapsulates hashing and encryption.

Jump to

Keyboard shortcuts

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