SDK Integrations

Integrate Cipherion into your applications using our comprehensive SDKs for all major programming languages and frameworks.

SDK Features
All Cipherion SDKs provide consistent functionality across languages
Type-safe APIs
Async operations
Error handling
Rate limiting
Retry logic
Logging support
Configuration
Testing utilities

Available SDKs

JavaScript/Node.js
stablev2.1.0
Full-featured SDK for Node.js and browser environments

Key Features

  • TypeScript support
  • Promise-based API
  • Automatic retries
  • Built-in rate limiting
Python
stablev2.0.3
Comprehensive Python SDK with async support

Key Features

  • Async/await support
  • Type hints
  • Context managers
  • Error handling
Java (Coming Soon...)
stablev1.8.2
Enterprise-ready Java SDK with Spring Boot integration

Key Features

  • Spring Boot starter
  • Connection pooling
  • Metrics collection
  • Auto-configuration
Go (Coming Soon...)
stablev1.5.1
High-performance Go SDK for microservices

Key Features

  • Context support
  • Concurrent operations
  • gRPC client
  • Middleware
C#/.NET (Coming Soon)
stablev1.4.0
.NET SDK with full async support and dependency injection

Key Features

  • Dependency injection
  • Configuration providers
  • Logging integration
  • Health checks
Ruby (Coming Soon...)
betav0.9.0
Ruby SDK with Rails integration

Key Features

  • Rails generators
  • ActiveRecord helpers
  • Sidekiq integration
  • Flexible configuration
PHP (Coming Soon...)
stablev1.3.2
PHP SDK with Laravel and Symfony support

Key Features

  • Laravel package
  • Symfony bundle
  • PSR-7 support
  • Composer integration
Rust (Coming Soon...)
alphav0.3.0
Memory-safe Rust SDK for high-performance applications

Key Features

  • Zero-copy operations
  • Tokio async
  • Type safety
  • Cross-compilation

Quick Start Examples

JavaScript/Node.js SDK
Get started with the JavaScript SDK

Installation

npm install @cipherion/sdk
# or
yarn add @cipherion/sdk

Basic Usage

import { CipherionClient } from '@cipherion/sdk';

const client = new CipherionClient({
  apiKey: process.env.CIPHERION_API_KEY,
  projectId: process.env.CIPHERION_PROJECT_ID
});

// Encrypt data
const result = await client.encrypt({
  data: 'john.doe@example.com',
  dataType: 'email',
  passphrase: 'your-secure-passphrase',
  context: 'user_email_field'
});

console.log('Encrypted:', result.encryptedData);

// Decrypt data
const decrypted = await client.decrypt({
  encryptedData: result.encryptedData,
  passphrase: 'your-secure-passphrase',
  context: 'user_email_field'
});

console.log('Decrypted:', decrypted.data);

Error Handling

try {
  const result = await client.encrypt({
    data: 'sensitive-data',
    dataType: 'email',
    passphrase: 'weak-password'
  });
} catch (error) {
  if (error instanceof CipherionError) {
    console.error('Cipherion error:', error.code, error.message);
  } else {
    console.error('Unexpected error:', error);
  }
}
Framework Integrations
Pre-built integrations for popular frameworks

React/Next.js

React hooks and components for client-side encryption

HookComponents

Express.js

Middleware for automatic request/response encryption

MiddlewareRoutes

Spring Boot

Auto-configuration and annotations for seamless integration

StarterAnnotations

Django

Model fields and middleware for database encryption

FieldsMiddleware

Laravel

Eloquent casting and service provider for PHP applications

PackageCasting

Rails

ActiveRecord helpers and generators for Ruby on Rails

GemGenerators
Testing and Development
Tools and utilities for testing your integration

Test Utilities

  • • Mock client for unit testing
  • • Test data generators
  • • Assertion helpers
  • • Performance benchmarks

Development Tools

  • • CLI tool for testing
  • • Debug logging
  • • Request/response inspection
  • • Health check endpoints

Example Test

import { CipherionClient, MockCipherionClient } from '@cipherion/sdk';

describe('User Service', () => {
  let mockClient: MockCipherionClient;
  
  beforeEach(() => {
    mockClient = new MockCipherionClient();
    mockClient.mockEncrypt('test@example.com', 'encrypted_test_data');
  });
  
  it('should encrypt user email', async () => {
    const userService = new UserService(mockClient);
    const result = await userService.createUser({
      email: 'test@example.com'
    });
    
    expect(result.encryptedEmail).toBe('encrypted_test_data');
    expect(mockClient.encrypt).toHaveBeenCalledWith({
      data: 'test@example.com',
      dataType: 'email'
    });
  });
});
Support and Resources
Additional resources for SDK integration

Documentation

Comprehensive guides and API references

Examples

Sample applications and code snippets

GitHub

Source code, issues, and community contributions