Skip to content

R bindings for the argon2 secure password hashing algorithm.

License

Unknown, BSD-2-Clause licenses found

Licenses found

Unknown
LICENSE
BSD-2-Clause
LICENSE.md
Notifications You must be signed in to change notification settings

bpvgoncalves/argon2

 
 

Repository files navigation

argon2

R-CMD-check

Codecov test coverage

argon2 is an R package for secure password hashing via the argon2 algorithm. It is a relatively new hashing algorithm and is believed to be very secure. The package also includes some utilities that should be useful for digest authentication, including a wrapper of blake2b. For similar R packages, see sodium and bcrypt.

The package includes a source distribution of the latest implementation from the argon2 developers: https://github.com/P-H-C/phc-winner-argon2. Note that we are unaffiliated with their project; if we break something, don't blame them!

Installation

You can install the stable version from CRAN using the usual install.packages():

install.packages("argon2")

The development version is maintained on GitHub:

remotes::install_github("wrathematics/argon2")

If you build the package from source, you can enable CPU vectorization optimizations by using the configure flag --enable-vec. This improvement can not be made the default because of CRAN rules which I disagree with.

Usage

library(argon2)

pass <- "myPassw0rd!"

argon2_hash(pass, len=32)
Argon2 Raw Hash: AE93DFE62C15D439A575E602CFB58F98B820FA5837040812AEB66E5585972830

enc <- argon2_encode(pass, memory=16, len=32)
enc
Argon2 Encoded Hash:
$argon2id$v=19$m=16384,t=1,p=2$JfXhBolUipd6T8KY7s01xw$yXdjXxEgxIutkruaTvZQHtSl6qpyoEhIh87nspPhKyg

argon2_verify(enc, pass)
[1] TRUE

argon2_verify(enc, "password")
[1] FALSE

argon2_verify(enc, "1234")
[1] FALSE

About

R bindings for the argon2 secure password hashing algorithm.

Resources

License

Unknown, BSD-2-Clause licenses found

Licenses found

Unknown
LICENSE
BSD-2-Clause
LICENSE.md

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 81.6%
  • R 15.8%
  • M4 2.5%
  • Shell 0.1%