EncryptedPackageEnvelope.Create 方法

定义

创建并返回 EncryptedPackageEnvelope

重载

Create(Stream, PublishLicense, CryptoProvider)

在指定的流上创建并返回 EncryptedPackageEnvelope

Create(String, PublishLicense, CryptoProvider)

创建并返回 EncryptedPackageEnvelope,然后为其提供指定的文件名。

Create(Stream, PublishLicense, CryptoProvider)

在指定的流上创建并返回 EncryptedPackageEnvelope

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

参数

envelopeStream
Stream

要在其上创建文件的流。

publishLicense
PublishLicense

嵌入复合文件的发布许可证。

cryptoProvider
CryptoProvider

确定允许当前用户对加密的内容执行哪些操作的对象。

返回

新创建的 EncryptedPackageEnvelope

例外

envelopeStreamnull

envelopeStream 不提供读/写访问权限。

注解

当前用户对新文件具有读/写访问权限。

另请参阅

适用于

Create(String, PublishLicense, CryptoProvider)

创建并返回 EncryptedPackageEnvelope,然后为其提供指定的文件名。

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

参数

envelopeFileName
String

OLE 复合文件的名称。

publishLicense
PublishLicense

嵌入复合文件的发布许可证。

cryptoProvider
CryptoProvider

确定允许当前用户对加密的内容执行哪些操作的对象。

返回

新创建的 EncryptedPackageEnvelope

例外

envelopeFileNamenull

注解

如果已存在具有指定名称的文件,则会覆盖该文件。

当前用户对文件具有读/写访问权限。

另请参阅

适用于