kjur / jsrsasign

The 'jsrsasign' (RSA-Sign JavaScript Library) is an opensource free cryptography library supporting RSA/RSAPSS/ECDSA/DSA signing/validation, ASN.1, PKCS#1/5/8 private/public key, X.509 certificate, CRL, OCSP, CMS SignedData, TimeStamp, CAdES and JSON Web Signature/Token in pure JavaScript.
https://kjur.github.io/jsrsasign
Other
3.25k stars 645 forks source link

Sign JWS Method does not accept key #551

Closed andreisaikouski closed 2 years ago

andreisaikouski commented 2 years ago

As per documentation, JWS.sign method should accept a key

KJUR.jws.JWS.sign(alg, spHead, spPayload, key, pass)

The code does not support this (from jsrsasign>modules>KJUR>jws>JWS.d.ts)

function sign(
     alg: string | null,
     spHead: string | { alg: string },
     spPayload: string | object,
     pass?: string | { [type: string]: string },
): string;

Version "jsrsasign": "^10.5.20"

kjur commented 2 years ago

Sorry but I'm not "JWS.d.ts" TypeScript type definition file maintainer. Please ask him for it.