https://github.com/wrathematics/argon2
R bindings for the argon2 secure password hashing algorithm.
https://github.com/wrathematics/argon2
Last synced: about 1 month ago
JSON representation
R bindings for the argon2 secure password hashing algorithm.
- Host: GitHub
- URL: https://github.com/wrathematics/argon2
- Owner: wrathematics
- License: other
- Created: 2016-09-21T00:17:30.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-02-28T13:09:47.000Z (about 2 years ago)
- Last Synced: 2025-02-25T06:41:25.656Z (about 2 months ago)
- Language: C
- Size: 198 KB
- Stars: 9
- Watchers: 2
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: ChangeLog
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - wrathematics/argon2 - R bindings for the argon2 secure password hashing algorithm. (C)
README
# argon2
* **Version:** 0.4-1
* **License:** [BSD 2-Clause](https://opensource.org/license/bsd-2-clause/)
* **Project home**: https://github.com/wrathematics/argon2
* **Bug reports**: https://github.com/wrathematics/argon2/issues**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()`:
```r
install.packages("argon2")
```The development version is maintained on GitHub:
```r
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
```r
library(argon2)pass <- "myPassw0rd!"
hash <- pw_hash(pass)
hash
## [1] "$argon2i$v=19$m=8192,t=20,p=1$KZrdgD04xYK158QoZUEJgQb0QgayasYvjl98hRXf5C7cCqDr/MPARFdp4HtnrSrpZr70SupTrfGVfovUp81VeA$V8WHHdR7a4S0RTOFDAjJCHIerlIjzsPAuPu0rT2lpnObmNOUhldPIgEqBzxQBF71tyjsEIuuRMdG/b5JN3omiA"
## attr(,"hashtype")
## [1] "argon2"pw_check(hash, pass)
## [1] TRUE
pw_check(hash, "password")
## [1] FALSE
pw_check(hash, "1234")
## [1] FALSE
```