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

web-crypto.js

v1.1.3

Published

Lightweight web crypto lib. No dependencies. Cross-browser support.

Downloads

16

Readme

web-crypto is a lightweight and dependency-free JavaScript library for cryptographic operations in web browsers. It provides a comprehensive set of functions and algorithms to securely handle cryptographic tasks, ensuring data confidentiality, integrity, and authentication.

Features

  • Zero external dependencies: web-crypto is designed to be a standalone library, without any reliance on external frameworks or libraries. This ensures easy integration and reduces the risk of compatibility issues.

  • Cross-browser compatibility: web-crypto is built to work seamlessly across all major web browsers, including Chrome, Firefox, Safari, and Edge. It leverages the Web Crypto API, which is supported by modern browsers, to perform cryptographic operations.

  • Comprehensive cryptographic functions: The library supports a wide range of cryptographic functions, including encryption, decryption, hashing, digital signatures, key generation, and key management. This allows developers to implement robust security measures in their web applications.

  • Easy-to-use API: web-crypto provides a simple and intuitive API, making it accessible to both experienced and novice developers. It offers clear and concise methods for performing common cryptographic operations, allowing developers to focus on their application logic.

Installation

You can install web-crypto using package managers like npm or yarn:

npm install web-crypto.js

Getting Started

To get started with web-crypto, simply include the library in your project and start using its cryptographic functions. Refer to the documentation and code examples provided to understand the available methods and their usage.

import { useEffect } from "react";
import webCrypto from "web-crypto.js";

function App() {
  useEffect(() => {
    async function anyFn() {
      const key = await webCrypto.generateKey();
      const data = {
        name: "Yazalde Filimone",
        age: 18,
      };
      const coded = webCrypto.textEncode(JSON.stringify(data));
      const data_encrypt = await webCrypto.encrypt({ key, data: coded });
      const data_decrypt = await webCrypto.decrypt({ key, data: data_encrypt });
      const decode = JSON.parse(webCrypto.textDecode(data_decrypt));
      console.log({ decode });
    }
    anyFn()
      .then()
      .catch((erro) => console.log(erro));
  }, []);
  return <div />;
}

export default App;

Contribution

web-crypto welcomes contributions from the open-source community. If you encounter any issues or have suggestions for improvements, please submit a GitHub issue or pull request. Together, we can make web-crypto even better.

License

web-crypto is released under the MIT License. See the LICENSE file for more information.

Acknowledgments

web-crypto is built upon the foundation of the Web Crypto API specification, which is developed and maintained by the World Wide Web Consortium (W3C). We would like to express our gratitude to the W3C and the contributors who have made this library possible.