Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@types/jsrsasign
Advanced tools
TypeScript definitions for jsrsasign
The @types/jsrsasign package provides TypeScript type definitions for the jsrsasign library, which is a comprehensive library for cryptographic operations, including RSA, ECDSA, and DSA key generation, digital signatures, and X.509 certificate handling.
RSA Key Generation
Generates an RSA key pair with a key size of 2048 bits.
const rsaKeypair = KEYUTIL.generateKeypair('RSA', 2048);
Digital Signature Creation
Creates a digital signature for a given message using SHA256 with RSA.
const sig = new KJUR.crypto.Signature({alg: 'SHA256withRSA'});
sig.init(rsaKeypair.prvKeyObj);
sig.updateString('message');
const signature = sig.sign();
X.509 Certificate Handling
Reads an X.509 certificate in PEM format and extracts the subject string.
const certPEM = '-----BEGIN CERTIFICATE-----...-----END CERTIFICATE-----';
const x509 = new X509();
x509.readCertPEM(certPEM);
const subject = x509.getSubjectString();
node-forge is a native implementation of TLS (and various other cryptographic tools) in JavaScript. It provides similar functionalities to jsrsasign, such as key generation, digital signatures, and certificate handling, but is often considered more modern and actively maintained.
crypto-js is a library of cryptographic algorithms implemented in JavaScript. While it focuses more on hashing and encryption algorithms, it can be used for some of the same purposes as jsrsasign, such as creating digital signatures.
pkijs is a library for Public Key Infrastructure (PKI) in JavaScript. It provides tools for working with X.509 certificates, CRLs, and OCSP, similar to jsrsasign, but is built on top of WebCrypto API for better performance and security.
npm install --save @types/jsrsasign
This package contains type definitions for jsrsasign (https://github.com/kjur/jsrsasign).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jsrsasign.
These definitions were written by Florian Imdahl.
FAQs
TypeScript definitions for jsrsasign
The npm package @types/jsrsasign receives a total of 155,665 weekly downloads. As such, @types/jsrsasign popularity was classified as popular.
We found that @types/jsrsasign demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.