mirror of
https://github.com/getAlby/lndhub.go.git
synced 2026-01-19 04:45:40 +01:00
14 lines
261 B
Go
14 lines
261 B
Go
package security
|
|
|
|
import (
|
|
"golang.org/x/crypto/bcrypt"
|
|
)
|
|
|
|
// HashPassword : Hash Password
|
|
func HashPassword(password string) string {
|
|
bytes, _ := bcrypt.GenerateFromPassword([]byte(password), bcrypt.DefaultCost)
|
|
password = string(bytes)
|
|
|
|
return password
|
|
}
|