Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bor/dancer2-plugin-argon2
Dancer2::Plugin::Argon2 - Handling Argon2 passwords in Dancer2
https://github.com/bor/dancer2-plugin-argon2
dancer2 perl
Last synced: about 1 month ago
JSON representation
Dancer2::Plugin::Argon2 - Handling Argon2 passwords in Dancer2
- Host: GitHub
- URL: https://github.com/bor/dancer2-plugin-argon2
- Owner: bor
- License: other
- Created: 2020-04-08T11:46:53.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-04-09T10:41:20.000Z (almost 5 years ago)
- Last Synced: 2023-08-20T22:57:38.019Z (over 1 year ago)
- Topics: dancer2, perl
- Language: Perl
- Size: 14.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: Changes
- License: LICENSE
Awesome Lists containing this project
README
[![Build Status](https://travis-ci.org/bor/Dancer2-Plugin-Argon2.svg?branch=master)](https://travis-ci.org/bor/Dancer2-Plugin-Argon2) [![Coverage Status](https://img.shields.io/coveralls/bor/Dancer2-Plugin-Argon2/master.svg?style=flat)](https://coveralls.io/r/bor/Dancer2-Plugin-Argon2?branch=master) [![MetaCPAN Release](https://badge.fury.io/pl/Dancer2-Plugin-Argon2.svg)](https://metacpan.org/release/Dancer2-Plugin-Argon2) [![Kritika Status](https://kritika.io/users/bor/repos/bor+Dancer2-Plugin-Argon2/heads/master/status.svg)](https://kritika.io/users/bor/repos/bor+Dancer2-Plugin-Argon2)
# NAMEDancer2::Plugin::Argon2 - Handling Argon2 passwords in Dancer2
# SYNOPSIS
use Dancer2::Plugin::Argon2;
my $passphrase = passphrase($password)->encoded;
if ( passphrase($password2)->matches($passphrase) ) { ... }# DESCRIPTION
Dancer2::Plugin::Argon2 is a plugin for Dancer2 to manage passwords using Argon2.
# CONFIGURATION
The module can be used with the default configuration.
But it is possible to change it if necessary.
The default configuration may present like this:plugins:
Argon2:
cost: 3
factor: '32M'
parallelism: 1
size: 16# USAGE
package SomeWebApplication;
use Dancer2;
use Dancer2::Plugin::Argon2;post '/signup' => sub {
my $passphrase = passphrase( body_parameters->get('password') )->encoded;
# and store $passphrase for use later
};post '/login' => sub {
# retrieve stored passphrase into $passphrase
if ( passphrase( body_parameters->get('password') )->matches($passphrase) ) {
# passphrase matches
}
};# SEE ALSO
[Dancer2::Plugin::Argon2::Passphrase](https://metacpan.org/pod/Dancer2::Plugin::Argon2::Passphrase),
[Crypt::Argon2](https://metacpan.org/pod/Crypt::Argon2),
[https://github.com/p-h-c/phc-winner-argon2](https://github.com/p-h-c/phc-winner-argon2)# LICENSE
Copyright (C) Sergiy Borodych.
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.# AUTHOR
Sergiy Borodych ``