passage-go/gopass-cmd/main.go

19 lines
340 B
Go
Raw Normal View History

2017-01-25 17:58:37 +00:00
package main
import (
"fmt"
"os"
passage "gogs.bullercodeworks.com/brian/passage-go"
)
func main() {
if len(os.Args) < 3 {
fmt.Println("Usage: gopass <pin> <door>")
os.Exit(1)
}
p := passage.CreatePassage(os.Args[1])
fmt.Println("Checksum: " + p.GetChecksumAsString())
fmt.Println("Password: " + p.GetPassword(os.Args[2]))
}