Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add note on xplat support for Encrypt/Decrypt on .NET Core #2259

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Apr 9, 2019

Conversation

SeanKilleen
Copy link
Contributor

Summary

Adds a brief explanation on cross-platform support in .NET Core to File.Encrypt and File.Decrypt.

While it seemed the documentation on support for using Encrypt/Decrypt was clear around requiring at least windows NT, NTFS drive etc. it was not as clear around cross-platform support within .NET Core. This explicitly calls that out, along with a brief explanation.

Fixes #964

@SeanKilleen SeanKilleen mentioned this pull request Apr 5, 2019
@SeanKilleen
Copy link
Contributor Author

It might make sense to use the [!NOTE] syntax here. If so, let me know and I'll adjust accordingly. 👍

@rpetrusha rpetrusha added the ✨ 1st-time dotnet-api-docs contributor! Indicates PRs from new contributors to the dotnet-api-docs repository label Apr 5, 2019
@rpetrusha rpetrusha added this to the April 2019 milestone Apr 5, 2019
@rpetrusha
Copy link

@JeremyKuhne, could you take a look at this PR, please?

Copy link

@rpetrusha rpetrusha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @SeanKilleen, for contributing to the dotnet/dotnet-api-docs repo and enhancing the documentation for these two methods. I've suggested several changes. Also, I agree that a note would be the best format for presenting this information; it can be placed between the first and second paragraph of the Remarks section.

Copy link
Member

@JeremyKuhne JeremyKuhne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me modulo @rpetrusha's comments

Ron Petrusha and others added 5 commits April 5, 2019 14:48
@rpetrusha feedback on language 👍

Co-Authored-By: SeanKilleen <[email protected]>
@rpetrusha feedback on language 👍

Co-Authored-By: SeanKilleen <[email protected]>
@rpetrusha feedback on language 👍

Co-Authored-By: SeanKilleen <[email protected]>
@rpetrusha feedback on language 👍

Co-Authored-By: SeanKilleen <[email protected]>
@SeanKilleen
Copy link
Contributor Author

SeanKilleen commented Apr 5, 2019

✅ Comments incorporated
✅ Changed the format to use [!NOTE] following conventions I saw elsewhere in the docs.

@rpetrusha I think this is ready to go assuming you agree with the implementation of the note style. 👍

@rpetrusha
Copy link

Thanks for making the changes, @SeanKilleen. We generally don't include headings in notes, though, since the note itself stands out clearly. I've suggested that you remove it, but also changed the note style to IMPORTANT to make it stand out a bit more.

@SeanKilleen
Copy link
Contributor Author

@rpetrusha I originally copied the note styling from elsewhere in the docs so I assumed it was consistent, but maybe that's not the case -- no worries 👍

I think I've made the changes you requested (removed the bold formatting and replaced [!NOTE] with [!IMPORTANT] in both instances. Let me know if this isn't what you meant and I'll be happy to do whatever's needed to get it ready to go.

@rpetrusha
Copy link

Thanks for making these changes, @SeanKilleen. I think that two additional improvements to the note would be helpful:

  • Remove the text "A Note on .NET Core Cross-Platform Support". The note applies to both .NET Framework and .NET Core.
  • Add a blank line between "...situation"." and "Use of this API in .NET Core..." to make the .NET Core guidance stand out more clearly.

@SeanKilleen
Copy link
Contributor Author

@rpetrusha I believe I've made the changes as you've requested. 👍 let me know if you have further feedback.

@SeanKilleen
Copy link
Contributor Author

(FYI, given the build error, OpenPublishing.Build does not seem to have failed based on my changes alone as far as I can tell).

@mairaw mairaw closed this Apr 9, 2019
@mairaw mairaw reopened this Apr 9, 2019
@mairaw
Copy link
Contributor

mairaw commented Apr 9, 2019

No @SeanKilleen. Our engineering team deployed a fix to this issue today. I've kicked off a new build.

@BillWagner BillWagner added the changes-addressed Indicates PRs that had all comments addressed and are awaiting for new review label Apr 9, 2019
Copy link

@rpetrusha rpetrusha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making these additional changes, @SeanKilleen. Your changes look good, and the build is now successful, so I'll merge your PR. The new content should be live on docs.microsoft.com in the next day or two.



> [!NOTE]
> **A Note on .NET Core Cross-Platform Support:** This API is only supported on Windows platforms that are able to use the NTFS Encrypting File System (EFS). Any attempt to use this on non-Windows systems, Windows Home Edition systems, or non-NTFS drives results in a <xref:System.PlatformNotSupportedException> or <xref:System.NotSupportedException>, depending on the situation.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> **A Note on .NET Core Cross-Platform Support:** This API is only supported on Windows platforms that are able to use the NTFS Encrypting File System (EFS). Any attempt to use this on non-Windows systems, Windows Home Edition systems, or non-NTFS drives results in a <xref:System.PlatformNotSupportedException> or <xref:System.NotSupportedException>, depending on the situation.
> This API is only supported on Windows platforms that are able to use the NTFS Encrypting File System (EFS). Any attempt to use this on non-Windows systems, Windows Home Edition systems, or non-NTFS drives results in a <xref:System.PlatformNotSupportedException> or <xref:System.NotSupportedException>, depending on the situation.



> [!NOTE]
> **A Note on .NET Core Cross-Platform Support:** This API is only supported on Windows platforms that are able to use the NTFS Encrypting File System (EFS). Any attempt to use this on non-Windows systems, Windows Home Edition systems, or non-NTFS drives results in a <xref:System.PlatformNotSupportedException> or <xref:System.NotSupportedException>, depending on the situation.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> **A Note on .NET Core Cross-Platform Support:** This API is only supported on Windows platforms that are able to use the NTFS Encrypting File System (EFS). Any attempt to use this on non-Windows systems, Windows Home Edition systems, or non-NTFS drives results in a <xref:System.PlatformNotSupportedException> or <xref:System.NotSupportedException>, depending on the situation.
> This API is only supported on Windows platforms that are able to use the NTFS Encrypting File System (EFS). Any attempt to use this on non-Windows systems, Windows Home Edition systems, or non-NTFS drives results in a <xref:System.PlatformNotSupportedException> or <xref:System.NotSupportedException>, depending on the situation.

## Remarks
The <xref:System.IO.File.Encrypt%2A> method allows you to encrypt a file so that only the account used to call this method can decrypt it. Use the <xref:System.IO.File.Decrypt%2A> method to decrypt a file encrypted by the <xref:System.IO.File.Encrypt%2A> method.


> [!NOTE]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> [!NOTE]
> [!IMPORTANT]

@@ -1332,15 +1332,17 @@

## Remarks
The <xref:System.IO.File.Decrypt%2A> method allows you to decrypt a file that was encrypted using the <xref:System.IO.File.Encrypt%2A> method. The <xref:System.IO.File.Decrypt%2A> method can decrypt only files that were encrypted using the current user account.


> [!NOTE]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> [!NOTE]
> [!IMPORTANT]

@rpetrusha rpetrusha merged commit c55b0f5 into dotnet:master Apr 9, 2019
@mairaw mairaw removed the changes-addressed Indicates PRs that had all comments addressed and are awaiting for new review label Jun 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ 1st-time dotnet-api-docs contributor! Indicates PRs from new contributors to the dotnet-api-docs repository
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hardly helpful
5 participants