Encryption/decryption on linux

Post here any hints or tips you have for using Trunk

Encryption/decryption on linux

Postby linux_notes » Fri Jul 08, 2011 4:04 pm

I have created a small program to encrypt/decrypt trunk notes on linux. It uses the openssl library and should be compiled as:

Code: Select all
g++ -o tn_enc tn_enc.cpp -lssl


The input filename is hardcoded (test.mkd). If the input is encrypted, it will be decrypted. If the input is a plain text Trunk_Note, it will be encrypted.
Warning: The code is very elementary and does not check if the password is correct!
Use at your own risk!

cheers,
-m
Attachments
tn_enc.zip
(1.33 KiB) Downloaded 85 times
linux_notes
 
Posts: 2
Joined: Fri Jul 08, 2011 3:50 pm

Re: Encryption/decryption on linux

Postby linux_notes » Mon Jul 11, 2011 1:56 am

A minor update.
  • Added command line arguments. It is now possible to specify input, output filenames.
  • Can possible to specify name/location of the file Special:Encrypt.markdown
  • The code verifies the entered password before encrypting/decrypting the files

To compile, unzip and run make.
Code: Select all
unzip tv_enc_v0.1.zip
cd tn_enc
make

Usage:
Code: Select all
tn_enc -i <path/to/input.markdown> -o <path/to/encrypted_out.markdown>  -s <path/to/special.markdown>


Disclaimer: Code is still a hack, with minimal error checking. Use at your own risk

cheers,
-m
Attachments
tn_enc_v0.1.zip
(3.02 KiB) Downloaded 102 times
linux_notes
 
Posts: 2
Joined: Fri Jul 08, 2011 3:50 pm


Return to Hints and tips

Who is online

Users browsing this forum: No registered users and 0 guests

cron