Setup Guide

[DEPLOY] Get started in minutes

[DESIGN] Built for security + ease of use. Minimal technical setup required.

Once you've created your integration token (covered here) include our composer library in your project (repository: github.com/husseycoding/sot):

[COMMAND]
composer require sot/crypt

> Environment Configuration

Configure your integration token as an environment variable:

[NGINX]
fastcgi_param SOT_INT_TOKEN "your_token_value";
[APACHE]
SetEnv SOT_INT_TOKEN "your_token_value"

> Integration

Include the SOT class in your application:

[PHP INTEGRATION]
<?php
...
use Sot\Service\Data as SotData;
...
public function __construct(
    protected SotData $sotData
) { }
...
?>

> Encryption Key Generation

Generate your encryption key:

[KEY-GEN]
$key = $this->sotData->cryptKeyGenerate();

[CRITICAL] Store encryption key securely.

[WARNING] Key loss = data loss. We store no plaintext or keys.

[INFO] cryptKeyGenerate() checks environment first. Returns empty if key exists.

> Key Storage Configuration

Configure your encryption key token as an environment variable, for instance:

[NGINX]
fastcgi_param SOT_CRYPT_KEY "your_encryption_key";
[APACHE]
SetEnv SOT_CRYPT_KEY "your_encryption_key"

> API Operations

Execute CRUD operations against your encrypted data:

[READ]
$result = $this->sotData->show($key);
[CREATE]
$result = $this->sotData->store($key, $value);
[UPDATE]
$result = $this->sotData->update($key, $value);
[DELETE]
$result = $this->sotData->destroy($key);

> API Reference

[PARAMETERS]

  • $key → Plaintext string to uniquely identify stored value
  • $value → Plaintext string to securely store (auto-encrypted)

[RESPONSE] Array Structure

'code' HTTP status (200 = success)
'success' Boolean result
'error' Error message (empty if success)
'value' Decrypted data (show() only)