Search by

alrayyes / hush-hush

Official PHP SDK for hush-hush, generated from its OpenAPI spec

Maintainers

Package info

github.com/alrayyes/hush-hush-php

pkg:composer/alrayyes/hush-hush

Transparency log

Statistics

Installs: 17

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v3.4.9 2026-09-05 11:17 UTC

This package is auto-updated.

Last update: 2026-09-07 04:35:49 UTC


README

ci Codecov Packagist release license

The official PHP SDK for hush-hush, generated from its OpenAPI spec and kept in sync with it automatically.

Install

composer require alrayyes/hush-hush

Requires PHP 8.2 or newer.

Quickstart

use HushHush\Client;

$client = new Client('https://hush-hush.example.com', 'your-api-key'); // or set HUSH_HUSH_API_KEY

// Create is a write operation — it needs the credential above.
$client->createObject('my-first-secret', 'already-sealed-ciphertext');

// Get needs no credential — hush-hush's confidentiality boundary is
// "who holds a matching private key," not who's calling this endpoint.
$value = $client->getObject('my-first-secret');
echo 'got ' . strlen($value) . " bytes of sealed ciphertext\n";

// The audit log records every read and write; querying it needs no
// credential either, and returns the full matching result set (there's
// no pagination on this endpoint).
foreach ($client->queryAuditLog() as $entry) {
    echo $entry->getAction() . ' ' . $entry->getObjectId() . ' ' . $entry->getTimestamp()->format(DATE_ATOM) . "\n";
}

The API key is only required for write operations (create/update/delete); reads (get, used-by, audit-log query) work without one. A per-call $caller argument, accepted by create/get/update/delete, is optional. See the full API reference for everything else.

Versioning

This SDK's version tracks hush-hush's OpenAPI spec, not this repo's own commit history — see CONTRIBUTING.md for how a spec change becomes a release.

License

MIT