From 5122a020d7611ee05775811b3061f13159ceb145 Mon Sep 17 00:00:00 2001 From: Valery Buchinsky Date: Thu, 5 Oct 2023 12:19:32 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20utils?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/utils/README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 packages/utils/README.md diff --git a/packages/utils/README.md b/packages/utils/README.md new file mode 100644 index 00000000..5db93909 --- /dev/null +++ b/packages/utils/README.md @@ -0,0 +1,24 @@ +# ![@signpdf](https://raw.githubusercontent.com/vbuch/node-signpdf/master/resources/logo-horizontal.svg?sanitize=true) + +[![npm version](https://badge.fury.io/js/@signpdf%2Futils.svg)](https://badge.fury.io/js/@signpdf%2Futils) +[![Donate to this project using Buy Me A Coffee](https://img.shields.io/badge/buy%20me%20a%20coffee-donate-yellow.svg)](https://buymeacoffee.com/vbuch) + +Utilities from and for the [@signpdf family of packages](https://github.com/vbuch/node-signpdf/) that tries to make signing of PDFs simple in Node.js. + +## Usage + +Used by the other `@signpdf` packages internally. Additionally, needed for **PAdES compliant signatures**" + +```js +import { plainAddPlaceholder } from '@signpdf/placeholder-plain'; +import { SUBFILTER_ETSI_CADES_DETACHED } from '@signpdf/utils'; + +const pdfToSign = plainAddPlaceholder({ + ..., + subFilter: SUBFILTER_ETSI_CADES_DETACHED, +}); +``` + +## Notes + +* Feel free to copy and paste any part of this code. See its defined [Purpose](#purpose).