I didn’t find any example on google… Can anyone show how it works? And when folders and files will be encrypted how to decrypt them?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The
FileAttributes.Encryptedflag tells you whether a file or folder has been encrypted by the NTFS file system. This option is available to users by right-clicking a file, selecting Properties, then clicking the Advanced button. There is an option “Encrypt contents to secure data” which is what theFileAttributes.Encryptedflag corresponds to.You can use the
File.Encrypt/File.Decryptmethods to encrypt or decrypt a file or folder. Note that you can only decrypt something that was encrypted by the current user.You can use the
System.IO.File.GetAttributesmethod to get theFileAttributesfrom a file.