{"id":18483870,"url":"https://github.com/node-opcua/node-opcua-crypto","last_synced_at":"2026-02-20T10:04:14.266Z","repository":{"id":3123766,"uuid":"48511653","full_name":"node-opcua/node-opcua-crypto","owner":"node-opcua","description":"node-opcua certificate tools \u0026 encryption/signature support","archived":false,"fork":false,"pushed_at":"2024-04-06T02:56:01.000Z","size":1416,"stargazers_count":5,"open_issues_count":4,"forks_count":11,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-14T09:04:48.131Z","etag":null,"topics":["certificate","encryption","opcua","security"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/node-opcua.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"github":["erossignon"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2015-12-23T21:24:08.000Z","updated_at":"2023-09-04T11:17:15.000Z","dependencies_parsed_at":"2023-12-23T16:27:16.324Z","dependency_job_id":"698f1d3e-d5c7-4290-b6f1-30b135dae356","html_url":"https://github.com/node-opcua/node-opcua-crypto","commit_stats":{"total_commits":314,"total_committers":10,"mean_commits":31.4,"dds":"0.40764331210191085","last_synced_commit":"59d6b1116200df0831dd67c9d4a80f5069747e53"},"previous_names":[],"tags_count":93,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-opcua%2Fnode-opcua-crypto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-opcua%2Fnode-opcua-crypto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-opcua%2Fnode-opcua-crypto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/node-opcua%2Fnode-opcua-crypto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/node-opcua","download_url":"https://codeload.github.com/node-opcua/node-opcua-crypto/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247847865,"owners_count":21006149,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["certificate","encryption","opcua","security"],"created_at":"2024-11-06T12:37:38.145Z","updated_at":"2026-02-20T10:04:14.261Z","avatar_url":"https://github.com/node-opcua.png","language":"TypeScript","funding_links":["https://github.com/sponsors/erossignon","https://opencollective.com/node-opcua"],"categories":[],"sub_categories":[],"readme":"# node-opcua-crypto\n\nNodeOPCUA 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.\n\n[![NPM download](https://img.shields.io/npm/dm/node-opcua-crypto.svg)](https://www.npmtrends.com/node-opcua-crypto)\n[![NPM version](https://img.shields.io/npm/v/node-opcua-crypto)](https://www.npmjs.com/package/node-opcua-crypto?activeTab=versions)\n[![Build Status](https://github.com/node-opcua/node-opcua-crypto/actions/workflows/main.yml/badge.svg)](https://github.com/node-opcua/node-opcua-crypto/actions/workflows/main.yml)\n[![Code Climate](https://codeclimate.com/github/node-opcua/node-opcua-crypto/badges/gpa.svg)](https://codeclimate.com/github/node-opcua/node-opcua-crypto)\n[![Coverage Status](https://coveralls.io/repos/github/node-opcua/node-opcua-crypto/badge.svg?branch=master)](https://coveralls.io/github/node-opcua/node-opcua-crypto?branch=master)\n[![install size](https://packagephobia.com/badge?p=node-opcua-crypto)](https://packagephobia.com/result?p=node-opcua-crypto)\n[![FOSSA Status](https://app.fossa.com/api/projects/custom%2B20248%2Fgithub.com%2Fnode-opcua%2Fnode-opcua-crypto.svg?type=shield)](https://app.fossa.com/projects/custom%2B20248%2Fgithub.com%2Fnode-opcua%2Fnode-opcua-crypto?ref=badge_shield)\n\n\u003c!-- [![Test Coverage](https://codeclimate.com/github/node-opcua/node-opcua-crypto/badges/coverage.svg)](https://codeclimate.com/github/node-opcua/node-opcua-crypto/coverage) --\u003e\n\n## Features\n\n-   a comprehensive set of cryptographic functionalities.\n-   supports both Node.js and browser environments.\n-   compatible with TypeScript for robust, type-safe coding.\n-   implements advanced security standards for OPCUA.\n\n## Getting Started\n\nTo use NodeOPCUA Crypto in your project, follow these steps:\n\n#### Installation\n\n```bash\nnpm install nodeopcua-crypto\n```\n\n### Usage\n\n```bash\n\nimport { generatePrivateKey, privateKeyToPEM, CertificatePurpose, createSelfSignedCertificate } from \"./node-opcua-crypto.js\";\n\nasync function demonstratePrivateKeyAndSelfSignedCertificateCreation() {\n\n    // create the Private Key\n    const privateKey = await generatePrivateKey();\n\n    // convert the private key to a PEM format\n    const { privPem } = await privateKeyToPEM(privateKey);\n\n    console.log(privPem);\n\n    // create a self-sign certificate\n    const { cert } = await createSelfSignedCertificate({\n        privateKey,\n        notAfter: new Date(2025, 1, 1),\n        notBefore: new Date(2019, 1, 1),\n        subject: \"CN=Test\",\n        dns: [\"DNS1\", \"DNS2\"],\n        ip: [\"192.168.1.1\"],\n        applicationUri: \"urn:HOSTNAME:ServerDescription\",\n        purpose: CertificatePurpose.ForApplication,\n    });\n    console.log(cert);\n}\ndemonstratePrivateKeyAndSelfSignedCertificateCreation();\n\n\n```\n\nPlease refer to the examples directory for more specific use cases and comprehensive samples.\n\n## Support\n\nSterfive provides this module free of charge, \"as is,\" with the hope that it will be useful to you. However, any support requests, bug fixes, or enhancements are handled exclusively through our paid services. We believe strongly that independent open-source companies should be fairly compensated for their contributions to the community.\n\nWe highly recommend subscribing to our support program to ensure your requests are addressed and resolved. Please note that we only consider requests from members of our support program or sponsors.\n\n### Getting professional support\n\nNodeOPCUA Crypto is developed and maintained by sterfive.com.\n\nTo get professional support, consider subscribing to the node-opcua membership community:\n\n[![Professional Support](https://img.shields.io/static/v1?style=for-the-badge\u0026label=Professional\u0026message=Support\u0026labelColor=blue\u0026color=green\u0026logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2ZXJzaW9uPSIxLjEiIGlkPSJMYXllcl8xIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDQ5MS41MiA0OTEuNTIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQ5MS41MiA0OTEuNTI7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4NCjxnPg0KCTxnPg0KCQk8cGF0aCBkPSJNNDg3Ljk4OSwzODkuNzU1bC05My4xMDktOTIuOTc2Yy00LjgxMy00LjgwNi0xMi42NDItNC42NzQtMTcuMjczLDAuMzA3Yy03LjE0OCw3LjY4OS0xNC42NCwxNS41NTQtMjEuNzMsMjIuNjM0ICAgIGMtMC4yNzEsMC4yNy0wLjUwMSwwLjQ5My0wLjc2MywwLjc1NUw0NjcuMyw0MzIuNTA0YzguOTEtMTAuNjE0LDE2LjY1Ny0yMC40MSwyMS43My0yNi45NyAgICBDNDkyLjcyLDQwMC43NjIsNDkyLjI1NywzOTQuMDE5LDQ4Ny45ODksMzg5Ljc1NXoiLz4NCgk8L2c+DQo8L2c+DQo8Zz4NCgk8Zz4NCgkJPHBhdGggZD0iTTMzNC4zLDMzNy42NjFjLTM0LjMwNCwxMS4zNzktNzcuNTYsMC40MTMtMTE0LjU1NC0yOS41NDJjLTQ5LjAyMS0zOS42OTMtNzUuOTcyLTEwMi42NDItNjUuODM4LTE1MC41OTNMMzcuNjM0LDQxLjQxOCAgICBDMTcuNjUzLDU5LjQyNCwwLDc4LjU0NSwwLDkwYzAsMTQxLjc1MSwyNjAuMzQ0LDQxNS44OTYsNDAxLjUwMyw0MDAuOTMxYzExLjI5Ni0xLjE5OCwzMC4xNzYtMTguNjUxLDQ4LjA2Mi0zOC4xNjdMMzM0LjMsMzM3LjY2MSAgICB6Ii8+DQoJPC9nPg0KPC9nPg0KPGc+DQoJPGc+DQoJCTxwYXRoIGQ9Ik0xOTMuODU0LDk2LjA0MUwxMDEuMjEzLDMuNTNjLTQuMjI1LTQuMjItMTAuODgyLTQuNzI0LTE1LjY2NC0xLjE0NWMtNi42NTQsNC45ODMtMTYuNjQ4LDEyLjY1MS0yNy40NTMsMjEuNDk4ICAgIGwxMTEuOTQ1LDExMS43ODVjMC4wNjEtMC4wNiwwLjExMS0wLjExMywwLjE3Mi0wLjE3NGM3LjIzOC03LjIyOCwxNS4zNTUtMTQuODg1LDIzLjI5MS0yMi4xNjcgICAgQzE5OC41MzQsMTA4LjcxMywxOTguNjg0LDEwMC44NjMsMTkzLjg1NCw5Ni4wNDF6Ii8+DQoJPC9nPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPGc+DQo8L2c+DQo8Zz4NCjwvZz4NCjxnPg0KPC9nPg0KPC9zdmc+)](https://support.sterfive.com)\n\nor contact [sterfive](https://www.sterfive.com) for dedicated consulting and more advanced support.\n\n## Contributing\n\nWe appreciate contributions from the community. To contribute:\n\n-   Fork the repository.\n-   Create a new branch.\n-   Commit your changes.\n-   Submit a pull request.\n-   Sign the CLA (Contributor Licence Agreement) form\n\nFor more detailed instructions, refer to the CONTRIBUTING.md file.\n\n## License\n\nNodeOPCUA Crypto is MIT licensed. See the [LICENSE file](./LICENSE) for full license details.\n\nCopyright © 2023-2026 Sterfive.com.\n\n## Disclaimer\n\nNodeOPCUA 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.\n\nPlease report any issues or vulnerabilities you find via the issue tracker.\n\nThank you for considering NodeOPCUA Crypto for your OPCUA cryptography needs. We look forward to seeing what you build with i\n\n## Supporting the development effort - Sponsors \u0026 Backers\n\nIf you like `node-opcua-crypto` and if you are relying on it in one of your projects, please consider becoming a backer and [sponsoring us](https://opencollective.com/node-opcua), this will help us to maintain a high-quality stack and constant evolution of this module.\n\nIf your company would like to participate and influence the development of future versions of `node-opcua` and its components, please contact [sterfive](mailto:contact@sterfive.com).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnode-opcua%2Fnode-opcua-crypto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnode-opcua%2Fnode-opcua-crypto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnode-opcua%2Fnode-opcua-crypto/lists"}