Skip to content

Commit

Permalink
Merge branch 'master' of github.com:decke/smtprelay
Browse files Browse the repository at this point in the history
  • Loading branch information
decke committed Jun 7, 2020
2 parents 6f3bd16 + 6662fb7 commit ed1c3a9
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmd/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

To run the hasher, do like this

```bash
$ go run hasher.go hunter2
```
18 changes: 18 additions & 0 deletions cmd/hasher.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package main

import (
"fmt"
"os"

"golang.org/x/crypto/bcrypt"
)

func main() {
password := os.Args[1]

hash, err := bcrypt.GenerateFromPassword([]byte(password), bcrypt.DefaultCost)
if err != nil {
fmt.Println("Error generating hash: %s", err)
}
fmt.Println(string(hash))
}

0 comments on commit ed1c3a9

Please sign in to comment.