Bewerken

Delen via


EncryptedPackageEnvelope.Create Method

Definition

Creates and returns an EncryptedPackageEnvelope.

Overloads

Create(Stream, PublishLicense, CryptoProvider)

Creates and returns an EncryptedPackageEnvelope on the specified stream.

Create(String, PublishLicense, CryptoProvider)

Creates and returns an EncryptedPackageEnvelope and gives it the specified file name.

Create(Stream, PublishLicense, CryptoProvider)

Creates and returns an EncryptedPackageEnvelope on the specified stream.

public:
 static System::IO::Packaging::EncryptedPackageEnvelope ^ Create(System::IO::Stream ^ envelopeStream, System::Security::RightsManagement::PublishLicense ^ publishLicense, System::Security::RightsManagement::CryptoProvider ^ cryptoProvider);
public static System.IO.Packaging.EncryptedPackageEnvelope Create (System.IO.Stream envelopeStream, System.Security.RightsManagement.PublishLicense publishLicense, System.Security.RightsManagement.CryptoProvider cryptoProvider);
static member Create : System.IO.Stream * System.Security.RightsManagement.PublishLicense * System.Security.RightsManagement.CryptoProvider -> System.IO.Packaging.EncryptedPackageEnvelope
Public Shared Function Create (envelopeStream As Stream, publishLicense As PublishLicense, cryptoProvider As CryptoProvider) As EncryptedPackageEnvelope

Parameters

envelopeStream
Stream

The stream on which to create the file.

publishLicense
PublishLicense

The publish license that is embedded in the compound file.

cryptoProvider
CryptoProvider

An object that determines what operations the current user is allowed to perform on the encrypted content.

Returns

The newly created EncryptedPackageEnvelope.

Exceptions

envelopeStream is null.

envelopeStream does not provide read/write access.

Remarks

The current user has read/write access to the new file.

See also

Applies to

Create(String, PublishLicense, CryptoProvider)

Creates and returns an EncryptedPackageEnvelope and gives it the specified file name.

public:
 static System::IO::Packaging::EncryptedPackageEnvelope ^ Create(System::String ^ envelopeFileName, System::Security::RightsManagement::PublishLicense ^ publishLicense, System::Security::RightsManagement::CryptoProvider ^ cryptoProvider);
public static System.IO.Packaging.EncryptedPackageEnvelope Create (string envelopeFileName, System.Security.RightsManagement.PublishLicense publishLicense, System.Security.RightsManagement.CryptoProvider cryptoProvider);
static member Create : string * System.Security.RightsManagement.PublishLicense * System.Security.RightsManagement.CryptoProvider -> System.IO.Packaging.EncryptedPackageEnvelope
Public Shared Function Create (envelopeFileName As String, publishLicense As PublishLicense, cryptoProvider As CryptoProvider) As EncryptedPackageEnvelope

Parameters

envelopeFileName
String

The name of the OLE compound file.

publishLicense
PublishLicense

The publish license that is embedded in the compound file.

cryptoProvider
CryptoProvider

An object that determines what operations the current user is allowed to perform on the encrypted content.

Returns

The newly created EncryptedPackageEnvelope.

Exceptions

envelopeFileName is null.

Remarks

If a file with the specified name already exists, it is overwritten.

The current user has read/write access to the file.

See also

Applies to