Add node modules and compiled JavaScript from main (#54)

Co-authored-by: Oliver King <oking3@uncc.edu>
This commit is contained in:
github-actions[bot]
2022-06-29 15:41:55 -04:00
committed by GitHub
parent 4a983766a0
commit 52d71d28bd
6814 changed files with 2048539 additions and 2 deletions

View File

@ -0,0 +1,8 @@
const oids = require('./oids')
module.exports = function () {
this.seq().obj(
this.key('algorithm').objid(oids),
this.key('parameters').optional().choice({ namedCurve: this.objid(oids), null: this.null_() })
)
}

10
node_modules/jose/lib/help/asn1/ec_private_key.js generated vendored Normal file
View File

@ -0,0 +1,10 @@
const oids = require('./oids')
module.exports = function () {
this.seq().obj(
this.key('version').int(),
this.key('privateKey').octstr(),
this.key('parameters').explicit(0).optional().choice({ namedCurve: this.objid(oids) }),
this.key('publicKey').explicit(1).optional().bitstr()
)
}

29
node_modules/jose/lib/help/asn1/index.js generated vendored Normal file
View File

@ -0,0 +1,29 @@
const asn1 = require('@panva/asn1.js')
const types = new Map()
const AlgorithmIdentifier = asn1.define('AlgorithmIdentifier', require('./algorithm_identifier'))
types.set('AlgorithmIdentifier', AlgorithmIdentifier)
const ECPrivateKey = asn1.define('ECPrivateKey', require('./ec_private_key'))
types.set('ECPrivateKey', ECPrivateKey)
const PrivateKeyInfo = asn1.define('PrivateKeyInfo', require('./private_key_info')(AlgorithmIdentifier))
types.set('PrivateKeyInfo', PrivateKeyInfo)
const PublicKeyInfo = asn1.define('PublicKeyInfo', require('./public_key_info')(AlgorithmIdentifier))
types.set('PublicKeyInfo', PublicKeyInfo)
const PrivateKey = asn1.define('PrivateKey', require('./private_key'))
types.set('PrivateKey', PrivateKey)
const OneAsymmetricKey = asn1.define('OneAsymmetricKey', require('./one_asymmetric_key')(AlgorithmIdentifier, PrivateKey))
types.set('OneAsymmetricKey', OneAsymmetricKey)
const RSAPrivateKey = asn1.define('RSAPrivateKey', require('./rsa_private_key'))
types.set('RSAPrivateKey', RSAPrivateKey)
const RSAPublicKey = asn1.define('RSAPublicKey', require('./rsa_public_key'))
types.set('RSAPublicKey', RSAPublicKey)
module.exports = types

14
node_modules/jose/lib/help/asn1/oids.js generated vendored Normal file
View File

@ -0,0 +1,14 @@
const oids = {
'1 2 840 10045 3 1 7': 'P-256',
'1 3 132 0 10': 'secp256k1',
'1 3 132 0 34': 'P-384',
'1 3 132 0 35': 'P-521',
'1 2 840 10045 2 1': 'ecPublicKey',
'1 2 840 113549 1 1 1': 'rsaEncryption',
'1 3 101 110': 'X25519',
'1 3 101 111': 'X448',
'1 3 101 112': 'Ed25519',
'1 3 101 113': 'Ed448'
}
module.exports = oids

View File

@ -0,0 +1,7 @@
module.exports = (AlgorithmIdentifier, PrivateKey) => function () {
this.seq().obj(
this.key('version').int(),
this.key('algorithm').use(AlgorithmIdentifier),
this.key('privateKey').use(PrivateKey)
)
}

5
node_modules/jose/lib/help/asn1/private_key.js generated vendored Normal file
View File

@ -0,0 +1,5 @@
module.exports = function () {
this.octstr().contains().obj(
this.key('privateKey').octstr()
)
}

7
node_modules/jose/lib/help/asn1/private_key_info.js generated vendored Normal file
View File

@ -0,0 +1,7 @@
module.exports = (AlgorithmIdentifier) => function () {
this.seq().obj(
this.key('version').int(),
this.key('algorithm').use(AlgorithmIdentifier),
this.key('privateKey').octstr()
)
}

6
node_modules/jose/lib/help/asn1/public_key_info.js generated vendored Normal file
View File

@ -0,0 +1,6 @@
module.exports = AlgorithmIdentifier => function () {
this.seq().obj(
this.key('algorithm').use(AlgorithmIdentifier),
this.key('publicKey').bitstr()
)
}

13
node_modules/jose/lib/help/asn1/rsa_private_key.js generated vendored Normal file
View File

@ -0,0 +1,13 @@
module.exports = function () {
this.seq().obj(
this.key('version').int({ 0: 'two-prime', 1: 'multi' }),
this.key('n').int(),
this.key('e').int(),
this.key('d').int(),
this.key('p').int(),
this.key('q').int(),
this.key('dp').int(),
this.key('dq').int(),
this.key('qi').int()
)
}

6
node_modules/jose/lib/help/asn1/rsa_public_key.js generated vendored Normal file
View File

@ -0,0 +1,6 @@
module.exports = function () {
this.seq().obj(
this.key('n').int(),
this.key('e').int()
)
}