You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// review: where are these bytes from, what's the exact meaning of themexportconstPKCS8_DIVIDER=newUint8Array([161,35,3,33,0]);// review: sameexportconstPKCS8_HEADER=newUint8Array([48,83,2,1,1,48,5,6,3,43,101,112,4,34,4,32]);
the header and divider here seems not following the private key information syntax defined in RFC5208-section-5
PrivateKeyInfo ::= SEQUENCE {
version Version,
privateKeyAlgorithm PrivateKeyAlgorithmIdentifier,
privateKey PrivateKey,
attributes [0] IMPLICIT Attributes OPTIONAL }
Version ::= INTEGER
PrivateKeyAlgorithmIdentifier ::= AlgorithmIdentifier
PrivateKey ::= OCTET STRING
Attributes ::= SET OF Attribute
both encode and decode methods are using these constants without any description, no tests provided, just hardcode bytes level checks
Closed in #1910 - be aware that these constants should not be relied upon, only the exposed interfaces for decode/encode, it is bound to change.
(There are still a large number of files which have not been commented, in this repo and others - especially on types, it is a "ahh, this needs work and I'm here" effort)
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue if you think you have a related problem or query.
Documentation requests
common/packages/keyring/src/pair/defaults.ts
Lines 4 to 5 in 6971012
the header and divider here seems not following the private key information syntax defined in RFC5208-section-5
both encode and decode methods are using these constants without any description, no tests provided, just hardcode bytes level checks
common/packages/keyring/src/pair/encode.ts
Lines 16 to 21 in 6971012
common/packages/keyring/src/pair/decode.ts
Lines 25 to 27 in 6971012
The text was updated successfully, but these errors were encountered: