Documentation
¶
Index ¶
- type RandChallenger
- func (m *RandChallenger) Close()
- func (m *RandChallenger) GenerateChallenge(sliceIdxList []int, interval int64) ([][]byte, [][]byte, int64, []byte, error)
- func (m *RandChallenger) GetChallengeConf() (string, types.PairingChallengeConf)
- func (m *RandChallenger) Save(cms []ctype.Material) error
- func (m *RandChallenger) Setup(sliceData []byte, rangeAmount int) (c []ctype.RangeHash, err error)
- func (m *RandChallenger) Take(fileID string, sliceID string, nodeID []byte) (c ctype.RangeHash, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RandChallenger ¶
type RandChallenger struct {
// contains filtered or unexported fields
}
RandChallenger is the pairing based challenger
func New ¶
func New(conf *config.ChallengerPairingConf, privkey ecdsa.PrivateKey) (*RandChallenger, error)
New new a challenger by challenge related configuration
func (*RandChallenger) Close ¶
func (m *RandChallenger) Close()
func (*RandChallenger) GenerateChallenge ¶
func (m *RandChallenger) GenerateChallenge(sliceIdxList []int, interval int64) ([][]byte, [][]byte, int64, []byte, error)
GenerateChallenge randomly select a subset of the index list to generate challenge calculate random number for the challenge round by private key and challenge interval
func (*RandChallenger) GetChallengeConf ¶
func (m *RandChallenger) GetChallengeConf() (string, types.PairingChallengeConf)
GetChallengeConf get challenge configuration
func (*RandChallenger) Save ¶
func (m *RandChallenger) Save(cms []ctype.Material) error
Save not implemented for random challenge
Click to show internal directories.
Click to hide internal directories.