Go package to simplify common use cases with argon2i
Go to file
2022-12-04 02:18:05 +01:00
_tests Initial commit 2022-12-04 02:18:05 +01:00
.gitignore Initial commit 2022-12-04 02:18:05 +01:00
crypto_struct.go Initial commit 2022-12-04 02:18:05 +01:00
crypto.go Initial commit 2022-12-04 02:18:05 +01:00
go.mod Initial commit 2022-12-04 02:18:05 +01:00
go.sum Initial commit 2022-12-04 02:18:05 +01:00
LICENSE Initial commit 2022-12-04 02:18:05 +01:00
README.md Initial commit 2022-12-04 02:18:05 +01:00

Argon2 utils

About

Utils to encrypt passwords using argon2

Usage

Example

    func func main() {
        password := 'qwerty@123'
        hashedString, err := argon2_utils.HashStringArgon2(password)
        if err != nil {
            ...
        }
        match, err := argon2_utils.CompareStringToArgon2Hash(randomString, hashedString)
        if err != nil {
            ...
        }
        if !match {
            log.Println("passwords don't match")
        } else {
            log.Println("passwords match")
        }
    }

This package also contains a RandomString(int)(string,error) function.

Contributions

Euphoria Laxis

License

This project is under MIT License