diff --git a/assets/fonts/RHD/RedHatDisplay.ttf b/assets/fonts/RHD/RedHatDisplay.ttf new file mode 100644 index 0000000..84abb78 Binary files /dev/null and b/assets/fonts/RHD/RedHatDisplay.ttf differ diff --git a/assets/fonts/RHT/RedHatText.ttf b/assets/fonts/RHT/RedHatText.ttf new file mode 100644 index 0000000..3b31882 Binary files /dev/null and b/assets/fonts/RHT/RedHatText.ttf differ diff --git a/assets/print.css b/assets/print.css index b326180..5622832 100644 --- a/assets/print.css +++ b/assets/print.css @@ -7,9 +7,25 @@ footer, @font-face { font-family: "Lexend"; font-weight: regular; - src: url("./Lexend/Lexend.ttf"); + src: url("/assets/fonts/Lexend/Lexend.ttf"); +} + +@font-face { + font-family: "RedHatDisplay"; + font-weight: regular; + src: url("/assets/fonts/RHD/RedHatDisplay.ttf"); +} + +@font-face { + font-family: "RedHatText"; + font-weight: regular; + src: url("/assets/fonts/RHT/RedHatText.ttf"); } html { - font-family: "Lexend"; + font-family: "RedHatText"; +} + +h1, h2, h3, h4, h5, h6 { + font-family: "RedHatDisplay"; } \ No newline at end of file diff --git a/index.js b/index.js index 69500a3..e245076 100644 --- a/index.js +++ b/index.js @@ -488,19 +488,21 @@ app.get('/updates', async (req, res) => { }); }); -// const enc_key = Buffer.from(process.env.RESUME_ENCRYPTION_KEY, "hex"); +if (process.env.NODE_ENV === "development") { + const enc_key = Buffer.from(process.env.RESUME_ENCRYPTION_KEY, "hex"); -// app.get('/resumeEnc', async (req, res) => { -// const iv = crypto.randomBytes(16); -// const cipher = crypto.createCipheriv( -// "aes-256-cbc", enc_key, iv -// ); + app.get('/resumeEnc', async (req, res) => { + const iv = crypto.randomBytes(16); + const cipher = crypto.createCipheriv( + "aes-256-cbc", enc_key, iv + ); -// let encrypted = cipher.update(req.query.text, 'utf8', 'hex'); -// encrypted += cipher.final('hex'); + let encrypted = cipher.update(req.query.text, 'utf8', 'hex'); + encrypted += cipher.final('hex'); -// res.send(encrypted + "\n" + iv.toString('hex')); -// }); + res.header("Content-type", "text/plain").send(encrypted + "\n" + iv.toString('hex')); + }); +} function decipher(file, key) { let hexKey;