Skip to content

Instantly share code, notes, and snippets.

@niedbalski
Created May 2, 2019 12:43
Show Gist options
  • Select an option

  • Save niedbalski/50c20439d5b59c5210ac3f3ef682909a to your computer and use it in GitHub Desktop.

Select an option

Save niedbalski/50c20439d5b59c5210ac3f3ef682909a to your computer and use it in GitHub Desktop.
juju-pass.go
package main
import (
"fmt"
"os"
"github.com/juju/utils"
)
const MIN_LEN = 30
func main() {
if (len(os.Args) < 2) {
fmt.Printf("Error: you need to specify the password!\n")
return
}
if (len(os.Args[1]) < MIN_LEN) {
fmt.Printf("Error:Password size must be >= %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