Skip to content

Cades Browser Kit is a JS wrapper for CryptoPro Browser Plugin API

License

Notifications You must be signed in to change notification settings

denblackstache/cades-kit

Repository files navigation

CadesKit

Cades Browser Kit is a JS wrapper for CryptoPro Browser Plugin API.

Tests npm version

The CryptoPro Browser Plugin implements CAdES standard for digital signatures. CAdES is for CMS Advanced Electronic Signatures.

Version

CadesKit JS SDK API CryptoPro Browser Plugin
0.1.0 2.1.2 2.x
1.0.0 2.3.6 2.x

Get Started

Installation

Execute

npm install cades-kit

Examples

  • HTML script-tag example

See examples

Browser Compatibility

  • Chromium-based browsers: Google Chrome, Opera (Chromium), Microsoft Edge (Chromium), Yandex Browser
  • Firefox
  • IE 11

Usage

List Certificates (My store by default)

import { StoreFactory } from 'cades-kit';
const store = await new StoreFactory().create();
const certificates = await store.certificates();

Find a Certificate by a thumbprint

const store = await new StoreFactory().create();
const certificate = await store.findOne(thumbprint);

Simple Signature (attached)

import { SignService } from 'cades-kit';
const certificate = await store.findOne(thumbprint);
const signature = await new SignService().signBes('text', certificate);

Simple Signature (detached)

import { SignService } from 'cades-kit';
const certificate = await store.findOne(thumbprint);
const signature = await new SignService().signBes('text', certificate, { detached: true });

Hash

import { HashService } from 'cades-kit';
const hash = await new HashService().hash('text');

Library API

npm run build:docs

License

MIT

About

Cades Browser Kit is a JS wrapper for CryptoPro Browser Plugin API

Resources

License

Stars

Watchers

Forks