Skip to content

iPGMail ​

iPGMail is an OpenPGP encryption tool for iOS and macOS. Protocol Launcher allows you to generate deep links to encrypt, decrypt, sign, and compose encrypted emails in iPGMail.

Usage ​

There are two ways to use this library:

  • On-Demand import from subpaths enables tree-shaking and keeps bundles small.
  • Full Import from the root package is convenient but includes all app modules.

Pick On-Demand for production builds; Full Import is fine for quick scripts or demos.

Select Installation Method

On-Demand
Recommended. Optimized for production.
Full Import
Convenient. Good for quick scripts.

Compose ​

Compose a new encrypted email directly in iPGMail.

On-Demand
ts
import { compose } from 'protocol-launcher/ipgmail'

const url = compose({
  text: 'This is a test...',
})

Decrypt ​

Decrypt a PGP message and return the status to the caller.

On-Demand
ts
import { decrypt } from 'protocol-launcher/ipgmail'

const url = decrypt({
  pgpmsg: 'clipboard',
  result: 'clipboard',
})

Encrypt ​

Encrypt a block of plaintext and either save it to a file or return it to the requesting app.

On-Demand
ts
import { encrypt } from 'protocol-launcher/ipgmail'

const url = encrypt({
  datasource: 'clipboard',
  keyid: '47E3234C',
  result: 'clipboard',
})

Sign ​

Sign a block of plaintext and either save it to a file or return it to the requesting app.

On-Demand
ts
import { sign } from 'protocol-launcher/ipgmail'

const url = sign({
  datasource: 'clipboard',
  signkey: '47E3234C',
  result: 'clipboard',
})