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

node-opcua-crypto

v4.8.0

Published

Crypto tools for Node-OPCUA

Downloads

91,228

Readme

node-opcua-crypto

NodeOPCUA Crypto is a powerful JavaScript module for handling security and cryptography for OPCUA. It's written in TypeScript and runs smoothly on Node.js and in the browser.

NPM download NPM version Build Status Code Climate Coverage Status install size FOSSA Status

Features

  • a comprehensive set of cryptographic functionalities.
  • supports both Node.js and browser environments.
  • compatible with TypeScript for robust, type-safe coding.
  • implements advanced security standards for OPCUA.

Getting Started

To use NodeOPCUA Crypto in your project, follow these steps:

Installation

npm install nodeopcua-crypto

Usage


import { generatePrivateKey, privateKeyToPEM, CertificatePurpose, createSelfSignedCertificate } from "./node-opcua-crypto.js";

async function demonstratePrivateKeyAndSelfSignedCertificateCreation() {

    // create the Private Key
    const privateKey = await generatePrivateKey();

    // convert the private key to a PEM format
    const { privPem } = await privateKeyToPEM(privateKey);

    console.log(privPem);

    // create a self-sign certificate
    const { cert } = await createSelfSignedCertificate({
        privateKey,
        notAfter: new Date(2025, 1, 1),
        notBefore: new Date(2019, 1, 1),
        subject: "CN=Test",
        dns: ["DNS1", "DNS2"],
        ip: ["192.168.1.1"],
        applicationUri: "urn:HOSTNAME:ServerDescription",
        purpose: CertificatePurpose.ForApplication,
    });
    console.log(cert);
}
demonstratePrivateKeyAndSelfSignedCertificateCreation();

Please refer to the examples directory for more specific use cases and comprehensive samples.

Support

For any inquiries or issues related to NodeOPCUA Crypto, you can contact us at [email protected]. Please note that priority support is available to NodeOPCUA Support Subscription members.

Getting professional support

NodeOPCUA PKI is developed and maintained by sterfive.com.

To get professional support, consider subscribing to the node-opcua membership community:

Professional Support

or contact sterfive for dedicated consulting and more advanced support.

Contributing

We appreciate contributions from the community. To contribute:

  • Fork the repository.
  • Create a new branch.
  • Commit your changes.
  • Submit a pull request.
  • Sign the CLA (Contributor Licence Agreement) form

For more detailed instructions, refer to the CONTRIBUTING.md file.

License

NodeOPCUA Crypto is MIT licensed. See the LICENSE file for full license details.

Copyright © 2023-2024 Sterfive.com.

Disclaimer

NodeOPCUA Crypto is provided as-is, and while we strive to ensure its quality and security, Sterfive.com cannot be held liable for any damage caused directly or indirectly by the usage of this module.

Please report any issues or vulnerabilities you find via the issue tracker.

Thank you for considering NodeOPCUA Crypto for your OPCUA cryptography needs. We look forward to seeing what you build with i

Supporting the development effort - Sponsors & Backers

If you like node-opcua-pki and if you are relying on it in one of your projects, please consider becoming a backer and sponsoring us, this will help us to maintain a high-quality stack and constant evolution of this module.

If your company would like to participate and influence the development of future versions of node-opcua please contact sterfive.