Documentation ¶
Overview ¶
Package cryptography was made to encrypt sensitive data.
Package cryptography is a generated GoMock package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cryptography ¶
type Cryptography struct {
// contains filtered or unexported fields
}
Cryptography struct.
func NewCryptography ¶
func NewCryptography(key []byte, nonce []byte) *Cryptography
NewCryptography returns a new Cryptography struct.
type ICryptography ¶
type ICryptography interface { /* Encrypt returns a string with the plainText encrypted if "plainText" was a error then it will return a empty string and a error */ Encrypt(string) (string, error) /* Decrypt returns a string with the ciphertext decrypted if "ciphertext" was a error then it will return a empty string and a error */ Decrypt(string) (string, error) }
ICryptography is Cryptography interface to use when you wanna make a default setup on its methods. nolint:lll // go generate line go:generate mockgen -source=/cryptography/cryptography.go -destination=/cryptography/cryptography_mock.go -package=cryptography
type MockICryptography ¶
type MockICryptography struct {
// contains filtered or unexported fields
}
MockICryptography is a mock of ICryptography interface.
func NewMockICryptography ¶
func NewMockICryptography(ctrl *gomock.Controller) *MockICryptography
NewMockICryptography creates a new mock instance.
func (*MockICryptography) Decrypt ¶
func (m *MockICryptography) Decrypt(arg0 string) (string, error)
Decrypt mocks base method.
func (*MockICryptography) EXPECT ¶
func (m *MockICryptography) EXPECT() *MockICryptographyMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockICryptographyMockRecorder ¶
type MockICryptographyMockRecorder struct {
// contains filtered or unexported fields
}
MockICryptographyMockRecorder is the mock recorder for MockICryptography.
func (*MockICryptographyMockRecorder) Decrypt ¶
func (mr *MockICryptographyMockRecorder) Decrypt(arg0 interface{}) *gomock.Call
Decrypt indicates an expected call of Decrypt.
func (*MockICryptographyMockRecorder) Encrypt ¶
func (mr *MockICryptographyMockRecorder) Encrypt(arg0 interface{}) *gomock.Call
Encrypt indicates an expected call of Encrypt.