Browse Source

Remove cmd/hasher for bcrypt.

There are enough tools available as a replacement. You will find
one that suits you.
Bernhard Froehlich 3 months ago
parent
commit
51ed156dad
3 changed files with 1 additions and 29 deletions
  1. 0 6
      cmd/README.md
  2. 0 22
      cmd/hasher.go
  3. 1 1
      smtprelay.ini

+ 0 - 6
cmd/README.md

@@ -1,6 +0,0 @@
-
-To run the hasher, do like this
-
-```bash
-$ go run hasher.go hunter2
-```

+ 0 - 22
cmd/hasher.go

@@ -1,22 +0,0 @@
-package main
-
-import (
-	"fmt"
-	"os"
-
-	"golang.org/x/crypto/bcrypt"
-)
-
-func main() {
-	if len(os.Args) != 2 {
-		fmt.Fprintln(os.Stderr, "Usage: hasher PASSWORD")
-		os.Exit(1)
-	}
-	password := os.Args[1]
-
-	hash, err := bcrypt.GenerateFromPassword([]byte(password), bcrypt.DefaultCost)
-	if err != nil {
-		fmt.Fprintln(os.Stderr, "Error generating hash: %s", err)
-	}
-	fmt.Println(string(hash))
-}

+ 1 - 1
smtprelay.ini

@@ -83,7 +83,7 @@
 ; authentication before they can send mail.
 ; authentication before they can send mail.
 ; File format: username bcrypt-hash [email[,email[,...]]]
 ; File format: username bcrypt-hash [email[,email[,...]]]
 ;   username: The SMTP auth username
 ;   username: The SMTP auth username
-;   bcrypt-hash: The bcrypt hash of the pasword (generate with "./hasher password")
+;   bcrypt-hash: The bcrypt hash of the pasword
 ;   email: Comma-separated list of allowed "from" addresses:
 ;   email: Comma-separated list of allowed "from" addresses:
 ;          - If omitted, user can send from any address
 ;          - If omitted, user can send from any address
 ;          - If @domain.com is given, user can send from any address @domain.com
 ;          - If @domain.com is given, user can send from any address @domain.com