npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

kryptit

v1.0.0-beta.0

Published

TypeScript field-level encryption engine for secure backend data storage

Readme

Kryptit

TypeScript field-level encryption SDK for securely storing backend data using AES-256-GCM.


Why Kryptit?

Kryptit helps backend applications securely store sensitive data in encrypted form before it reaches the database layer.

Instead of storing plaintext values directly inside your database, Kryptit encrypts selected fields inside your application runtime using authenticated AES-256-GCM encryption.


Features

  • AES-256-GCM encryption
  • Authenticated decryption
  • Nested object encryption
  • Array traversal support
  • TypeScript support
  • MongoDB-friendly
  • CLI key generation
  • Zero external crypto dependencies

Installation

npm install kryptit

Generate Encryption Key

npx kryptit keygen

Example output:

fa5a8b25cc6426b746c5f5457d038ff0d49d67d948bd7d1d392285d77be98a9c

Basic Usage

import { FieldGuard } from "kryptit";

const guard = new FieldGuard({
  secretKeyHex: process.env.KRYPTIT_SECRET!
});

const encrypted = guard.encrypt(
  {
    text: "hello encrypted world"
  },
  ["text"]
);

console.log(encrypted);

const decrypted = guard.decrypt(
  encrypted,
  ["text"]
);

console.log(decrypted);

Example Encrypted Output

v1:a4f91b7d3e20c19a44b1029c:f58d2c91a3b4c5d6e7f8e1d2c3b4a5f6:7ca91b4d...

Express + MongoDB Example

const express = require("express");
const mongoose = require("mongoose");

const { FieldGuard } = require("kryptit");

const guard = new FieldGuard({
  secretKeyHex: process.env.KRYPTIT_SECRET,
});

const messageSchema = new mongoose.Schema({
  text: String,
});

const Message = mongoose.model(
  "Message",
  messageSchema
);

// Encrypt before saving
app.post("/send", async (req, res) => {

  const encrypted = guard.encrypt(
    {
      text: req.body.text
    },
    ["text"]
  );

  const message =
    await Message.create(encrypted);

  res.json(message);
});

// Decrypt after reading
app.get("/messages", async (req, res) => {

  const messages =
    await Message.find();

  const decrypted =
    messages.map(message =>
      guard.decrypt(
        message.toObject(),
        ["text"]
      )
    );

  res.json(decrypted);
});

Security Notes

  • Kryptit uses AES-256-GCM authenticated encryption.
  • Encryption keys should always be stored in environment variables.
  • Encryption keys must never be stored inside source code.
  • Kryptit is designed for backend/server-side environments only.
  • Encrypted fields are not searchable.
  • This package has not yet undergone a third-party security audit.

Current Limitations

  • No searchable encrypted fields
  • No key rotation support
  • No ORM middleware integrations yet

Development Status

Kryptit is currently in beta and under active development.


License

MIT