Documentation
¶
Overview ¶
Package crypto provides a lightweight fake implementation of security.Cryptor for use in tests. It lives in its own leaf package (no dependency on internal/usecase/devices) so it can be imported by both internal (package foo) and external (package foo_test) test files without creating an import cycle through internal/mocks.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockCrypto ¶
type MockCrypto struct{}
func (MockCrypto) Encrypt ¶
func (c MockCrypto) Encrypt(_ string) (string, error)
Encrypt encrypts a string.
func (MockCrypto) EncryptWithKey ¶
func (c MockCrypto) EncryptWithKey(_, _ string) (string, error)
EncryptWithKey encrypts a string with the provided key.
func (MockCrypto) GenerateKey ¶
func (c MockCrypto) GenerateKey() string
func (MockCrypto) ReadAndDecryptFile ¶
func (c MockCrypto) ReadAndDecryptFile(_ string) (config.Configuration, error)
ReadAndDecryptFile reads encrypted data from a file and decrypts it.
Click to show internal directories.
Click to hide internal directories.