Categorygithub.com/aead/argon2
modulepackage
0.0.0-20180111183520-a87724528b07
Repository: https://github.com/aead/argon2.git
Documentation: pkg.go.dev

# README

Godoc Reference

The Argon2 password hashing algorithm

Argon2 is a memory-hard password hashing function and was selected as the winner of the Password Hashing Competition. Argon2 can be used to derive high-entropy secret keys from low-entropy passwords and is specified at https://github.com/P-H-C/phc-winner-argon2/blob/master/argon2-specs.pdf

Recommendation

This Argon2 implementation was submitted to the golang x/crypto repo. I recommend to use the official x/crypto/argon2 package if possible. This repository also exports Argon2d and Argon2id. It is recommended to use Argon2id as described in the RFC draft.

Installation

Install in your GOPATH: go get -u github.com/aead/argon2

# Functions

Key derives a key from the password, salt, and cost parameters using Argon2i returning a byte slice of length keyLen that can be used as cryptographic key.
Key2d derives a key from the password, salt, and cost parameters using Argon2d returning a byte slice of length keyLen that can be used as cryptographic key.
Key2id derives a key from the password, salt, and cost parameters using Argon2id returning a byte slice of length keyLen that can be used as cryptographic key.

# Constants

The Argon2 version implemented by this package.