add register user

This commit is contained in:
Shuhrat Tulyaganov committed 2023-04-14 17:35:25 +03:00
1 parent 7dfe981b53
commit 3026f89f2e
16 files changed
+275 -67

No files matched your search

+11
View File
@@ -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
}