Documentation ¶
Index ¶
- type Hasher
- type KeyProcessor
- type KeyStore
- type PlatformCryptographyScheme
- type Service
- type ServiceMock
- func (mmGetPublicKey *ServiceMock) GetPublicKey() (p1 crypto.PublicKey, err error)
- func (mmGetPublicKey *ServiceMock) GetPublicKeyAfterCounter() uint64
- func (mmGetPublicKey *ServiceMock) GetPublicKeyBeforeCounter() uint64
- func (m *ServiceMock) MinimockFinish()
- func (m *ServiceMock) MinimockGetPublicKeyDone() bool
- func (m *ServiceMock) MinimockGetPublicKeyInspect()
- func (m *ServiceMock) MinimockSignDone() bool
- func (m *ServiceMock) MinimockSignInspect()
- func (m *ServiceMock) MinimockVerifyDone() bool
- func (m *ServiceMock) MinimockVerifyInspect()
- func (m *ServiceMock) MinimockWait(timeout mm_time.Duration)
- func (mmSign *ServiceMock) Sign(ba1 []byte) (sp1 *Signature, err error)
- func (mmSign *ServiceMock) SignAfterCounter() uint64
- func (mmSign *ServiceMock) SignBeforeCounter() uint64
- func (mmVerify *ServiceMock) Verify(p1 crypto.PublicKey, s1 Signature, ba1 []byte) (b1 bool)
- func (mmVerify *ServiceMock) VerifyAfterCounter() uint64
- func (mmVerify *ServiceMock) VerifyBeforeCounter() uint64
- type ServiceMockGetPublicKeyExpectation
- type ServiceMockGetPublicKeyResults
- type ServiceMockSignExpectation
- type ServiceMockSignParams
- type ServiceMockSignResults
- type ServiceMockVerifyExpectation
- type ServiceMockVerifyParams
- type ServiceMockVerifyResults
- type Signature
- type Signer
- type Verifier
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KeyProcessor ¶
type KeyProcessor interface { GeneratePrivateKey() (crypto.PrivateKey, error) ExtractPublicKey(crypto.PrivateKey) crypto.PublicKey ExportPublicKeyPEM(crypto.PublicKey) ([]byte, error) ImportPublicKeyPEM([]byte) (crypto.PublicKey, error) ExportPrivateKeyPEM(crypto.PrivateKey) ([]byte, error) ImportPrivateKeyPEM([]byte) (crypto.PrivateKey, error) ExportPublicKeyBinary(crypto.PublicKey) ([]byte, error) ImportPublicKeyBinary([]byte) (crypto.PublicKey, error) }
type PlatformCryptographyScheme ¶
type PlatformCryptographyScheme interface { PublicKeySize() int SignatureSize() int ReferenceHashSize() int ReferenceHasher() Hasher IntegrityHashSize() int IntegrityHasher() Hasher DataSigner(crypto.PrivateKey, Hasher) Signer DigestSigner(key crypto.PrivateKey) Signer DataVerifier(crypto.PublicKey, Hasher) Verifier DigestVerifier(crypto.PublicKey) Verifier }
type ServiceMock ¶
type ServiceMock struct { GetPublicKeyMock mServiceMockGetPublicKey SignMock mServiceMockSign VerifyMock mServiceMockVerify // contains filtered or unexported fields }
ServiceMock implements Service
func NewServiceMock ¶
func NewServiceMock(t minimock.Tester) *ServiceMock
NewServiceMock returns a mock for Service
func (*ServiceMock) GetPublicKey ¶
func (mmGetPublicKey *ServiceMock) GetPublicKey() (p1 crypto.PublicKey, err error)
GetPublicKey implements Service
func (*ServiceMock) GetPublicKeyAfterCounter ¶
func (mmGetPublicKey *ServiceMock) GetPublicKeyAfterCounter() uint64
GetPublicKeyAfterCounter returns a count of finished ServiceMock.GetPublicKey invocations
func (*ServiceMock) GetPublicKeyBeforeCounter ¶
func (mmGetPublicKey *ServiceMock) GetPublicKeyBeforeCounter() uint64
GetPublicKeyBeforeCounter returns a count of ServiceMock.GetPublicKey invocations
func (*ServiceMock) MinimockFinish ¶
func (m *ServiceMock) MinimockFinish()
MinimockFinish checks that all mocked methods have been called the expected number of times
func (*ServiceMock) MinimockGetPublicKeyDone ¶
func (m *ServiceMock) MinimockGetPublicKeyDone() bool
MinimockGetPublicKeyDone returns true if the count of the GetPublicKey invocations corresponds the number of defined expectations
func (*ServiceMock) MinimockGetPublicKeyInspect ¶
func (m *ServiceMock) MinimockGetPublicKeyInspect()
MinimockGetPublicKeyInspect logs each unmet expectation
func (*ServiceMock) MinimockSignDone ¶
func (m *ServiceMock) MinimockSignDone() bool
MinimockSignDone returns true if the count of the Sign invocations corresponds the number of defined expectations
func (*ServiceMock) MinimockSignInspect ¶
func (m *ServiceMock) MinimockSignInspect()
MinimockSignInspect logs each unmet expectation
func (*ServiceMock) MinimockVerifyDone ¶
func (m *ServiceMock) MinimockVerifyDone() bool
MinimockVerifyDone returns true if the count of the Verify invocations corresponds the number of defined expectations
func (*ServiceMock) MinimockVerifyInspect ¶
func (m *ServiceMock) MinimockVerifyInspect()
MinimockVerifyInspect logs each unmet expectation
func (*ServiceMock) MinimockWait ¶
func (m *ServiceMock) MinimockWait(timeout mm_time.Duration)
MinimockWait waits for all mocked methods to be called the expected number of times
func (*ServiceMock) Sign ¶
func (mmSign *ServiceMock) Sign(ba1 []byte) (sp1 *Signature, err error)
Sign implements Service
func (*ServiceMock) SignAfterCounter ¶
func (mmSign *ServiceMock) SignAfterCounter() uint64
SignAfterCounter returns a count of finished ServiceMock.Sign invocations
func (*ServiceMock) SignBeforeCounter ¶
func (mmSign *ServiceMock) SignBeforeCounter() uint64
SignBeforeCounter returns a count of ServiceMock.Sign invocations
func (*ServiceMock) VerifyAfterCounter ¶
func (mmVerify *ServiceMock) VerifyAfterCounter() uint64
VerifyAfterCounter returns a count of finished ServiceMock.Verify invocations
func (*ServiceMock) VerifyBeforeCounter ¶
func (mmVerify *ServiceMock) VerifyBeforeCounter() uint64
VerifyBeforeCounter returns a count of ServiceMock.Verify invocations
type ServiceMockGetPublicKeyExpectation ¶
type ServiceMockGetPublicKeyExpectation struct { Counter uint64 // contains filtered or unexported fields }
ServiceMockGetPublicKeyExpectation specifies expectation struct of the Service.GetPublicKey
type ServiceMockGetPublicKeyResults ¶
type ServiceMockGetPublicKeyResults struct {
// contains filtered or unexported fields
}
ServiceMockGetPublicKeyResults contains results of the Service.GetPublicKey
type ServiceMockSignExpectation ¶
type ServiceMockSignExpectation struct { Counter uint64 // contains filtered or unexported fields }
ServiceMockSignExpectation specifies expectation struct of the Service.Sign
func (*ServiceMockSignExpectation) Then ¶
func (e *ServiceMockSignExpectation) Then(sp1 *Signature, err error) *ServiceMock
Then sets up Service.Sign return parameters for the expectation previously defined by the When method
type ServiceMockSignParams ¶
type ServiceMockSignParams struct {
// contains filtered or unexported fields
}
ServiceMockSignParams contains parameters of the Service.Sign
type ServiceMockSignResults ¶
type ServiceMockSignResults struct {
// contains filtered or unexported fields
}
ServiceMockSignResults contains results of the Service.Sign
type ServiceMockVerifyExpectation ¶
type ServiceMockVerifyExpectation struct { Counter uint64 // contains filtered or unexported fields }
ServiceMockVerifyExpectation specifies expectation struct of the Service.Verify
func (*ServiceMockVerifyExpectation) Then ¶
func (e *ServiceMockVerifyExpectation) Then(b1 bool) *ServiceMock
Then sets up Service.Verify return parameters for the expectation previously defined by the When method
type ServiceMockVerifyParams ¶
type ServiceMockVerifyParams struct {
// contains filtered or unexported fields
}
ServiceMockVerifyParams contains parameters of the Service.Verify
type ServiceMockVerifyResults ¶
type ServiceMockVerifyResults struct {
// contains filtered or unexported fields
}
ServiceMockVerifyResults contains results of the Service.Verify
type Signature ¶
type Signature struct {
// contains filtered or unexported fields
}