LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-10-2003, 04:57 AM   #1
secprovider
Member
 
Registered: Jul 2003
Distribution: Debian sarge
Posts: 40

Rep: Reputation: 15
encyrption&decryption


Hallo,

I am using Java APIs for encryption & decryption purposes in an application. After encrypting, I save the encrypted file as object into a file. When I decrypt, I read back this file as object and decrypt.

The problem comes here, after decrypting I get normal data+header. So, I also write ,into the file, header part in addition to the real data. How can remove this header part?

thanx

Last edited by secprovider; 07-10-2003 at 04:59 AM.
 
Old 07-10-2003, 05:32 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
//moderator.note: moved to Programming, not a security issue.
 
Old 07-11-2003, 10:57 PM   #3
gdrobson
Member
 
Registered: Jun 2002
Location: Ontario, Canada
Distribution: RH8.0
Posts: 65

Rep: Reputation: 15
Does the header come at the beginning or the end of the file ???

If so then just put a string that you know the file will not contain before the header is placed.

That is, for example, lets say the header is appended to the end of the file after it is encrypted, before encryption at the end of the file put a string of characters on a new line of the file like "~1~1~1~1~22~~", and then after you decrypt the file do not write anything out after you hit the line of the file that contains "~1~1~1~1~22~~" .
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Hdd decryption, password is known tola555 Linux - Security 8 09-17-2005 02:32 PM
decryption Program ilnli Programming 9 08-04-2004 02:04 AM
passwd decryption in php questioner Programming 5 02-15-2004 10:35 PM
anyone good with decryption watashiwaotaku7 General 12 11-30-2003 01:42 AM
DVD Decryption Problems beforewisdom Linux - Software 2 05-19-2003 01:01 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration