You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
329 B
24 lines
329 B
2 years ago
|
package main
|
||
|
|
||
|
import (
|
||
|
"bufio"
|
||
|
"fmt"
|
||
|
"os"
|
||
|
"strings"
|
||
|
|
||
2 years ago
|
"github.com/mediocregopher/blog.mediocregopher.com/srv/http"
|
||
2 years ago
|
)
|
||
|
|
||
|
func main() {
|
||
|
|
||
|
fmt.Fprint(os.Stderr, "Password: ")
|
||
|
|
||
|
line, err := bufio.NewReader(os.Stdin).ReadString('\n')
|
||
|
|
||
|
if err != nil {
|
||
|
panic(err)
|
||
|
}
|
||
|
|
||
2 years ago
|
fmt.Println(http.NewPasswordHash(strings.TrimSpace(line)))
|
||
2 years ago
|
}
|