
Research
wget to Wipeout: Malicious Go Modules Fetch Destructive Payload
Socket's research uncovers three dangerous Go modules that contain obfuscated disk-wiping malware, threatening complete data loss.
encrypt-image
Advanced tools
Import the library
import { image } from "encrypt-image";
Generate keys using generateKeys() function and it will return public key , private key and symmetric key.
const keys = image.generateKeys();
use encrypt() function and pass the image , public key and symmetric key.
const encryptedImage = image.encrypt(image, keys.publicKey, keys.symmetricKey);
use decrypt function to get the original image , in this function just pass private key (keys.privateKey)
const encryptedData = fs.readFileSync('encrypted.bin');
const decryptedImage = image.decrypt(encryptedData,keys.privateKey);
can store decrypted image file using writeFileSync Function
fs.writeFileSync('decrepted.jpg',decryptedImage);
import { image } from "encrypt-image";
import fs from 'fs'
const keys = image.generateKeys();
const img = fs.readFileSync('image.jpg')
const encryptImage = image.encrypt(img, keys.publicKey, keys.symmetricKey);
const decryptedImage = image.decrypt(encryptedData,keys.privateKey);
fs.writeFileSync('dec.jpg',decryptedImage);
import { text } from "encrypt-image";
const Keys = text.generateKeys();
const plaintext = "Hi this Encryption";
const encryptedText = text.encrypt(plaintext, Keys.publicKey);
console.log(encryptedText);
const decryptedText = text.decrypt(encryptedText,Keys.privateKey);
console.log(decryptedText);
FAQs
encrypt and decrypt images using secret keys and public, private keys
The npm package encrypt-image receives a total of 3 weekly downloads. As such, encrypt-image popularity was classified as not popular.
We found that encrypt-image demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Socket's research uncovers three dangerous Go modules that contain obfuscated disk-wiping malware, threatening complete data loss.
Research
Socket uncovers malicious packages on PyPI using Gmail's SMTP protocol for command and control (C2) to exfiltrate data and execute commands.
Product
We redesigned Socket's first logged-in page to display rich and insightful visualizations about your repositories protected against supply chain threats.