added example salt/iv api

This commit is contained in:
2024-06-02 18:40:08 -04:00
parent 0e243efc82
commit b4721c1214
2 changed files with 34 additions and 4 deletions
+3 -1
View File
@@ -1,7 +1,7 @@
import fs, { read } from 'fs';
import express from 'express';
import cors from 'cors';
import { encrypt, decrypt } from './enc.js';
import { encrypt, decrypt, encryptInitEnc } from './enc.js';
import bodyParser from 'body-parser';
import multer from 'multer';
import stream from 'stream';
@@ -49,4 +49,6 @@ app.post('/decrypt', upload.single('file'), (req, res) => {
});
app.post('/getsaltandiv', (_, res) => res.send(encryptInitEnc("I'M ENCRYPTED!", 'password')))
app.listen(PORT, () => console.log(`app listening on port ${PORT}`));