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):
composer require sot/crypt
> Environment Configuration
Configure your integration token as an environment variable:
fastcgi_param SOT_INT_TOKEN "your_token_value";
SetEnv SOT_INT_TOKEN "your_token_value"
> Integration
Include the SOT class in your application:
<?php
...
use Sot\Service\Data as SotData;
...
public function __construct(
protected SotData $sotData
) { }
...
?>
> Encryption Key Generation
Generate your encryption key:
$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:
fastcgi_param SOT_CRYPT_KEY "your_encryption_key";
SetEnv SOT_CRYPT_KEY "your_encryption_key"
> API Operations
Execute CRUD operations against your encrypted data:
$result = $this->sotData->show($key);
$result = $this->sotData->store($key, $value);
$result = $this->sotData->update($key, $value);
$result = $this->sotData->destroy($key);
> API Reference
[PARAMETERS]
- $key → Plaintext string to uniquely identify stored value
- $value → Plaintext string to securely store (auto-encrypted)