Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateSeedData ¶
func ValidateSeedData(seedData *SeedTestData, inputData *InputTestData) error
ValidateSeedData validates the provided SeedTestData against the current cipher library. inputData is required if SeedTestData contains signatures
Types ¶
type InputTestData ¶
InputTestData contains hashes to be signed
func InputTestDataFromJSON ¶
func InputTestDataFromJSON(d *InputTestDataJSON) (*InputTestData, error)
InputTestDataFromJSON converts InputTestDataJSON to InputTestData
func (*InputTestData) ToJSON ¶
func (d *InputTestData) ToJSON() *InputTestDataJSON
ToJSON converts InputTestData to InputTestDataJSON
type InputTestDataJSON ¶
type InputTestDataJSON struct {
Hashes []string `json:"hashes"`
}
InputTestDataJSON contains hashes to be signed
type KeysTestData ¶
type KeysTestData struct { Address cipher.Address Secret cipher.SecKey Public cipher.PubKey Signatures []cipher.Sig }
KeysTestData contains address, public key, secret key and list of signatures
func KeysTestDataFromJSON ¶
func KeysTestDataFromJSON(d *KeysTestDataJSON) (*KeysTestData, error)
KeysTestDataFromJSON converts KeysTestDataJSON to KeysTestData
func (*KeysTestData) ToJSON ¶
func (k *KeysTestData) ToJSON() *KeysTestDataJSON
ToJSON converts KeysTestData to KeysTestDataJSON
type KeysTestDataJSON ¶
type KeysTestDataJSON struct { Address string `json:"address"` Secret string `json:"secret"` Public string `json:"public"` Signatures []string `json:"signatures,omitempty"` }
KeysTestDataJSON contains address, public key, secret key and list of signatures
type SeedTestData ¶
type SeedTestData struct { Seed []byte Keys []KeysTestData }
SeedTestData contains data generated by Seed
func SeedTestDataFromJSON ¶
func SeedTestDataFromJSON(d *SeedTestDataJSON) (*SeedTestData, error)
SeedTestDataFromJSON converts SeedTestDataJSON to SeedTestData
func (*SeedTestData) ToJSON ¶
func (s *SeedTestData) ToJSON() *SeedTestDataJSON
ToJSON converts SeedTestData to SeedTestDataJSON
type SeedTestDataJSON ¶
type SeedTestDataJSON struct { Seed string `json:"seed"` Keys []KeysTestDataJSON `json:"keys"` }
SeedTestDataJSON contains data generated by Seed