A JavaScript library that provides an asynchronous interface for interacting with the CryptoPro plugin.
- Returns information about the plugin.
- Retrieves and logs the version details of the plugin.
- Fetches a list of available certificates. It also filters out certificates that are not currently valid or don't have a private key.
- Signs a hash using a specified certificate thumbprint.
- Signs a Base64 encoded string using a specified certificate thumbprint.
- Signs a string using a specified certificate thumbprint.
- Verifies the signature of a Base64 encoded data.
- Verifies the signature of a hash.
- Computes the hash of the provided data.
- Signs hash data and verifies the signature.
- Signs hash data without verifying the signature.
Ensure that the CryptoPro plugin is installed and properly configured on the client's machine.
import { about, version } from 'crypto_pro_api'
async function getPluginInfo() {
const pluginAbout = await about()
const pluginVersion = await version()
console.log(pluginAbout, pluginVersion)
}
getPluginInfo()
MIT License