Skip to content

Commit

Permalink
Changed default parallelism=1 when platform.machine() = wasm32
Browse files Browse the repository at this point in the history
  • Loading branch information
alarmfox committed Dec 27, 2024
1 parent 8f15021 commit 2a721f8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/argon2/_password_hasher.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
DEFAULT_HASH_LENGTH = RFC_9106_LOW_MEMORY.hash_len
DEFAULT_TIME_COST = RFC_9106_LOW_MEMORY.time_cost
DEFAULT_MEMORY_COST = RFC_9106_LOW_MEMORY.memory_cost
DEFAULT_PARALLELISM = RFC_9106_LOW_MEMORY.parallelism
DEFAULT_PARALLELISM = (
1 if platform.machine() == "wasm32" else RFC_9106_LOW_MEMORY.parallelism
)


def _ensure_bytes(s: bytes | str, encoding: str) -> bytes:
Expand Down

0 comments on commit 2a721f8

Please sign in to comment.