1.0.0 • Published 3 years ago
image-encryption v1.0.0
Encrpyt Images
Create a typescript npm package in less than a minute
Install
npm install image-encryption
Usage
import { encrypt, decrypt } from 'image-encryption';
import fs from 'fs';
import path from 'path';
const key = 'My secret key';
const image = fs.readFileSync(path.join(__dirname, 'image.png'));
const encryptedBuffer = encrypt(image, key);
const decryptedImage = decrypt(encryptedBuffer, key);
1.0.0
3 years ago