# paragonie/halite

High-level cryptography interface powered by libsodium

Repository: https://github.com/paragonie/halite
Canonical: https://ross.abutalabs.com/products/halite
Homepage: https://paragonie.com/project/halite
Language: PHP
License: MPL-2.0
License Family: copyleft
Topics: easy-to-use, cryptography, cryptography-library, libsodium, composer, encryption, authentication, digital-signature, curve25519, ed25519, x25519, xsalsa20, poly1305, blake2b, siphash, argon2, php, php7, misuse-resistant
Last push: 2025-12-26T15:54:24+00:00

## Health v2 (maintenance only)
Score: 55/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 59, release rhythm 24, longevity 100
- inputs: {"age_days": 3999, "days_push": 250, "days_rel": 348, "gap_med": 118.5, "n_releases_24m": 3}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1157, forks 91 (observed 2026-08-28T04:03:48.356242+00:00)

## What it is
Halite is a high-level, misuse-resistant cryptography library for PHP built on top of libsodium. It simplifies encryption, decryption, digital signatures, and password hashing by handling nonce management and key representation automatically.

## Use cases
- encrypt and decrypt files with streaming symmetric or public-key encryption
- sign and verify messages with ed25519 digital signatures
- encrypt data without manually managing nonces
- store secure authenticated HTTP cookies in PHP applications
- hash passwords securely with argon2
- give PHP developers a safe simple alternative to raw libsodium APIs

## When to choose
- you need encryption or signatures in PHP and want to avoid common cryptographic mistakes
- you want file encryption with automatic nonce handling
- you prefer a simple high-level API over libsodium's low-level functions
- you need authenticated encrypted cookies out of the box

## When to avoid
- your project is not in PHP
- you need cryptographic primitives or protocols not exposed by libsodium
- you require a permissive license and cannot accept MPL-2.0 terms
- you need cross-language interoperability with non-libsodium crypto formats

## Facets
- artifact type: library
- maturity: active
- function: cryptography, auth, security, serialization
- domain: security, developer-tools, web-development, backend
- platform: php, windows, cross-platform
- tags: libsodium, encryption, digital-signature, misuse-resistant, file-encryption, authenticated-encryption, key-management, composer, linux, macos

## Member repositories
- paragonie/halite (main) score 55

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:48.356242+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:32:03.731945+00:00, confidence not recorded.
  - readme: https://github.com/paragonie/halite (fetched 2026-08-28T04:03:48.356242+00:00, sha efb9b5e1a277)
  - homepage: https://paragonie.com/project/halite (fetched 2026-08-29T12:37:01.518778+00:00, sha 4f2a61786b43)
  - site_page: https://paragonie.com/book/pecl-libsodium/read/00-intro.md (fetched 2026-08-29T12:37:01.529982+00:00, sha 5d85e90e4e15)
  - site_page: https://paragonie.com/info (fetched 2026-08-29T12:37:01.528026+00:00, sha 2b4c8084191a)
- Data as of 2026-08-30T08:39:29.467469+00:00.
