Giter Club home page Giter Club logo

argon2's Introduction

argon2

pub package Null Safety

CI GitHub Tag New Commits Last Commits Pull Requests Code size License

Pure Dart Argon2 algorithm (the winner of the Password Hash Competition 2015) for all Dart platforms (JS/Web, Flutter, VM/Native).

Based on the results of:

Converted to Dart from:

Usage

import 'dart:typed_data';

import 'package:argon2/argon2.dart';

void main() {
  var password = 'pass123456';
  var salt = 'somesalt'.toBytesLatin1();

  var parameters = Argon2Parameters(
    Argon2Parameters.ARGON2_i,
    salt,
    version: Argon2Parameters.ARGON2_VERSION_10,
    iterations: 2,
    memoryPowerOf2: 16,
  );

  print('Parameters: $parameters');

  var argon2 = Argon2BytesGenerator();

  argon2.init(parameters);

  var passwordBytes = parameters.converter.convert(password);

  print('Generating key from password...');

  var result = Uint8List(32);
  argon2.generateBytes(passwordBytes, result, 0, result.length);

  var resultHex = result.toHexString();

  print('Result: $resultHex');
}

Output:

Parameters: Argon2Parameters{ type: 1, iterations: 2, memory: 65536, lanes: 1, version: 16, converter: UTF8 }
Generating key from password...
Result: 297f7d074e07aaa46316ea006c1440dfe5707746426ec1df6c1d303ab5fd5533

Source

The official source code is hosted @ GitHub:

Features and bugs

Please file feature requests and bugs at the issue tracker.

Contribution

Any help from the open-source community is always welcome and needed:

  • Found an issue?
    • Please fill a bug report with details.
  • Wish a feature?
    • Open a feature request with use cases.
  • Are you using and liking the project?
    • Promote the project: create an article, do a post or make a donation.
  • Are you a developer?
    • Fix a bug and send a pull request.
    • Implement a new feature.
    • Improve the Unit Tests.
  • Have you already helped in any way?
    • Many thanks from me, the contributors and everybody that uses this project!

Author

Graciliano M. Passos: gmpassos@GitHub.

License

Apache License - Version 2.0

Please, provide a reference to this project and the author for any derivative work.

argon2's People

Contributors

gmpassos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.