HKEY Docs
← Back to SDKs & downloads

SDK Documentation

PHP SDK

Reference implementation of the Hotkey Encryption System (HKEY v1) for PHP. Use it to derive keys from hotkey chord sequences and create authenticated, portable packets in web apps, CLIs, and services.

Requirements

Package contents

Quick start

require 'src/HotkeyEncryption.php';
use HKey\HotkeyEncryption;

$hkey = new HotkeyEncryption(
    'lab.freezer.alpha',                // context (gesture salt)
    ['Ctrl+Alt+H', 'Shift+K', 'Meta+E', 'Y'] // ordered chord sequence
);

$packetJson = $hkey->encryptText('sensitive payload');
$plain = $hkey->decryptText($packetJson);

echo $hkey->getDigest(); // sequence digest (commitment)
echo $plain;             // "sensitive payload"

Run the example

php sdk/php/example.php

API overview

HKEY v1 behavior

Good practices

This is a reference/educational implementation. For regulated or high-risk production use, seek independent review and pair with audited, standardized AEAD primitives and secure operational controls.