-
August 6th, 2002, 05:50 PM
#1
Junior Member
cryptography
How can encrypt document(Ms-Word) or other files except ascii text files using VC++?If we have the ascii value we could manipulate files but how can we do for a word document? I tried with my own alg. but i couldn't open even the plain text in word document?
Could anyone give me a clue of how i can do it?
Chokks
-
August 7th, 2002, 04:49 PM
#2
Junior Member
Im not sure how you could get a word file to work...
You could always just save as ASCII with line break, even if you're in Word. However, there is probably a way to do it for regular Word files. I'll try to figure it out.
-
August 12th, 2002, 07:01 PM
#3
Junior Member
Thanks for your reply.I could get out ASCII for word files if saved in ascii format but for non-ascii files how can we encrypt.If you come across any idea or logic of doing share with me.
Chokks.
-
August 12th, 2002, 07:13 PM
#4
Senior Member
If you're simply making your own algorythm in c++, open the file in a binary mode, take the integer value of each character when you read them in 1 at a time, then do your work on the data. the file itself will be complete giberish and won't open with formatting in word if you encrypt the file as a whole, not just the text inside it, it will open as an ascii text file and just display everything in it. But most encryption programs don't intend to make the file exactly the same as the original, unless you have the method to decrypt it then you shouldn't be worrying about it anyways.
Reality is the one who has it wrong, not you
-
August 12th, 2002, 07:24 PM
#5
I suggest you take a look at Microsoft's CryptoAPI:
http://discuss.microsoft.com/archives/cryptoapi.html
Google has some additional links, but you'll find using a Cryptographic Service Provider is much easier than programming your own cryptography methods and functions (I know, I had to do RSA encryption for my Data Structures and Algorithms class).
Regards,
Wizeman
\"It\'s only arrogrance if you can\'t back it up, otherwise it is confidence.\" - Me
-
August 13th, 2002, 12:33 AM
#6
Using PGP or Blowfish there are both standalone and DLL versions that will encrypt binary or ACSII files. Using any search engine should get you what you need.
Work... Some days it's just not worth chewing through the restraints...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|