Cryptonite


API

Cryptonite is pretty RESTful, so you can use it as an API

Text File API

Text

  • Encrypt:
    curl -X POST -H "Content-Type: application/json" -d '{password:"secret",text:"Hi Mum."}' \
    						https://cryptonite.herokuapp.com/text/encrypt
  • Decrypt:
    curl -X POST -H "Content-Type: application/json" -d '{password:"secret",text:"oNA7zZFJESPdGoylBqhFuH+As5u6x2eGEJO6xMYzanModspgLadf"}' \
    						https://cryptonite.herokuapp.com/text/decrypt

File

  • Encrypt:
    curl -X POST -F 'password=secret' -F 'file=@/home/david/Pictures/LolCat.jpg' \
    						http://localhost:8080/file/encrypt > /home/david/Pictures/LolCat.jpg.enc
  • Decrypt:
    curl -X POST -F 'password=secret' -F 'file=@/home/david/Pictures/LolCat.jpg.enc' \
    						http://localhost:8080/file/decrypt > /home/david/Pictures/LolCat.decrypted.jpg