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

@tonysamperi/krypto

v1.1.0

Published

Modern tree-shakeable TypeScript version of crypto-js

Readme

Krypto

TypeScript library of crypto standards, derived from crypto-js

MIT Licence NPM version Size PRs welcome Build Status

I've been using crypto-js, but it was recently discontinued. It's not for that reason, but let's be honest: you always hated it for its typings. Man, seriously, a nightmare if you were in modern projects. I've been recently exploring ESM modules, so I've been making all of my libs tree-shakeable. Crypto-js is a not-so-tiny brick. CommonJS is ok, but there was just no way of not having those 200KBs in your bundles.

Well not anymore!!!

The syntax is very similar to the one in crypto-js, except that now all the entities are classes, so it's even more versatile. Little downside, big upside IMHO. The downside is that I had to use other names for the helpers offered by crypto-js such as SHA1, SHA256, etc.

Nothing impossible in any case: how SHA1 is the hasher class (that you can optionally extend), while the helper is just called sha1Helper.

It's easy, isn't it?

You can import whatever you want from the root

import {sha256Helper, Utf8} from "@tonysamperi/crypto";

const myHash = sha256Helper(Utf8.parse(value)).toString();

Preview releases

With v6 I introduced a new release tag next. These versions are basically release candidates that can be tried out before they get released. The next version tag gets cleared out automatically upon release of the latest stable version.

The beta releases instead, like it's always been, represent unstable releases, and they're subject to dramatic changes.

Features

I started with a few features that I personally need, but I will migrate others once a while. One that I have in mind is TripleDES.

ALGORITHMS (including helpers to simplify usage)

  • AES
  • DES
  • MD5
  • SHA1
  • SHA256
  • SHA512
  • TripleDES

KDF

  • pbkdf2
  • evpkdf

ENCODING

  • base64
  • hex
  • latin1
  • utf16
  • utf8

MODE

  • CBC
  • CTR
  • ECB

PADDING

  • nopadding
  • pkcs7
  • zeropadding

Usage

Via npm

npm i @tonysamperi/crypto --save

then

import {Hex} from "ts-luxon";

const myWord = Hex.parse("1a2b3c");

THANKS TO

Evan Vosberg for creating and maintaining crypto-js

DOCS

COMING SOON