0

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

Pavunkumar
  • 5,147
  • 14
  • 43
  • 69

5 Answers5

5

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

legoscia
  • 39,593
  • 22
  • 116
  • 167
4

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
  • 2,357
  • 8
  • 32
  • 44
2

I would use GPG.

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

John Gietzen
  • 48,783
  • 32
  • 145
  • 190
0

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

MJB
  • 7,639
  • 2
  • 31
  • 41
  • Yea , I used but it corrupts data's when we are giving the wrong password – Pavunkumar Apr 07 '10 at 12:33
  • 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 Apr 07 '10 at 12:47
0

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
  • 3,437
  • 1
  • 22
  • 15