1.0.0 • Published 3 years ago

image-encryption v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

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);