Documentation
¶
Overview ¶
Package command implements the commands of shamironsalt
Index ¶
- func AskPass(prompt string, minlength int, confirm bool) (string, error)
- func Command(args []string) error
- func DisplayRequest(IdentityFile, Password, RequestFile, SharesFile string, verbosity int) (string, error)
- func GenKey(filename, password string) (string, error)
- func GenShareRequests(outputFile, shareFile, identityFile, password string, verbosity int) (string, error)
- func GenShares(secret, comment, recipientsFile, outputFile string, threshhold int, ...) (string, error)
- func Output()
- func ParseRecipientsFile(recipientsFile string) ([]shares.ShareMember, error)
- func PrintError(format string, a ...interface{}) error
- func ReadFile(filename string) ([]byte, error)
- func ReadKey(filename, password string) (pubkey, privkey []byte, err error)
- func Recover(IdentityFile, Password, ShareFile, ResponseFile string, verbosity int) (string, error)
- func RespondRequest(IdentityFile, Password, RequestFile, SharesFile, ResponseFile string, ...) (string, error)
- func ShowKey(filename, password string) (pubkey string, err error)
- func WriteFile(filename string, data []byte) error
- type GenKeyCommand
- type GenRequestCommand
- type GenSharesCommand
- type RecoverCommand
- type RespondRequestCommand
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DisplayRequest ¶
func DisplayRequest(IdentityFile, Password, RequestFile, SharesFile string, verbosity int) (string, error)
DisplayRequest displays information about the request
func GenShareRequests ¶
func GenShareRequests(outputFile, shareFile, identityFile, password string, verbosity int) (string, error)
GenShareRequests creates share requestsion in output from shares
func GenShares ¶
func GenShares(secret, comment, recipientsFile, outputFile string, threshhold int, verbosity int) (string, error)
GenShares reads recipientsFile, adds secret and recipients to the share definition and creates shares in output
func ParseRecipientsFile ¶
func ParseRecipientsFile(recipientsFile string) ([]shares.ShareMember, error)
ParseRecipientsFile parses a recipient file and returns a list of share group members
func PrintError ¶
PrintError prints an error to stderr
func RespondRequest ¶
func RespondRequest(IdentityFile, Password, RequestFile, SharesFile, ResponseFile string, NumShares int, Fake bool, verbosity int) (string, error)
RespondRequest displays information about the request
Types ¶
type GenKeyCommand ¶
type GenKeyCommand struct {
FileName string `short:"k" long:"keyfile" description:"output filename" value-name:"FILE" required:"true"`
Display bool `short:"d" long:"display" description:"show the public key contained in -k FILE"`
Password string `short:"p" long:"password" description:"set a password for the key" value-name:"PASSWORD"`
AskPass bool `short:"a" long:"askpassword" description:"ask for the password"`
}
GenKeyCommand options for this command
func (*GenKeyCommand) Execute ¶
func (c *GenKeyCommand) Execute(args []string) error
Execute this command
type GenRequestCommand ¶
type GenRequestCommand struct {
FileName string `short:"o" long:"outfile" description:"output filename to write the requests to" value-name:"FILE" required:"true"`
Identity string `` /* 129-byte string literal not displayed */
Password string `short:"p" long:"password" description:"optional password to decrypto keypair" value-name:"PASSWORD"`
AskPass bool `short:"a" long:"askpassword" description:"ask for the password"`
}
GenRequestCommand options for this command
func (*GenRequestCommand) Execute ¶
func (c *GenRequestCommand) Execute(args []string) error
Execute this command
type GenSharesCommand ¶
type GenSharesCommand struct {
}
GenSharesCommand options for this command
func (*GenSharesCommand) Execute ¶
func (c *GenSharesCommand) Execute(args []string) error
Execute this command
type RecoverCommand ¶
type RecoverCommand struct {
Identity string `` /* 129-byte string literal not displayed */
Password string `short:"p" long:"password" description:"optional password to decrypto keypair" value-name:"PASSWORD"`
Responses string `short:"r" long:"responses" description:"File containing responses to a share request" value-name:"FILE" required:"true"`
Verbose []bool `short:"v" description:"be verbose. Repeat for more verbosity"`
AskPass bool `short:"a" long:"askpassword" description:"ask for the password"`
}
RecoverCommand CLI params
func (*RecoverCommand) Execute ¶
func (c *RecoverCommand) Execute(args []string) error
Execute this command
type RespondRequestCommand ¶
type RespondRequestCommand struct {
Request string `short:"r" long:"request" description:"file containing the share request" value-name:"FILE" required:"true"`
Identity string `` /* 129-byte string literal not displayed */
Password string `short:"p" long:"password" description:"optional password to decrypto keypair" value-name:"PASSWORD"`
AskPass bool `short:"a" long:"askpassword" description:"ask for the password"`
// Optional
Display bool `short:"d" long:"display" description:"display information about request. Overrides -o"`
FileName string `` /* 161-byte string literal not displayed */
Fake bool `short:"F" long:"fake" descrition:"answer with a fake"`
Verbose []bool `short:"v" description:"be verbose. Repeat for more verbosity"`
}
RespondRequestCommand CLI params
func (*RespondRequestCommand) Execute ¶
func (c *RespondRequestCommand) Execute(args []string) error
Execute this command