No key exchange needed
Encrypt data using nothing more than the recipient's email address. There are no public keys to look up and no certificates to manage.
Send encrypted messages and files to anyone using just their email address. No key exchange, no certificates, no hassle.
Install the SDK:
npm install @e4a/pg-jsEncrypt files and send them to a recipient:
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' } });Read the concepts guide to understand how this works, or jump straight to getting started.