Skip to content

Instantly share code, notes, and snippets.

@atmos
Created November 9, 2010 22:35
Show Gist options
  • Select an option

  • Save atmos/669969 to your computer and use it in GitHub Desktop.

Select an option

Save atmos/669969 to your computer and use it in GitHub Desktop.
crypto = require("crypto")
image_url =
"http://demotivational.ca/haters-gonna-hate/wp-content/uploads/2010/08/haters-gonna-hate-kid.jpg"
console.log(image_url)
var cipher = crypto.createCipher("aes192", "0xDEADBEEF")
var encrypted = cipher.update(image_url, 'utf8', 'hex')
encrypted += cipher.final('hex')
console.log(encrypted)
var decipher = crypto.createDecipher('aes192', "0xDEADBEEF")
var txt = decipher.update(encrypted, 'hex', 'utf8')
txt += decipher.final('utf8')
console.log("'" + txt + "'")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment