Skip to main content

AsyncArgon2

PyPI version License Tests Coverage

Асинхронная обертка для хэширования паролей с Argon2.

Документация

Установка

pip install async-argon2

Использование

import asyncio
from async_argon2 import AsyncArgon2

hasher = AsyncArgon2()

async def main():
    hashed = await hasher.hash("password123")
    print(hashed)
    
    is_valid = await hasher.verify("password123", hashed)
    print(is_valid)  # True

asyncio.run(main())

Почему AsyncArgon2?

Синхронный Argon2 блокирует event loop. AsyncArgon2 запускает хэширование в отдельном потоке, не блокируя другие задачи.

# ❌ Блокирует event loop
from argon2 import PasswordHasher
hasher = PasswordHasher()
hashed = hasher.hash("password")  # Все ждут!

# ✅ Не блокирует
from async_argon2 import AsyncArgon2
hasher = AsyncArgon2()
hashed = await hasher.hash("password")  # Event loop свободен

Кастомные параметры

hasher = AsyncArgon2(
    time_cost=3,
    memory_cost=153600,
    parallelism=4,
)

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

async_argon2-1.0.0.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

async_argon2-1.0.0-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file async_argon2-1.0.0.tar.gz.

File metadata

  • Download URL: async_argon2-1.0.0.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"EndeavourOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for async_argon2-1.0.0.tar.gz
Algorithm Hash digest
SHA256 ff7710622baab6bb9900137659c60e5cb496661c20e9c9a6d5b50b7ffa6627b6
MD5 2b1b0667bc061d1eefe79f783be66c6c
BLAKE2b-256 29f910d4444d1fddbdfeade33d6cc1777b5dcf8b6f1d4deb58ac5525f552f518

See more details on using hashes here.

File details

Details for the file async_argon2-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: async_argon2-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"EndeavourOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for async_argon2-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8e6eed14074532b48917f4fae9abfec872422a291455d112adeb41f3697b41a7
MD5 637a5888d2ec056093b7343bde3ac152
BLAKE2b-256 90faaa7d861a2dfb67db5bf42cca948a9cfe749eb1a6873380ccf355aa215342

See more details on using hashes here.

Release history Release notifications | RSS feed

1.1.0

2 files

This release

1.0.0 This release

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page