Skip to content

PostGuardEncryption based on identity, not keys

Send encrypted messages and files to anyone using just their email address. No key exchange, no certificates, no hassle.

Quick Start

Install the SDK:

bash
npm install @e4a/pg-js

Encrypt files and send them to a recipient:

ts
import { PostGuard } from '@e4a/pg-js';

const pg = new PostGuard({
  pkgUrl: 'https://pkg.staging.yivi.app',
  cryptifyUrl: 'https://fileshare.staging.yivi.app'
});

const sealed = pg.encrypt({
  files: [file1, file2],
  recipients: [pg.recipient.email('alice@example.com')],
  sign: pg.sign.apiKey('PG-API-your-key')
});

await sealed.upload({ notify: { message: 'Here are your files' } });

Source: encryption.ts#L22-L46

Read the concepts guide to understand how this works, or jump straight to getting started.