-
Notifications
You must be signed in to change notification settings - Fork 199
/
singleSignMock.go
71 lines (56 loc) · 1.69 KB
/
singleSignMock.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
package mock
import (
"github.com/ElrondNetwork/elrond-go-crypto"
)
// SingleSignKeyGenMock -
type SingleSignKeyGenMock struct {
PublicKeyFromByteArrayCalled func(b []byte) (crypto.PublicKey, error)
SuiteCalled func() crypto.Suite
}
// SingleSignPublicKey -
type SingleSignPublicKey struct {
SuiteCalled func() crypto.Suite
PointCalled func() crypto.Point
}
//------- SingleSignKeyGenMock
// GeneratePair -
func (sskgm *SingleSignKeyGenMock) GeneratePair() (crypto.PrivateKey, crypto.PublicKey) {
panic("implement me")
}
// PrivateKeyFromByteArray -
func (sskgm *SingleSignKeyGenMock) PrivateKeyFromByteArray(_ []byte) (crypto.PrivateKey, error) {
panic("implement me")
}
// PublicKeyFromByteArray -
func (sskgm *SingleSignKeyGenMock) PublicKeyFromByteArray(b []byte) (crypto.PublicKey, error) {
return sskgm.PublicKeyFromByteArrayCalled(b)
}
// CheckPublicKeyValid -
func (sskgm *SingleSignKeyGenMock) CheckPublicKeyValid(_ []byte) error {
return nil
}
// Suite -
func (sskgm *SingleSignKeyGenMock) Suite() crypto.Suite {
return sskgm.SuiteCalled()
}
// IsInterfaceNil returns true if there is no value under the interface
func (sskgm *SingleSignKeyGenMock) IsInterfaceNil() bool {
return sskgm == nil
}
//------- SingleSignPublicKey
// ToByteArray -
func (sspk *SingleSignPublicKey) ToByteArray() ([]byte, error) {
panic("implement me")
}
// Suite -
func (sspk *SingleSignPublicKey) Suite() crypto.Suite {
return sspk.SuiteCalled()
}
// Point -
func (sspk *SingleSignPublicKey) Point() crypto.Point {
return sspk.PointCalled()
}
// IsInterfaceNil returns true if there is no value under the interface
func (sspk *SingleSignPublicKey) IsInterfaceNil() bool {
return sspk == nil
}