mirror of
https://github.com/decke/smtprelay.git
synced 2025-12-25 15:52:29 -07:00
19 lines
270 B
Go
19 lines
270 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
"golang.org/x/crypto/bcrypt"
|
|
)
|
|
|
|
func main() {
|
|
password := os.Args[1]
|
|
|
|
hash, err := bcrypt.GenerateFromPassword([]byte(password), 12)
|
|
if err != nil {
|
|
fmt.Println("Error generating hash: %s", err)
|
|
}
|
|
fmt.Println(string(hash))
|
|
}
|