Versions in this module Expand all Collapse all v0 v0.0.0 May 17, 2024 Changes in this version + type HasherMock struct + func (HasherMock) Size() int + func (sha HasherMock) Compute(s string) []byte + func (sha HasherMock) EmptyHash() []byte + type HasherSpongeMock struct + func (HasherSpongeMock) Size() int + func (sha HasherSpongeMock) Compute(s string) []byte + func (sha HasherSpongeMock) EmptyHash() []byte + type PointMock struct + MarshalBinaryStub func(x, y int) ([]byte, error) + UnmarshalBinaryStub func([]byte) (x, y int, err error) + X int + Y int + func (po *PointMock) Add(p 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) 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(rand cipher.Stream) (crypto.Point, error) + func (po *PointMock) Set(p crypto.Point) error + func (po *PointMock) Sub(p 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) 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) Point() crypto.Point + func (pubKey *PublicKeyStub) Suite() crypto.Suite + func (pubKey *PublicKeyStub) ToByteArray() ([]byte, error) + type ScalarMock struct + MarshalBinaryStub func(x int) ([]byte, error) + UnmarshalBinaryStub func([]byte) (int, error) + X int + func (sm *ScalarMock) Add(s crypto.Scalar) (crypto.Scalar, error) + func (sm *ScalarMock) Clone() crypto.Scalar + func (sm *ScalarMock) Div(s crypto.Scalar) (crypto.Scalar, error) + func (sm *ScalarMock) Equal(s crypto.Scalar) (bool, error) + func (sm *ScalarMock) GetUnderlyingObj() interface{} + func (sm *ScalarMock) Inv(s crypto.Scalar) (crypto.Scalar, error) + func (sm *ScalarMock) MarshalBinary() ([]byte, error) + func (sm *ScalarMock) Mul(s crypto.Scalar) (crypto.Scalar, error) + func (sm *ScalarMock) Neg() crypto.Scalar + func (sm *ScalarMock) One() crypto.Scalar + func (sm *ScalarMock) Pick(rand cipher.Stream) (crypto.Scalar, error) + func (sm *ScalarMock) Set(s crypto.Scalar) error + func (sm *ScalarMock) SetBytes([]byte) (crypto.Scalar, error) + func (sm *ScalarMock) SetInt64(v int64) + func (sm *ScalarMock) Sub(s crypto.Scalar) (crypto.Scalar, error) + func (sm *ScalarMock) UnmarshalBinary(val []byte) error + func (sm *ScalarMock) Zero() crypto.Scalar + type Signer struct + SignStub func(suite crypto.Suite, private crypto.Scalar, msg []byte) ([]byte, error) + VerifyStub func(suite crypto.Suite, public crypto.Point, msg []byte, sig []byte) error + func (s *Signer) Sign(suite crypto.Suite, private crypto.Scalar, msg []byte) ([]byte, error) + func (s *Signer) Verify(suite crypto.Suite, public crypto.Point, msg []byte, sig []byte) error + type Streamer struct + func NewStreamer() *Streamer + func (stream *Streamer) XORKeyStream(dst, src []byte) + type SuiteMock struct + CreateKeyPairStub func(cipher.Stream) (crypto.Scalar, crypto.Point) + CreatePointStub func() crypto.Point + CreateScalarStub func() crypto.Scalar + GetUnderlyingSuiteStub func() interface{} + PointLenStub func() int + RandomStreamStub func() cipher.Stream + ScalarLenStub func() int + StringStub func() string + func (s *SuiteMock) CreateKeyPair(c cipher.Stream) (crypto.Scalar, crypto.Point) + func (s *SuiteMock) CreatePoint() crypto.Point + func (s *SuiteMock) CreateScalar() crypto.Scalar + func (s *SuiteMock) GetUnderlyingSuite() interface{} + func (s *SuiteMock) PointLen() int + func (s *SuiteMock) RandomStream() cipher.Stream + func (s *SuiteMock) ScalarLen() int + func (s *SuiteMock) String() string