add register user
This commit is contained in:
1 parent
7dfe981b53
commit
3026f89f2e
16 files changed
+275
-67
No files matched your search
@@ -0,0 +1,11 @@
|
||||
package password
|
||||
|
||||
import "golang.org/x/crypto/bcrypt"
|
||||
|
||||
func HashPassword(password string) (*[]byte, error) {
|
||||
bytes, err := bcrypt.GenerateFromPassword([]byte(password), 14)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &bytes, err
|
||||
}
|
||||
Reference in new issue
Block a user