Hash, Salt & Encryptwith SQL-like Simplicity
MixQL is a TCP-based query language server for hashing, salting, and one-way encryption operations. Built with C++17, OpenSSL, and LevelDB for production-grade performance.
Enterprise-Grade Crypto Operations
MixQL provides a comprehensive suite of cryptographic operations through a simple, SQL-like interface. Built for developers who need reliable hashing, salting, and encryption without the complexity.
Query Engine
SQL-like syntax for hashing, salting, and encryption operations with nested function evaluation.
CLI Tooling
Interactive REPL interface with parameterized queries and color-coded responses.
SDK Integrations
Fluent PHP client library with object-oriented interface for seamless integration.
Server Architecture
TCP socket server with thread-per-connection model and graceful shutdown.
High Performance
Built with C++17 and OpenSSL for native-speed cryptographic operations.
Extensibility
Persistent query storage with LevelDB and modular crypto function system.
Developer Experience
Comprehensive documentation, Docker images, and configuration flexibility.
Protocol Support
Plain-text TCP protocol with simple framing for any language integration.
Security
OpenSSL-powered crypto with optional authentication and secure defaults.
Persistent Storage
LevelDB backend for named query storage and retrieval operations.
Hash Functions
SHA-1, MD5, Base64 encoding, UUID generation, and custom salt creation.
Key Generation
Batch key generation with configurable salt length and SHA-1 post-hashing.
How MixQL Works
A streamlined architecture built for performance and reliability. From TCP connection to cryptographic operation and back — all in milliseconds.
Client Layer
- CLI Tool
- PHP SDK
- Custom Clients
Network Layer
- TCP Socket
- Port 7272
- Plain-text Protocol
Server Layer
- Query Router
- Thread Pool
- Configuration
Processing Layer
- Crypto Engine
- Function Evaluator
- Parameter Handler
Storage Layer
- LevelDB
- Query Store
- Persistent Data
Client Request
Client sends a MixQL query over TCP connection to port 7272.
TCP Server
Server accepts connection and spawns a thread-per-connection handler.
Query Router
Query is parsed and routed based on keyword matching (SELECT, CREATE, STORE).
Crypto Engine
OpenSSL processes SHA-1, MD5, Base64, UUID, salt, and key generation.
Storage Layer
LevelDB handles persistent query storage for STORE operations.
Response
Result is Base64-encoded and sent back over the socket connection.
Wire Protocol
Simple plain-text TCP protocol with newline framing
Real-World Usage Patterns
From CLI interactions to SDK integration and Docker deployment — see how MixQL fits into your workflow with these practical examples.
CLI Usage
Interactive REPL with parameterized queries and color-coded responses
# Start interactive CLI
bash mixql.sh
# Or run directly with custom host/port
bash mixql.sh -h mixql.demo.senicity.com -p 9797
# Example session:
mixql> SELECT SHA1(:input) AS hash
Enter value for "input": hello
Result: aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d
mixql> CREATE UUID
Result: a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d
mixql> CREATE SALT LIMIT 3 LENGTH 24
Result:
• xY8pLq9RzT2wN4bV7mK3jH6
• gF5dS1aQ8wE3rT6yU9iO2p
• bN7vM4cX1zL9kJ8hG5fD2sPHP SDK
Fluent PHP client with object-oriented interface
<?php
include_once 'mixql-php/autoload.php';
// Create client instance
$mixql = new MixQL('localhost', 7272);
// SHA-1 hash with parameter
$result = $mixql->query(
'SELECT SHA1(:input) AS hash',
['input' => 'hello']
);
// Result: aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d
// Generate UUID
$uuid = $mixql->createUuid();
// Result: a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d
// Batch salt generation
$salts = $mixql->createSalts(5, 32, true);
// Returns array of 5 SHA-1 hashed salts
// Store query for reuse
$mixql->storeQuery(
'hash_password',
'SELECT SHA1(:password) AS hash'
);Query Language
SQL-like syntax for cryptographic operations
-- SHA-1 hash with uppercase output
SELECT SHA1(:data) AS hash UPPERCASE
-- Nested functions with timestamp
SELECT SHA1(CONCAT(:user, NOW())) AS hash
-- MD5 hash
SELECT MD5(:input) AS hash
-- Base64 encoding
SELECT BASE64_ENCODE(:secret) AS hash
-- Create UUID
CREATE UUID
-- Generate 5 salts of 32 characters
CREATE SALT LIMIT 5 LENGTH 32
-- Generate salts with SHA-1 post-hash
CREATE SALT SHA
-- Generate 10 keys
CREATE KEY LIMIT 10
-- Store query for reuse
SELECT SHA1(:password) AS hash STORE AS hash_password
-- Execute stored query
STORE USE hash_passwordDocker Deployment
Containerized deployment with Alpine and Ubuntu variants
# Pull latest image
docker pull senicity/mixql:latest
# Run with default config
docker run -p 7272:7272 senicity/mixql:alpine
# Run with custom port and auth
docker run -p 8080:8080 \
-e SERVER_PORT=8080 \
-e SERVER_AUTH_ENABLED=true \
senicity/mixql:ubuntu
# Mount custom config file
docker run -p 7272:7272 \
-v /path/to/config.ini:/app/config/config.ini \
senicity/mixql:alpine
# Test connection
echo -e "CREATE UUID\n" | nc localhost 7272
# Available tags:
# • senicity/mixql:alpine (25MB, minimal)
# • senicity/mixql:ubuntu (90MB, full libs)
# • senicity/mixql:latest (points to alpine)Raw TCP Usage
Direct TCP communication from any language
# Simple netcat example
echo -e "SELECT SHA1(:input) AS hash\nhello" | nc localhost 7272
# Python TCP client
import socket
def mixql_query(query, params=None):
payload = query + "\n"
if params:
payload += "\n".join(params)
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
s.connect(("localhost", 7272))
s.sendall(payload.encode())
return s.recv(4096).decode()
# JavaScript/Node.js example
const net = require('net');
function mixqlQuery(query, params = []) {
return new Promise((resolve, reject) => {
const client = new net.Socket();
const payload = query + '\n' + params.join('\n');
client.connect(7272, 'localhost', () => {
client.write(payload);
});
client.on('data', (data) => {
resolve(data.toString());
client.destroy();
});
client.on('error', reject);
});
}Configuration
Flexible configuration via INI file or environment variables
# config.ini
[server]
port=7272
dbname=mixql
auth_enabled=true
auth_users=admin:secret123,user:password456
# Environment variables (override config.ini)
export SERVER_PORT=8080
export SERVER_DBNAME=customdb
export SERVER_AUTH_ENABLED=true
# Authentication example
# When auth_enabled=true, clients must send:
# AUTH username:password
# Before any other queries
# Priority order:
# 1. Environment variables
# 2. config.ini file
# 3. Default values
# Default values:
# port: 7272
# dbname: datastore
# auth_enabled: false
# auth_users: {} (empty map)Quick Start
Get MixQL running in seconds with Docker
Built for Developers, by Developers
MixQL prioritizes developer happiness with intuitive APIs, comprehensive documentation, and production-ready tooling that just works.
Simplicity
SQL-like syntax that developers already understand. No complex crypto APIs to learn.
- SELECT SHA1(:input) AS hash
- CREATE UUID
- CREATE SALT LIMIT 5
- STORE AS named_query
Speed
Native C++17 performance with OpenSSL acceleration. Thread-per-connection model.
- Microsecond response times
- No garbage collection pauses
- Direct memory access
- Optimized crypto routines
Integration
Works with any language that supports TCP sockets. Official PHP SDK available.
- Plain-text TCP protocol
- PHP client library
- CLI interactive REPL
- Docker containers
Extensibility
Persistent query storage, configurable auth, and modular architecture.
- LevelDB query store
- Custom authentication
- Environment config
- Docker multi-stage builds
Productivity
Comprehensive documentation, examples, and community support.
- Interactive CLI
- Code examples
- Architecture docs
- Agent integration guide
Reliability
Production-grade with graceful shutdown, error handling, and persistence.
- Graceful shutdown
- Error recovery
- Data persistence
- Connection pooling
Why Choose MixQL?
When you need cryptographic operations but don't want to manage complex crypto libraries or write boilerplate code, MixQL provides a simple, reliable interface that scales with your needs.
- No crypto expertise required
- Works with any programming language
- Production-ready with Docker support
Complete Tooling for Every Use Case
From the core server to language SDKs and comprehensive documentation — everything you need to integrate MixQL into your workflow.
MixQL Server
Core TCP server written in C++17 with OpenSSL and LevelDB.
Docker Hub
Official container images
senicity/mixql:alpinesenicity/mixql:ubuntusenicity/mixql:latestEssential Resources
Access all MixQL components, documentation, and legal resources in one place.
Technical Resources
Legal Resources
Get Started Quickly
Download MixQL and start using it in minutes with our comprehensive documentation.