0.0.2 • Published 1 year ago
@avb56/cades-utils v0.0.2
cades-Utils
CADES Utils already contains cadesplugin_api.js in own bundle. Adding ContentEncoding(CADESCOM_BASE64_TO_BINARY) to signMessageAsync
Usage
import { CadesUtils as anyName } from "@crpt/cades-utils";
//or
import CadesUtils from "@crpt/cades-utils";
//usually you will need 2 methods
CadesUtils.getFinalCertsArray().then(certs => {
console.log("certs", certs);
CadesUtils.signMessage("lalala", certs[0].certificate).then(signed =>
console.log("signed", signed)
);
});
method | description |
---|---|
getFinalCertsArray(): Promise<Cert[]> | Init plugin, create store, . Cert: {certificate: {}, info: [] }, certificate is an original cadesplugin Certificate object, info is an array name, date_from, date_to, serial_number. |
signMessage(message, cert, detached): Promise | Sign message with selected certificate. |