-
-
Notifications
You must be signed in to change notification settings - Fork 311
/
index.js
79 lines (71 loc) · 3.87 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
const { readFileSync } = require('fs')
const { join } = require('path')
module.exports.JWK = {
RSA_PUBLIC: {
kty: 'RSA',
e: 'AQAB',
n: 'wIs03tSBrzj_6nU0uj6AFOmOVljdYORu3AX0kiDamgQmGDRYTGnjWNbePRWMkAFTAp-kpH71WeSV9n3y0MpDuwJqrmiPr7Wy1A_iUhw1X2bZU2MjwNref-i42V8nbPeshm48HzXD-ZRuLVgrn10VuQxRBnbGrOWA7tgfgb9JyDL1ae4dZdJw7Uz87FiVxR71twH1AibIhonEHnmbZqIdqQhpoP1PSPKkQRHPHZWQMXLm9kYbCbsIc36RfbpEe5ybnvBM2xxZKT1DrEQx5ykGwmVe_KzSePSDsdr7hQV5OrM0tftlNLDbxLfy2MtplzdEtLPms8Ma8bO_gvutt2-97w'
},
RSA_PRIVATE: {
kty: 'RSA',
e: 'AQAB',
n: 'wIs03tSBrzj_6nU0uj6AFOmOVljdYORu3AX0kiDamgQmGDRYTGnjWNbePRWMkAFTAp-kpH71WeSV9n3y0MpDuwJqrmiPr7Wy1A_iUhw1X2bZU2MjwNref-i42V8nbPeshm48HzXD-ZRuLVgrn10VuQxRBnbGrOWA7tgfgb9JyDL1ae4dZdJw7Uz87FiVxR71twH1AibIhonEHnmbZqIdqQhpoP1PSPKkQRHPHZWQMXLm9kYbCbsIc36RfbpEe5ybnvBM2xxZKT1DrEQx5ykGwmVe_KzSePSDsdr7hQV5OrM0tftlNLDbxLfy2MtplzdEtLPms8Ma8bO_gvutt2-97w',
d: 'fxbjjPmDqB7dfOpkJVK_xA3tb700UpI1QnGD3zhkUijO5E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MX-TVSt6r03lLbK9gthslPRPdp68wmH-By0mfw66JtuSKOAHdHWotFOwYvkkE76O4-eY78pTE9oEzu-lu309NSPSpADd58DIRYMqwuFhbLa35Yrw3TxU'
},
'P-256': {
kty: 'EC',
crv: 'P-256',
x: 'gskvlmd8hChm_hxtH4oyDC2rizV1jwK4exTn3icBxu8',
y: '0El8NqTyybjkEJ2grVUDK1BdPo49OF1pmCJCD92_h-Y',
d: '_i_1Ac5oVmbBxGvEvOEFHMpzMXKZi8voUx8I3Gl6IxY'
},
'P-256K': {
kty: 'EC',
crv: 'P-256',
x: 'VRaLqtMjg_JRaDzkbfit7zonkOGDZ42qbZyljhqsg3U',
y: '5qgTxoRAf0hJxcphVg1NE9r0Xv-HHZyVIJxEbo6SAsQ',
d: 'xTAmXNRL8ksBlr-F3yXDrUdRDn1gyIvY_PC2e_iUK7c'
},
'P-384': {
kty: 'EC',
crv: 'P-384',
x: 'sOilTs4JMAaXio-fG2rVdLpt7Zoxn3fqWSI58DlwxpS8dgbYI2WLh_OymYy3GZtl',
y: '23aUE5XAxfr3Ok-nDymgYb1X3TI0dRq1V1Oj0ngItP5ot2tIcL-hnD4kyabg97Ya',
d: 'cLNsZ0Nm7MsuVsqTCwK_edo982LoVU4sFGZZaEdX8Xvytn8Cdm2HszNVkS3FOl_7'
},
'P-521': {
kty: 'EC',
crv: 'P-521',
x: 'AJRHTTRwIoGp7WDE90vsBKIyWbVaESCxEXy-s29X68dpguSra_u1Mhter7b_7kTgb6dX2lXX5wrZSJOJ1gcflXQM',
y: 'ANW_hbEvDSm-q-NLVEkKR1m2Qfvy6Kp5YnbQ7E_yfupjeZCII81rb55WBAFd4fG5-tcRJtil67E0GH_l6RXZj5Ie',
d: 'AcrcrbQ-Fu2d2jlxQM0_nSVXM5Kt7mByIxsbgJUe_wgb4DrwVWBC1OJe2ONr0Ovcd_4ydDgWlbIJJhzS3tL9KM0S'
}
}
module.exports.RSA_512 = readFileSync(join(__dirname, 'rsa_512.pem'))
module.exports.PEM = {
RSA: {
private: readFileSync(join(__dirname, 'rsa.key')),
public: readFileSync(join(__dirname, 'rsa.pem'))
},
'P-256': {
private: readFileSync(join(__dirname, 'P-256.key')),
public: readFileSync(join(__dirname, 'P-256.pem'))
},
'P-256K': {
private: readFileSync(join(__dirname, 'P-256K.key')),
public: readFileSync(join(__dirname, 'P-256K.pem'))
},
'P-384': {
private: readFileSync(join(__dirname, 'P-384.key')),
public: readFileSync(join(__dirname, 'P-384.pem'))
},
'P-521': {
private: readFileSync(join(__dirname, 'P-521.key')),
public: readFileSync(join(__dirname, 'P-521.pem'))
}
}