14 lines
253 B
Go
14 lines
253 B
Go
package config
|
|
|
|
import (
|
|
"golang.org/x/crypto/bcrypt"
|
|
)
|
|
|
|
func getBcryptHash(input string) string {
|
|
hashedPassword, err := bcrypt.GenerateFromPassword([]byte(input), bcrypt.DefaultCost)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
return string(hashedPassword)
|
|
}
|