Skip to content

Instantly share code, notes, and snippets.

@jonasermert
Created January 25, 2022 22:19
Show Gist options
  • Save jonasermert/603548ab1608076b1245bbd03c732e33 to your computer and use it in GitHub Desktop.
Save jonasermert/603548ab1608076b1245bbd03c732e33 to your computer and use it in GitHub Desktop.
/*
author: Jonas Ermert
year: 2022
*/
package main
import (
"fmt"
"golang.org/x/crypto/bcrypt"
)
// main implements a function to generate passwords
func main() {
password := "password"
hashedPassword, _ := bcrypt.GenerateFromPassword([]byte(password), 12)
fmt.Println(string(hashedPassword))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment