Skip to content

Instantly share code, notes, and snippets.

@freyes
Forked from niedbalski/passwordator.go
Created September 22, 2016 12:54
Show Gist options
  • Save freyes/acb42d8167806b3c4899ea8a0e87509c to your computer and use it in GitHub Desktop.
Save freyes/acb42d8167806b3c4899ea8a0e87509c to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
"os"
"github.com/juju/utils"
)
const MIN_LEN = 30
func main() {
if (len(os.Args) < 2 || len(os.Args[1]) < MIN_LEN) {
fmt.Printf("Error: you need to specify a password with size >= %d chars\n", MIN_LEN)
return
}
fmt.Println(utils.AgentPasswordHash(os.Args[1]))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment