passphrase

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EncryptedPassphrase

type EncryptedPassphrase struct {
	Ciphertext []byte
}

func NewEncryptedPassphrase

func NewEncryptedPassphrase(ciphertext []byte) *EncryptedPassphrase

type EncryptedPassphraseService

type EncryptedPassphraseService struct {
	// contains filtered or unexported fields
}

func NewEncryptedPassphraseService

func NewEncryptedPassphraseService(
	base64Service base64Service,
	rsaService rsaService,
) *EncryptedPassphraseService

func (*EncryptedPassphraseService) Decrypt

func (s *EncryptedPassphraseService) Decrypt(
	privateKey *stdRsa.PrivateKey,
	encryptedPassphrase *EncryptedPassphrase,
) (*Passphrase, error)

func (*EncryptedPassphraseService) Deserialize

func (s *EncryptedPassphraseService) Deserialize(encoded []byte) (*EncryptedPassphrase, error)

func (*EncryptedPassphraseService) Encrypt

func (s *EncryptedPassphraseService) Encrypt(
	publicKey *stdRsa.PublicKey,
	passphrase *Passphrase,
) (*EncryptedPassphrase, error)

func (*EncryptedPassphraseService) GeneratePassphrase

func (s *EncryptedPassphraseService) GeneratePassphrase(length int) (*Passphrase, error)

func (*EncryptedPassphraseService) Serialize

func (s *EncryptedPassphraseService) Serialize(encryptedPassphrase *EncryptedPassphrase) ([]byte, error)

type Passphrase

type Passphrase struct {
	Content []byte
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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