Create Method (String, PublishLicense, CryptoProvider)
Collapse the table of content
Expand the table of content

EncryptedPackageEnvelope.Create Method (String, PublishLicense, CryptoProvider)


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

Namespace:   System.IO.Packaging
Assembly:  WindowsBase (in WindowsBase.dll)

public static EncryptedPackageEnvelope Create(
	string envelopeFileName,
	PublishLicense publishLicense,
	CryptoProvider cryptoProvider


Type: System.String

The name of the OLE compound file.

Type: System.Security.RightsManagement.PublishLicense

The publish license that is embedded in the compound file.

Type: System.Security.RightsManagement.CryptoProvider

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

Exception Condition

envelopeFileName is null.

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

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

.NET Framework
Available since 3.0
Return to top
© 2016 Microsoft