crypto: Index | Files

package crypto

import ""

Package crypto provides object encryption utilities for Temporal (, an easy-to-use interface into distributed and decentralized storage technologies for personal and enterprise use cases.


Package Files

doc.go encrypt.go

type EncryptManager Uses

type EncryptManager struct {
    // contains filtered or unexported fields

EncryptManager handles file encryption and decryption

func NewEncryptManager Uses

func NewEncryptManager(passphrase string) *EncryptManager

NewEncryptManager creates a new EncryptManager Default is CFB

func (*EncryptManager) Decrypt Uses

func (e *EncryptManager) Decrypt(r io.Reader) ([]byte, error)

Decrypt is used to handle decryption of the io.Reader

func (*EncryptManager) Encrypt Uses

func (e *EncryptManager) Encrypt(r io.Reader) ([]byte, error)

Encrypt is used to handle encryption of objects

func (*EncryptManager) RetrieveGCMDecryptionParameters Uses

func (e *EncryptManager) RetrieveGCMDecryptionParameters() ([]byte, error)

RetrieveGCMDecryptionParameters is used to retrieve GCM cipher and nonce before returning, the cipher and nonce data are formatted, and encrypted

func (*EncryptManager) WithGCM Uses

func (e *EncryptManager) WithGCM(params *GCMDecryptParams) *EncryptManager

WithGCM is used setup, and return EncryptManager for use with AES256-GCM the params are expected to be unencrypted, and in hex encoded string format

type GCMDecryptParams Uses

type GCMDecryptParams struct {
    CipherKey string
    Nonce     string

GCMDecryptParams is used to configure decryption for AES256-GCM

type Protocol Uses

type Protocol string

Protocol is used to configure encryption/decryption methods

var (
    // GCM allows for usage of AES256-GCM encryption/decryption
    GCM Protocol = "AES256-GCM"
    // CFB allows for usage of AES256-CFB encryption/decryption
    CFB Protocol = "AES256-CFB"

Package crypto imports 11 packages (graph). Updated 2019-10-20. Refresh now. Tools for package owners.