Versions in this module Expand all Collapse all v0 v0.0.5 Jan 31, 2023 v0.0.4 Jan 31, 2023 v0.0.3 Jan 11, 2023 v0.0.2 Jan 11, 2023 v0.0.1 Nov 14, 2022 Changes in this version + type HasherMock struct + func (HasherMock) Size() int + func (sha HasherMock) Compute(s string) []byte + func (sha HasherMock) EmptyHash() []byte + func (sha HasherMock) IsInterfaceNil() bool + type HasherSpongeMock struct + func (HasherSpongeMock) Size() int + func (sha HasherSpongeMock) Compute(s string) []byte + func (sha HasherSpongeMock) EmptyHash() []byte + func (sha HasherSpongeMock) IsInterfaceNil() bool + type KeyGenMock struct + CheckPublicKeyValidMock func(b []byte) error + GeneratePairMock func() (crypto.PrivateKey, crypto.PublicKey) + PrivateKeyFromByteArrayMock func(b []byte) (crypto.PrivateKey, error) + PublicKeyFromByteArrayMock func(b []byte) (crypto.PublicKey, error) + SuiteMock func() crypto.Suite + func (keyGen *KeyGenMock) CheckPublicKeyValid(b []byte) error + func (keyGen *KeyGenMock) GeneratePair() (crypto.PrivateKey, crypto.PublicKey) + func (keyGen *KeyGenMock) IsInterfaceNil() bool + func (keyGen *KeyGenMock) PrivateKeyFromByteArray(b []byte) (crypto.PrivateKey, error) + func (keyGen *KeyGenMock) PublicKeyFromByteArray(b []byte) (crypto.PublicKey, error) + func (keyGen *KeyGenMock) Suite() crypto.Suite + type PointMock struct + GetUnderlyingObjStub func() interface{} + MarshalBinaryStub func(x, y int) ([]byte, error) + UnmarshalBinaryStub func([]byte) (x, y int, err error) + X int + Y int + func (po *PointMock) Add(_ crypto.Point) (crypto.Point, error) + func (po *PointMock) Base() crypto.Point + func (po *PointMock) Clone() crypto.Point + func (po *PointMock) Equal(p crypto.Point) (bool, error) + func (po *PointMock) GetUnderlyingObj() interface{} + func (po *PointMock) IsInterfaceNil() bool + func (po *PointMock) MarshalBinary() ([]byte, error) + func (po *PointMock) Mul(s crypto.Scalar) (crypto.Point, error) + func (po *PointMock) Neg() crypto.Point + func (po *PointMock) Null() crypto.Point + func (po *PointMock) Pick() (crypto.Point, error) + func (po *PointMock) Set(_ crypto.Point) error + func (po *PointMock) Sub(_ crypto.Point) (crypto.Point, error) + func (po *PointMock) UnmarshalBinary(point []byte) error + type PrivateKeyStub struct + GeneratePublicStub func() crypto.PublicKey + ScalarStub func() crypto.Scalar + SuiteStub func() crypto.Suite + ToByteArrayStub func() ([]byte, error) + func (privKey *PrivateKeyStub) GeneratePublic() crypto.PublicKey + func (privKey *PrivateKeyStub) IsInterfaceNil() bool + func (privKey *PrivateKeyStub) Scalar() crypto.Scalar + func (privKey *PrivateKeyStub) Suite() crypto.Suite + func (privKey *PrivateKeyStub) ToByteArray() ([]byte, error) + type PublicKeyStub struct + PointStub func() crypto.Point + SuiteStub func() crypto.Suite + ToByteArrayStub func() ([]byte, error) + func (pubKey *PublicKeyStub) IsInterfaceNil() bool + func (pubKey *PublicKeyStub) Point() crypto.Point + func (pubKey *PublicKeyStub) Suite() crypto.Suite + func (pubKey *PublicKeyStub) ToByteArray() ([]byte, error) + type ScalarMock struct + GetUnderlyingObjStub func() interface{} + MarshalBinaryStub func(x int) ([]byte, error) + UnmarshalBinaryStub func([]byte) (int, error) + X int + func (sm *ScalarMock) Add(_ crypto.Scalar) (crypto.Scalar, error) + func (sm *ScalarMock) Clone() crypto.Scalar + func (sm *ScalarMock) Div(_ crypto.Scalar) (crypto.Scalar, error) + func (sm *ScalarMock) Equal(_ crypto.Scalar) (bool, error) + func (sm *ScalarMock) GetUnderlyingObj() interface{} + func (sm *ScalarMock) Inv(_ crypto.Scalar) (crypto.Scalar, error) + func (sm *ScalarMock) IsInterfaceNil() bool + func (sm *ScalarMock) MarshalBinary() ([]byte, error) + func (sm *ScalarMock) Mul(_ crypto.Scalar) (crypto.Scalar, error) + func (sm *ScalarMock) Neg() crypto.Scalar + func (sm *ScalarMock) One() crypto.Scalar + func (sm *ScalarMock) Pick() (crypto.Scalar, error) + func (sm *ScalarMock) Set(_ crypto.Scalar) error + func (sm *ScalarMock) SetBytes([]byte) (crypto.Scalar, error) + func (sm *ScalarMock) SetInt64(_ int64) + func (sm *ScalarMock) Sub(_ crypto.Scalar) (crypto.Scalar, error) + func (sm *ScalarMock) UnmarshalBinary(val []byte) error + func (sm *ScalarMock) Zero() crypto.Scalar + type SingleSignerStub struct + SignCalled func(private crypto.PrivateKey, msg []byte) ([]byte, error) + VerifyCalled func(public crypto.PublicKey, msg []byte, sig []byte) error + func (s *SingleSignerStub) IsInterfaceNil() bool + func (s *SingleSignerStub) Sign(private crypto.PrivateKey, msg []byte) ([]byte, error) + func (s *SingleSignerStub) Verify(public crypto.PublicKey, msg []byte, sig []byte) error + type Streamer struct + func NewStreamer() *Streamer + func (stream *Streamer) XORKeyStream(dst, src []byte) + type SuiteMock struct + CreateKeyPairStub func() (crypto.Scalar, crypto.Point) + CreatePointForScalarStub func(scalar crypto.Scalar) (crypto.Point, error) + CreatePointStub func() crypto.Point + CreateScalarStub func() crypto.Scalar + GetUnderlyingSuiteStub func() interface{} + IsPointValidStub func([]byte) error + PointLenStub func() int + RandomStreamStub func() cipher.Stream + ScalarLenStub func() int + StringStub func() string + func (s *SuiteMock) CheckPointValid(pointBytes []byte) error + func (s *SuiteMock) CreateKeyPair() (crypto.Scalar, crypto.Point) + func (s *SuiteMock) CreatePoint() crypto.Point + func (s *SuiteMock) CreatePointForScalar(scalar crypto.Scalar) (crypto.Point, error) + func (s *SuiteMock) CreateScalar() crypto.Scalar + func (s *SuiteMock) GetUnderlyingSuite() interface{} + func (s *SuiteMock) IsInterfaceNil() bool + func (s *SuiteMock) PointLen() int + func (s *SuiteMock) RandomStream() cipher.Stream + func (s *SuiteMock) ScalarLen() int + func (s *SuiteMock) String() string