{"id":50677361,"url":"https://github.com/pyxlab/cms_sign","last_synced_at":"2026-06-08T16:06:31.362Z","repository":{"id":247261442,"uuid":"825126967","full_name":"Pyxlab/cms_sign","owner":"Pyxlab","description":"The @pyxlab/cms_sign project is a TypeScript library developed to facilitate the signing and verification of digital documents using the CMS (Cryptographic Message Syntax) standard. Using the node-forge library","archived":false,"fork":false,"pushed_at":"2024-07-07T17:50:36.000Z","size":54,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-20T17:29:14.960Z","etag":null,"topics":["node-forge","nodejs","signature","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Pyxlab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-06T21:24:11.000Z","updated_at":"2024-07-07T17:50:39.000Z","dependencies_parsed_at":"2024-07-07T18:24:16.400Z","dependency_job_id":null,"html_url":"https://github.com/Pyxlab/cms_sign","commit_stats":null,"previous_names":["pyxlab/cms_sign"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Pyxlab/cms_sign","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pyxlab%2Fcms_sign","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pyxlab%2Fcms_sign/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pyxlab%2Fcms_sign/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pyxlab%2Fcms_sign/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pyxlab","download_url":"https://codeload.github.com/Pyxlab/cms_sign/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pyxlab%2Fcms_sign/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34069546,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["node-forge","nodejs","signature","typescript"],"created_at":"2026-06-08T16:06:30.237Z","updated_at":"2026-06-08T16:06:31.357Z","avatar_url":"https://github.com/Pyxlab.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @pyxlab/cms_sign\n\n\u003cbr /\u003e\n\n[![gh-workflow-image]][gh-workflow-url] [![npm-image]][npm-url] ![][typescript-image] [![license-image]][license-url]\n\n## Introduction\n\nThe `@pyxlab/cms_sign` package is a robust solution for creating and managing digital signatures in your projects. With an intuitive and flexible API, this package allows for the generation of digital signatures, verification of existing signatures, and manipulation of signature-related data in a secure and efficient manner.\n\n## Features\n\n- **Digital Signature Creation**: Easily generate digital signatures for your documents and data.\n- **Signature Verification**: Verify the authenticity of digital signatures.\n- **Compression Support**: Option to compress signed data, reducing the final file size.\n- **Output Customization**: Set custom output paths, file names, and more.\n\n## Installation\n\nYou can install the `@pyxlab/cms_sign` package using npm:\n\n```sh\nnpm install @pyxlab/cms_sign\n```\n\nOr using yarn:\n\n```sh\nyarn add @pyxlab/cms_sign\n```\n\n## Usage\n\n### Creating a Digital Signature\n\nTo create a digital signature, you can use the SignatureBuilder class:\n\n```ts\nimport { SignatureBuilder } from '@pyxlab/cms_sign';\n\nconst builder = new SignatureBuilder();\n\ntry {\n    const file = await builder.setDataBuffer(/* your data Buffer here */)\n       .setSignaturePath(/* path to the signature file */)\n       .setPassphrase(/* your passphrase here */)\n       .setOutputPath(/* output path */)\n       .setFilename(/* output file name */)\n       .setCompression(true); // Enables compression\n       .build();\n} catch (error) {\n  console.error('Error creating digital signature:', error);\n}\n```\n\n### Verifying a Digital Signature\n\nTo verify a digital signature, you can use `node-forge`:\n\n```ts\nimport fs from 'fs';\nimport forge from 'node-forge';\n\n// Load the text file and signature\nconst txtFilePath = 'path/to/your/file.txt';\nconst signatureFilePath = 'path/to/your/file.txt.p7s';\n\nconst txtFileContent = fs.readFileSync(txtFilePath, 'utf8');\nconst signatureContent = fs.readFileSync(signatureFilePath, 'binary');\n\n// Decode the signature\nconst p7 = forge.pkcs7.messageFromPem(signatureContent);\n\n// Verify if the text file was correctly signed\nconst verified = p7.verify({content: txtFileContent});\n\nif (verified) {\n  console.log('The signature is valid.');\n} else {\n  console.log('The signature is invalid.');\n}\n```\n\n## Contributing\n\nContributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n### Contribution Guidelines\n\nTo understand how to submit an issue, commit and create pull requests, check our [Contribution Guidelines](/.github/CONTRIBUTING.md).\n\n### Code of Conduct\n\nWe expect you to follow our [Code of Conduct](/.github/CODE_OF_CONDUCT.md). You can read it to understand what kind of behavior will and will not be tolerated.\n\n## License\n\nDistributed under the ISC License. See [LICENSE](/LICENSE) for more information.\n\n\u003cdiv align=\"center\"\u003e\n  \u003csub\u003eBuilt with ❤︎ by \u003ca href=\"https://github.com/lncitador\"\u003eWalaff Fernandes\u003c/a\u003e\n\u003c/div\u003e\n\n\n[gh-workflow-image]: https://img.shields.io/github/actions/workflow/status/pyxlab/cms_sign/checks.yaml?style=for-the-badge\n[gh-workflow-url]: https://github.com/pyxlab/cms_sign/actions/workflows/checks.yaml \"Github action\"\n\n[npm-image]: https://img.shields.io/npm/v/@pyxlab/cms_sign/latest.svg?style=for-the-badge\u0026logo=npm\n[npm-url]: https://www.npmjs.com/package/@pyxlab/cms_sign/v/latest \"npm\"\n\n[typescript-image]: https://img.shields.io/badge/Typescript-294E80.svg?style=for-the-badge\u0026logo=typescript\n\n[license-url]: LICENSE.md\n[license-image]: https://img.shields.io/github/license/pyxlab/cms_sign?style=for-the-badge","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyxlab%2Fcms_sign","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpyxlab%2Fcms_sign","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyxlab%2Fcms_sign/lists"}