encrypted

package
v0.0.0-...-d4747eb Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package encrypted provides gophkeeper implementation that encrypts the data passed to it, and restores it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CFBCipher

type CFBCipher struct{}

CFBCipher is a CFB Cipher.

func (CFBCipher) Decrypter

func (c CFBCipher) Decrypter(block cipher.Block, iv []byte) cipher.Stream

Decrypter implements Cipher.

func (CFBCipher) Encrypter

func (c CFBCipher) Encrypter(block cipher.Block, iv []byte) cipher.Stream

Encrypter implements Cipher.

type Cipher

type Cipher interface {
	// Encrypter returns encrypting Stream.
	Encrypter(block cipher.Block, iv []byte) cipher.Stream

	// Decrypter returns decrypting Stream.
	Decrypter(block cipher.Block, iv []byte) cipher.Stream
}

Cipher is a factory of encrypter and pairing decrypters.

type Gophkeeper

type Gophkeeper struct {
	Origin gophkeeper.Gophkeeper
	Cipher Cipher
}

Gophkeeper is an ecrypted Gophkeeper.

func (Gophkeeper) Authenticate

func (g Gophkeeper) Authenticate(ctx context.Context, credential gophkeeper.Credential) (gophkeeper.Token, error)

Authenticate implements gophkeeper.Gophkeeper.

func (Gophkeeper) Identity

func (g Gophkeeper) Identity(ctx context.Context, token gophkeeper.Token) (gophkeeper.Identity, error)

Identity implements gophkeeper.Gophkeeper.

func (Gophkeeper) Register

func (g Gophkeeper) Register(ctx context.Context, credential gophkeeper.Credential) error

Register implements gophkeeper.Gophkeeper.

type Identity

type Identity struct {
	Origin gophkeeper.Identity
	Cipher Cipher
}

Identity is an encrpypted gophkeeper Identity.

func (Identity) Delete

func (i Identity) Delete(ctx context.Context, rid gophkeeper.ResourceID) error

Delete implements gophkeeper.Identity.

func (Identity) List

func (i Identity) List(ctx context.Context) ([]gophkeeper.Resource, error)

List implements gophkeeper.Identity.

func (Identity) RestoreBlob

func (i Identity) RestoreBlob(ctx context.Context, rid gophkeeper.ResourceID, password string) (gophkeeper.Blob, error)

RestoreBlob implements gophkeeper.Identity.

func (Identity) RestorePiece

func (i Identity) RestorePiece(ctx context.Context, rid gophkeeper.ResourceID, password string) (gophkeeper.Piece, error)

RestorePiece implements gophkeeper.Identity.

func (Identity) StoreBlob

func (i Identity) StoreBlob(ctx context.Context, blob gophkeeper.Blob, password string) (gophkeeper.ResourceID, error)

StoreBlob implements gophkeeper.Identity.

func (Identity) StorePiece

func (i Identity) StorePiece(ctx context.Context, piece gophkeeper.Piece, password string) (gophkeeper.ResourceID, error)

StorePiece implements gophkeeper.Identity.

Directories

Path Synopsis
Package encryption provides encryption utils.
Package encryption provides encryption utils.

Jump to

Keyboard shortcuts

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