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 🙏

© 2024 – Pkg Stats / Ryan Hefner

crypto-lite

v21.8.0

Published

Standard cryptographic algorithms

Downloads

9,344

Readme

Cryptographic algorithms – Coverage Size Buy Me A Tea

Pure JavaScript implementations for:

  • RFC 3174 - SHA-1 - Secure Hash Algorithm 1
  • FIPS 180-2 - SHA-256 - Secure Hash Algorithm 2
  • RFC 3874 - SHA-224 - A 224-bit One-way Hash Function
  • RFC 2104 - HMAC - Keyed-Hashing for Message Authentication
  • RFC 8018 - PBKDF2 - Password-Based Key Derivation Function 2
  • RFC 6238 - TOTP - Time-Based One-Time Password
  • RFC 4226 - HOTP - HMAC-Based One-Time Password

How to use in browser

<script src=crypto-lite.js></script>

<script>
crypto.sha1("secret")
// e5e9fa1ba31ecd1ae84f75caaa474f3a663f05f4
crypto.sha256("secret")
// 2bb80d537b1da3e38bd30361aa855686bde0eacd7162fef6a25fe97bf527a25b
crypto.hmac("sha1", "key", "message")
// 2088df74d5f2146b48146caf4965377e9d0be3a4
crypto.hmac("sha256", "key", "message")
// 6e9ef29b75fffc5b7abae527d58fdadb2fe42e7219011976917343065f58ed4a
crypto.pbkdf2("password", "salt", 1, 20, "sha1")
// 0c60c80f961f0e71f3a9b524af6012062fe037a6
crypto.hotp("secret", { counter: 1, digits 6, algo: "sha1" })
crypto.totp("secret", { time: Date.now(), t0: 0, step: 30, digits 6, algo: "sha1" }) // Defaults
</script>

How to use in node.js

Although it should work in node.js, you should use native api there.

npm install crypto-lite

var crypto = require("crypto-lite").crypto

External links

Licence

Copyright (c) 2014-2021 Lauri Rooden <[email protected]>
The MIT License