Share via


DataProtectionProvider.ProtectStreamAsync(IInputStream, IOutputStream) Method

Definition

Asynchronously protects a data stream.

public:
 virtual IAsyncAction ^ ProtectStreamAsync(IInputStream ^ src, IOutputStream ^ dest) = ProtectStreamAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncAction ProtectStreamAsync(IInputStream const& src, IOutputStream const& dest);
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncAction ProtectStreamAsync(IInputStream src, IOutputStream dest);
function protectStreamAsync(src, dest)
Public Function ProtectStreamAsync (src As IInputStream, dest As IOutputStream) As IAsyncAction

Parameters

src
IInputStream

Stream to be protected.

dest
IOutputStream

Protected stream.

Returns

Represents an asynchronous action.

Attributes

Remarks

You must call the DataProtectionProvider(String) constructor before calling this method.

For security descriptors and SDDL strings, you must set the enterprise authentication capability in the manifest. The enterprise authentication capability is restricted to UWP app built with company accounts, and is subject to additional onboarding validation. You should avoid the enterprise authentication capability unless it is absolutely necessary. For more information, see Registering for a developer account. For example, the following SID and SDDL providers require the enterprise authentication capability:

  • "SID=S-1-5-21-4392301 AND SID=S-1-5-21-3101812"
  • "SDDL=O:S-1-5-5-0-290724G:SYD:(A;;CCDC;;;S-1-5-5-0-290724)(A;;DC;;;WD)"

These providers do not require the enterprise authentication capability:

  • "LOCAL=user"
  • "LOCAL=machine"
  • "WEBCREDENTIALS=MyPasswordName"
  • "WEBCREDENTIALS=MyPasswordName,myweb.com"

Applies to