directory
Version:
v1.0.6
Opens a new window with list of versions in this module.
Published: Sep 10, 2023
License: MIT
Opens a new window with license information.
README
¶
PTGU Password
Import
import (
PTGUpassword "github.com/parinyapt/golang_utils/password/v1"
)
Example
Hash Password & Verify Password v1
func main() {
var password string = "123456789"
passwordHash, err := PTGUpassword.HashPassword(password, 14)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(password + " : " + passwordHash)
IsMatch := PTGUpassword.VerifyHashPassword(password, passwordHash)
if IsMatch {
fmt.Println("Password match")
}else{
fmt.Println("Password not match")
}
IsMatch := PTGUpassword.VerifyHashPassword("123456", passwordHash)
if IsMatch {
fmt.Println("Password match")
}else{
fmt.Println("Password not match")
}
}
Directories
¶
Click to show internal directories.
Click to hide internal directories.