Skip to content

Instantly share code, notes, and snippets.

View GeoffreyHervet's full-sized avatar
🐢
Focusing

Geoffrey Hervet GeoffreyHervet

🐢
Focusing
View GitHub Profile
const crypto = require('crypto');
const fs = require('fs');
const path = require('path');
const zlib = require('zlib');
const AppendInitVect = require('./appendInitVect');
const getCipherKey = require('./getCipherKey');
function encrypt({ file, password }) {
// Generate a secure, pseudo random initialization vector.