Skip to content

Commit

Permalink
fix #15: disabled threads in emscripten
Browse files Browse the repository at this point in the history
  • Loading branch information
antelle committed Dec 3, 2018
1 parent 36dccc8 commit 4b89503
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 16 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ It's hard to measure WebAssembly code size because the project is not finished y

## Is Argon2 modified?

No, now it's fully compatible with WASM.
The only change is disabling threading support.

## Difficulties

Expand Down
5 changes: 4 additions & 1 deletion argon2/src/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -322,12 +322,15 @@ static int fill_memory_blocks_mt(argon2_instance_t *instance) {
instance; /* preparing the thread input */
memcpy(&(thr_data[l].pos), &position,
sizeof(argon2_position_t));
#ifdef EMSCRIPTEN
fill_segment(instance, position);
#else
if (argon2_thread_create(&thread[l], &fill_segment_thr,
(void *)&thr_data[l])) {
rc = ARGON2_THREAD_FAIL;
goto fail;
}

#endif
/* fill_segment(instance, position); */
/*Non-thread equivalent of the lines above */
}
Expand Down
10 changes: 5 additions & 5 deletions dist/argon2-asm.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/argon2.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/argon2.min.js

Large diffs are not rendered by default.

Binary file modified dist/argon2.wasm
Binary file not shown.
10 changes: 5 additions & 5 deletions docs/dist/argon2-asm.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/dist/argon2.js

Large diffs are not rendered by default.

Binary file modified docs/dist/argon2.wasm
Binary file not shown.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "argon2-browser",
"version": "1.4.0",
"version": "1.4.1",
"description": "Argon2 library compiled for browser runtime",
"main": "lib/argon2.js",
"directories": {
Expand Down

0 comments on commit 4b89503

Please sign in to comment.