PeculiarVentures / PKI.js

PKI.js is a pure JavaScript library implementing the formats that are used in PKI applications (signing, encryption, certificate requests, OCSP and TSP requests/responses). It is built on WebCrypto (Web Cryptography API) and requires no plug-ins.
http://pkijs.org
Other
1.25k stars 204 forks source link

Property 'parseInternalValues' is protected and only accessible within class 'PKCS8ShroudedKeyBag' and its subclasses.ts(2445) #399

Open pboguslawski opened 3 months ago

pboguslawski commented 3 months ago

Using parseInternalValues for PKCS #8 key decryption makes TS angry:

Property 'parseInternalValues' is protected and only accessible within class 'PKCS8ShroudedKeyBag' and its subclasses.ts(2445)

Shouldn't be public like makeInternalValues is to officially allow encryption/decryption using PKCS8ShroudedKeyBag class methods?

amphineko commented 1 week ago

I'm curious on your use case.

Can you derive PKCS8ShroudedKeyBag, and call parseInternalValues with a new member function in the derived class?