Documentation ¶
Overview ¶
Package encrypted provides gophkeeper implementation that encrypts the data passed to it, and restores it.
Index ¶
- type CFBCipher
- type Cipher
- type Gophkeeper
- func (g Gophkeeper) Authenticate(ctx context.Context, credential gophkeeper.Credential) (gophkeeper.Token, error)
- func (g Gophkeeper) Identity(ctx context.Context, token gophkeeper.Token) (gophkeeper.Identity, error)
- func (g Gophkeeper) Register(ctx context.Context, credential gophkeeper.Credential) error
- type Identity
- func (i Identity) Delete(ctx context.Context, rid gophkeeper.ResourceID) error
- func (i Identity) List(ctx context.Context) ([]gophkeeper.Resource, error)
- func (i Identity) RestoreBlob(ctx context.Context, rid gophkeeper.ResourceID, password string) (gophkeeper.Blob, error)
- func (i Identity) RestorePiece(ctx context.Context, rid gophkeeper.ResourceID, password string) (gophkeeper.Piece, error)
- func (i Identity) StoreBlob(ctx context.Context, blob gophkeeper.Blob, password string) (gophkeeper.ResourceID, error)
- func (i Identity) StorePiece(ctx context.Context, piece gophkeeper.Piece, password string) (gophkeeper.ResourceID, error)
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.
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) 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.
Click to show internal directories.
Click to hide internal directories.