Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Based offhttps://github.com/antelle/argon2-browser

NotificationsYou must be signed in to change notification settings

Commitant/argon2-wasm

 
 

Repository files navigation

Argon2 (with Argon2u support) run as WebAssembly.

Install

npm install --save argon2-wasm

Usage

import argon2 from 'argon2-wasm';argon2.hash({pass: 'password', salt: 'somesalt', distPath: 'dist'}).then(console.log);/* Logs:{ hash:   Uint8Array [ ... ],  hashHex:   'f38afe1266d247cf1f6f836ffdbb0ab946c0a7edbcb4ba6e7324b32b9050441e',  encoded:   '$argon2d$v=19$m=1024,t=10,p=1$c29tZXNhbHQ$84r+EmbSR88fb4Nv/bsKuUbAp+28tLpucySzK5BQRB4' }*/

The input object has the following parameters and defaults:

{string}  pass                password string{string}  salt                salt string{float}   time        (1)     the number of iterations{float}   mem         (1024)  used memory, in KiB{float}   hashLen     (24)    desired hash length{float}   parallelism (1)     desired parallelism (will be computed in parallel only for PNaCl){number}  type        (argon2.types.Argon2d)   hash type: argon2.ArgonType.Argon2d, .Argon2i, .Argon2id or .Argon2u{string}  distPath    ('.')   asm.js script location, without trailing slash

Building

Prerequisites:

  • emscripten with WebAssembly support (howto)
  • CMake

Use the provided build script:

./build.sh

You can also usenpm run-script build, which will call that directly.

License

MIT

About

Based offhttps://github.com/antelle/argon2-browser

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript64.7%
  • C++16.9%
  • Shell10.2%
  • CMake4.5%
  • C3.7%

[8]ページ先頭

©2009-2025 Movatter.jp