rename flag to base
This commit is contained in:
parent
48cc045e80
commit
78f8efa06a
|
|
@ -25,7 +25,7 @@ import (
|
|||
)
|
||||
|
||||
var discreteLogModulus string
|
||||
var discreteLogGenerator string
|
||||
var discreteLogBase string
|
||||
var discreteLogElement string
|
||||
var discreteLogOrder string
|
||||
|
||||
|
|
@ -84,9 +84,9 @@ func discreteLog(cmd *cobra.Command, args []string) {
|
|||
cobra.CheckErr("invalid modulus " + discreteLogModulus)
|
||||
}
|
||||
|
||||
g, ok := new(big.Int).SetString(discreteLogGenerator, 10)
|
||||
g, ok := new(big.Int).SetString(discreteLogBase, 10)
|
||||
if !ok {
|
||||
cobra.CheckErr("invalid generator " + discreteLogGenerator)
|
||||
cobra.CheckErr("invalid base " + discreteLogBase)
|
||||
}
|
||||
|
||||
x, ok := new(big.Int).SetString(discreteLogElement, 10)
|
||||
|
|
@ -134,8 +134,8 @@ func init() {
|
|||
discreteLogCmd.Flags().StringVarP(&discreteLogModulus, "modulus", "m", "", "modulus of the cyclic group")
|
||||
discreteLogCmd.MarkFlagRequired("modulus")
|
||||
|
||||
discreteLogCmd.Flags().StringVarP(&discreteLogGenerator, "generator", "g", "", "generator of the cyclic group")
|
||||
discreteLogCmd.MarkFlagRequired("generator")
|
||||
discreteLogCmd.Flags().StringVarP(&discreteLogBase, "base", "b", "", "logarithmic base")
|
||||
discreteLogCmd.MarkFlagRequired("base")
|
||||
|
||||
discreteLogCmd.Flags().StringVarP(&discreteLogElement, "element", "e", "", "element of the cyclic group to compute logarithm of")
|
||||
discreteLogCmd.MarkFlagRequired("element")
|
||||
|
|
|
|||
Loading…
Reference in New Issue