zitadel/internal/crypto/crypto_mock.go

224 lines
7.3 KiB
Go
Raw Normal View History

2020-03-23 06:06:44 +00:00
// Code generated by MockGen. DO NOT EDIT.
// Source: crypto.go
// Package crypto is a generated GoMock package.
package crypto
import (
gomock "github.com/golang/mock/gomock"
reflect "reflect"
)
// MockCrypto is a mock of Crypto interface
type MockCrypto struct {
ctrl *gomock.Controller
recorder *MockCryptoMockRecorder
}
// MockCryptoMockRecorder is the mock recorder for MockCrypto
type MockCryptoMockRecorder struct {
mock *MockCrypto
}
// NewMockCrypto creates a new mock instance
func NewMockCrypto(ctrl *gomock.Controller) *MockCrypto {
mock := &MockCrypto{ctrl: ctrl}
mock.recorder = &MockCryptoMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *MockCrypto) EXPECT() *MockCryptoMockRecorder {
return m.recorder
}
// Algorithm mocks base method
func (m *MockCrypto) Algorithm() string {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Algorithm")
ret0, _ := ret[0].(string)
return ret0
}
// Algorithm indicates an expected call of Algorithm
func (mr *MockCryptoMockRecorder) Algorithm() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Algorithm", reflect.TypeOf((*MockCrypto)(nil).Algorithm))
}
2020-03-30 07:28:00 +00:00
// MockEncryptionAlgorithm is a mock of EncryptionAlgorithm interface
type MockEncryptionAlgorithm struct {
2020-03-23 06:06:44 +00:00
ctrl *gomock.Controller
2020-03-30 07:28:00 +00:00
recorder *MockEncryptionAlgorithmMockRecorder
2020-03-23 06:06:44 +00:00
}
2020-03-30 07:28:00 +00:00
// MockEncryptionAlgorithmMockRecorder is the mock recorder for MockEncryptionAlgorithm
type MockEncryptionAlgorithmMockRecorder struct {
mock *MockEncryptionAlgorithm
2020-03-23 06:06:44 +00:00
}
2020-03-30 07:28:00 +00:00
// NewMockEncryptionAlgorithm creates a new mock instance
func NewMockEncryptionAlgorithm(ctrl *gomock.Controller) *MockEncryptionAlgorithm {
mock := &MockEncryptionAlgorithm{ctrl: ctrl}
mock.recorder = &MockEncryptionAlgorithmMockRecorder{mock}
2020-03-23 06:06:44 +00:00
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
2020-03-30 07:28:00 +00:00
func (m *MockEncryptionAlgorithm) EXPECT() *MockEncryptionAlgorithmMockRecorder {
2020-03-23 06:06:44 +00:00
return m.recorder
}
// Algorithm mocks base method
2020-03-30 07:28:00 +00:00
func (m *MockEncryptionAlgorithm) Algorithm() string {
2020-03-23 06:06:44 +00:00
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Algorithm")
ret0, _ := ret[0].(string)
return ret0
}
// Algorithm indicates an expected call of Algorithm
2020-03-30 07:28:00 +00:00
func (mr *MockEncryptionAlgorithmMockRecorder) Algorithm() *gomock.Call {
2020-03-23 06:06:44 +00:00
mr.mock.ctrl.T.Helper()
2020-03-30 07:28:00 +00:00
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Algorithm", reflect.TypeOf((*MockEncryptionAlgorithm)(nil).Algorithm))
2020-03-23 06:06:44 +00:00
}
// EncryptionKeyID mocks base method
2020-03-30 07:28:00 +00:00
func (m *MockEncryptionAlgorithm) EncryptionKeyID() string {
2020-03-23 06:06:44 +00:00
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "EncryptionKeyID")
ret0, _ := ret[0].(string)
return ret0
}
// EncryptionKeyID indicates an expected call of EncryptionKeyID
2020-03-30 07:28:00 +00:00
func (mr *MockEncryptionAlgorithmMockRecorder) EncryptionKeyID() *gomock.Call {
2020-03-23 06:06:44 +00:00
mr.mock.ctrl.T.Helper()
2020-03-30 07:28:00 +00:00
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EncryptionKeyID", reflect.TypeOf((*MockEncryptionAlgorithm)(nil).EncryptionKeyID))
2020-03-23 06:06:44 +00:00
}
// DecryptionKeyIDs mocks base method
2020-03-30 07:28:00 +00:00
func (m *MockEncryptionAlgorithm) DecryptionKeyIDs() []string {
2020-03-23 06:06:44 +00:00
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "DecryptionKeyIDs")
ret0, _ := ret[0].([]string)
return ret0
}
// DecryptionKeyIDs indicates an expected call of DecryptionKeyIDs
2020-03-30 07:28:00 +00:00
func (mr *MockEncryptionAlgorithmMockRecorder) DecryptionKeyIDs() *gomock.Call {
2020-03-23 06:06:44 +00:00
mr.mock.ctrl.T.Helper()
2020-03-30 07:28:00 +00:00
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DecryptionKeyIDs", reflect.TypeOf((*MockEncryptionAlgorithm)(nil).DecryptionKeyIDs))
2020-03-23 06:06:44 +00:00
}
// Encrypt mocks base method
2020-03-30 07:28:00 +00:00
func (m *MockEncryptionAlgorithm) Encrypt(value []byte) ([]byte, error) {
2020-03-23 06:06:44 +00:00
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Encrypt", value)
ret0, _ := ret[0].([]byte)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Encrypt indicates an expected call of Encrypt
2020-03-30 07:28:00 +00:00
func (mr *MockEncryptionAlgorithmMockRecorder) Encrypt(value interface{}) *gomock.Call {
2020-03-23 06:06:44 +00:00
mr.mock.ctrl.T.Helper()
2020-03-30 07:28:00 +00:00
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Encrypt", reflect.TypeOf((*MockEncryptionAlgorithm)(nil).Encrypt), value)
2020-03-23 06:06:44 +00:00
}
// Decrypt mocks base method
2020-03-30 07:28:00 +00:00
func (m *MockEncryptionAlgorithm) Decrypt(hashed []byte, keyID string) ([]byte, error) {
2020-03-23 06:06:44 +00:00
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Decrypt", hashed, keyID)
ret0, _ := ret[0].([]byte)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Decrypt indicates an expected call of Decrypt
2020-03-30 07:28:00 +00:00
func (mr *MockEncryptionAlgorithmMockRecorder) Decrypt(hashed, keyID interface{}) *gomock.Call {
2020-03-23 06:06:44 +00:00
mr.mock.ctrl.T.Helper()
2020-03-30 07:28:00 +00:00
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Decrypt", reflect.TypeOf((*MockEncryptionAlgorithm)(nil).Decrypt), hashed, keyID)
2020-03-23 06:06:44 +00:00
}
// DecryptString mocks base method
2020-03-30 07:28:00 +00:00
func (m *MockEncryptionAlgorithm) DecryptString(hashed []byte, keyID string) (string, error) {
2020-03-23 06:06:44 +00:00
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "DecryptString", hashed, keyID)
ret0, _ := ret[0].(string)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// DecryptString indicates an expected call of DecryptString
2020-03-30 07:28:00 +00:00
func (mr *MockEncryptionAlgorithmMockRecorder) DecryptString(hashed, keyID interface{}) *gomock.Call {
2020-03-23 06:06:44 +00:00
mr.mock.ctrl.T.Helper()
2020-03-30 07:28:00 +00:00
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DecryptString", reflect.TypeOf((*MockEncryptionAlgorithm)(nil).DecryptString), hashed, keyID)
2020-03-23 06:06:44 +00:00
}
2020-03-30 07:28:00 +00:00
// MockHashAlgorithm is a mock of HashAlgorithm interface
type MockHashAlgorithm struct {
2020-03-23 06:06:44 +00:00
ctrl *gomock.Controller
2020-03-30 07:28:00 +00:00
recorder *MockHashAlgorithmMockRecorder
2020-03-23 06:06:44 +00:00
}
2020-03-30 07:28:00 +00:00
// MockHashAlgorithmMockRecorder is the mock recorder for MockHashAlgorithm
type MockHashAlgorithmMockRecorder struct {
mock *MockHashAlgorithm
2020-03-23 06:06:44 +00:00
}
2020-03-30 07:28:00 +00:00
// NewMockHashAlgorithm creates a new mock instance
func NewMockHashAlgorithm(ctrl *gomock.Controller) *MockHashAlgorithm {
mock := &MockHashAlgorithm{ctrl: ctrl}
mock.recorder = &MockHashAlgorithmMockRecorder{mock}
2020-03-23 06:06:44 +00:00
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
2020-03-30 07:28:00 +00:00
func (m *MockHashAlgorithm) EXPECT() *MockHashAlgorithmMockRecorder {
2020-03-23 06:06:44 +00:00
return m.recorder
}
// Algorithm mocks base method
2020-03-30 07:28:00 +00:00
func (m *MockHashAlgorithm) Algorithm() string {
2020-03-23 06:06:44 +00:00
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Algorithm")
ret0, _ := ret[0].(string)
return ret0
}
// Algorithm indicates an expected call of Algorithm
2020-03-30 07:28:00 +00:00
func (mr *MockHashAlgorithmMockRecorder) Algorithm() *gomock.Call {
2020-03-23 06:06:44 +00:00
mr.mock.ctrl.T.Helper()
2020-03-30 07:28:00 +00:00
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Algorithm", reflect.TypeOf((*MockHashAlgorithm)(nil).Algorithm))
2020-03-23 06:06:44 +00:00
}
// Hash mocks base method
2020-03-30 07:28:00 +00:00
func (m *MockHashAlgorithm) Hash(value []byte) ([]byte, error) {
2020-03-23 06:06:44 +00:00
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Hash", value)
ret0, _ := ret[0].([]byte)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Hash indicates an expected call of Hash
2020-03-30 07:28:00 +00:00
func (mr *MockHashAlgorithmMockRecorder) Hash(value interface{}) *gomock.Call {
2020-03-23 06:06:44 +00:00
mr.mock.ctrl.T.Helper()
2020-03-30 07:28:00 +00:00
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Hash", reflect.TypeOf((*MockHashAlgorithm)(nil).Hash), value)
2020-03-23 06:06:44 +00:00
}
// CompareHash mocks base method
2020-03-30 07:28:00 +00:00
func (m *MockHashAlgorithm) CompareHash(hashed, comparer []byte) error {
2020-03-23 06:06:44 +00:00
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "CompareHash", hashed, comparer)
ret0, _ := ret[0].(error)
return ret0
}
// CompareHash indicates an expected call of CompareHash
2020-03-30 07:28:00 +00:00
func (mr *MockHashAlgorithmMockRecorder) CompareHash(hashed, comparer interface{}) *gomock.Call {
2020-03-23 06:06:44 +00:00
mr.mock.ctrl.T.Helper()
2020-03-30 07:28:00 +00:00
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CompareHash", reflect.TypeOf((*MockHashAlgorithm)(nil).CompareHash), hashed, comparer)
2020-03-23 06:06:44 +00:00
}