views:

53

answers:

5

Actually I have a file . I am working in linux environment. I need to encrypt that file for secure purpose with giving the some password. The operation could be like zip , tar any compression. When I extract the file It should ask me password , only then it should get extracted

Thanks in Advance

A: 

Did you try vi -x filename ? It is not exactly full-featured encryption, but it might do what you want.

MJB
Yea , I used but it corrupts data's when we are giving the wrong password
pavun_cool
Yes, it does, but only if you save it when you get the "corrupt" data. I believe that vi is not a good choice for you, given that you accepted gpg above. But it was the simplest, and that was my intent.
MJB
+5  A: 

gpg --symmetric and gpg --decrypt should do what you want.

legoscia
+2  A: 

I would use GPG.

Or, you can use any zip library that supports AES...

John Gietzen
+3  A: 

Simple, use openssl.

openssl enc -aes-256-cbc -salt -in plain.txt -out myultrasecretfile.enc

If you want to compress before, that is your choice.

Shyam
A: 

i like aespipe as you can use it completely non-interactively from command line or scripts, and it will work with any stream of data.

Marcin