Metadata-Version: 2.4
Name: pychloride
Version: 0.7.18.1
Summary: Pyodide-compatible ctypes interface for libsodium (refactored pysodium)
Project-URL: Homepage, https://github.com/WebOfTrust/pychloride
Project-URL: Repository, https://github.com/WebOfTrust/pychloride.git
Author-email: Stefan Marsiske <s@ctrlc.hu>, Evan Asakawa <evanja57@gmail.com>
License: BSD 2-Clause License
        
        Copyright (c) 2013-2025, Marsiske Stefan
        Copyright (c) 2026, Evan Asakawa
        All rights reserved.
        
        Redistribution and use in source and binary forms, with or without
        modification, are permitted provided that the following conditions are met:
        
        1. Redistributions of source code must retain the above copyright notice, this
           list of conditions and the following disclaimer.
        
        2. Redistributions in binary form must reproduce the above copyright notice,
           this list of conditions and the following disclaimer in the documentation
           and/or other materials provided with the distribution.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
        ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
        WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
        DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
        FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
        SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
        CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
        OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
License-File: LICENSE
License-File: THIRD_PARTY_LICENSES.md
Keywords: API,NaCl,cryptography,libsodium,pyodide,wasm
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Security
Classifier: Topic :: Security :: Cryptography
Requires-Python: >=3.9
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == 'dev'
Description-Content-Type: text/markdown

# pychloride

Pyodide-compatible ctypes interface for libsodium. This is a refactored pysodium wheel designed specifically for WebAssembly environments.

## Installation

### For Pyodide/PyScript

```python
import micropip
await micropip.install("pychloride")
```

### For standard Python (if you have libsodium installed)

```bash
pip install pychloride
```

## Usage

```python
import pychloride

# Generate a keypair
pk, sk = pychloride.crypto_box_keypair()

# Sign a message
sign_pk, sign_sk = pychloride.crypto_sign_keypair()
signature = pychloride.crypto_sign_detached(b"Hello World", sign_sk)
```

## Differences from pysodium

- Bundles a WebAssembly-compiled `libsodium.so` for use in Pyodide
- Includes explicit `argtypes` definitions for ctypes WASM compatibility
- Loads libsodium from the package directory instead of system paths

## Versioning

The version follows the pattern `X.Y.Z.P` where:
- `X.Y.Z` is the upstream pysodium version
- `P` is the pychloride patch version

## Credits

Based on [pysodium](https://github.com/stef/pysodium) by Stefan Marsiske.

## License

BSD 2-Clause License (same as original pysodium). Third-party notices for the
bundled libsodium binary are in `THIRD_PARTY_LICENSES.md`.
