Skip to main content
Home

Built and signed on GitHub Actions

E2E encryption middleware for Inngest.

This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
94%
Published
3 months ago (1.0.2)
class EncryptionService

A service that encrypts and decrypts data. You can implement this abstract class to provide your own encryption service, or use the default encryption service provided by this package.

Properties

A unique identifier for this encryption service. This is used to identify the encryption service when serializing and deserializing encrypted values.

Methods

abstract
decrypt(value: string): MaybePromise<unknown>

Given an encrypted string, decrypts it and returns the decrypted value as any value.

abstract
encrypt(value: unknown): MaybePromise<string>

Given an unknown value, encrypts it and returns the the encrypted value.

namespace EncryptionService

Interfaces

I
EncryptionService.EncryptedValue

The encrypted value as it will be sent to Inngest.

I
EncryptionService.PartialEncryptedValue

A partial encrypted value, allowing an encryption service to specify the data and any other metadata needed to decrypt the value.

I
EncryptionService.V0EncryptedValue

A V0 encrypted value, which only contains the encrypted data.

Variables

v
EncryptionService.DEFAULT_ENCRYPTED_EVENT_FIELD

The default field used to store encrypted values in events.

v
EncryptionService.ENCRYPTION_MARKER

A marker used to identify encrypted values without having to guess.

v
EncryptionService.STRATEGY_MARKER

A marker used to identify the strategy used for encryption.

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@inngest/middleware-encryption

Import symbol

import { EncryptionService } from "@inngest/middleware-encryption";
or

Import directly with a jsr specifier

import { EncryptionService } from "jsr:@inngest/middleware-encryption";

Add Package

pnpm i jsr:@inngest/middleware-encryption
or (using pnpm 10.8 or older)
pnpm dlx jsr add @inngest/middleware-encryption

Import symbol

import { EncryptionService } from "@inngest/middleware-encryption";

Add Package

yarn add jsr:@inngest/middleware-encryption
or (using Yarn 4.8 or older)
yarn dlx jsr add @inngest/middleware-encryption

Import symbol

import { EncryptionService } from "@inngest/middleware-encryption";

Add Package

vlt install jsr:@inngest/middleware-encryption

Import symbol

import { EncryptionService } from "@inngest/middleware-encryption";

Add Package

npx jsr add @inngest/middleware-encryption

Import symbol

import { EncryptionService } from "@inngest/middleware-encryption";

Add Package

bunx jsr add @inngest/middleware-encryption

Import symbol

import { EncryptionService } from "@inngest/middleware-encryption";