image-encryption
v1.0.0
Published
Encrypt images with a personal token
Downloads
2
Readme
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);