Click here to Skip to main content
16,007,885 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
We are already upload the all type of document in folder,but now we want to encrypt the file while storing and decrypt while download.

What I have tried:

I already store the file in folder but i dont know to store encrypted format
Posted
Updated 27-Dec-19 0:24am

1 solution

 
Share this answer
 
Comments
Jayamanickam 27-Dec-19 8:04am    
RijndaelManaged is which method of encryption.. its AES or DES. What type of byte used??
MadMyche 27-Dec-19 8:20am    
You could always read the documentation to better understand the class and how it relates
This algorithm supports key lengths of 128, 192, or 256 bits; defaulting to 256 bits. This algorithm supports block sizes of 128, 192, or 256 bits; defaulting to 128 bits (Aes-compatible).

The Rijndael class is the predecessor of the Aes algorithm. You should use the Aes algorithm instead of Rijndael. For more information, see the entry The Differences Between Rijndael and AES in the .NET Security blog.


https://docs.microsoft.com/en-us/dotnet/api/system.security.cryptography.rijndael?view=netframework-4.8#remarks
OriginalGriff 27-Dec-19 8:21am    
a byte is a bytem, is a byte: it's a defined size of memory which consists of eight bits, and can thus hold values between 0 and 255 inclusive. There is no "what type of byte" involved!
Jayamanickam 31-Dec-19 4:44am    
I tried in google as per your guide, i got the solution. but i have facing another issue is, its only support .txt file only, but i need all type of document such as .xls,.xlsx and more importent PDF file format.
OriginalGriff 31-Dec-19 4:57am    
No, encryption doesn't care what is in the file - it's just a stream of bytes regardless of being TXT, XLS, XLSX, DOCX, DBF, or EXE.
All the encryption method gets is a stream of binary data and a key of some sort - it doesn't know or care what the bytes contain!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900