RSA.EncryptValue(Byte[]) 方法

定义

注意

RSA.EncryptValue and DecryptValue are not supported and throw NotSupportedException. Use RSA.Encrypt and RSA.Decrypt instead.

当在派生类中重写时,使用公钥加密输入数据。

public:
 virtual cli::array <System::Byte> ^ EncryptValue(cli::array <System::Byte> ^ rgb);
public:
 abstract cli::array <System::Byte> ^ EncryptValue(cli::array <System::Byte> ^ rgb);
public virtual byte[] EncryptValue (byte[] rgb);
[System.Obsolete("RSA.EncryptValue and DecryptValue are not supported and throw NotSupportedException. Use RSA.Encrypt and RSA.Decrypt instead.", DiagnosticId="SYSLIB0048", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public virtual byte[] EncryptValue (byte[] rgb);
public abstract byte[] EncryptValue (byte[] rgb);
abstract member EncryptValue : byte[] -> byte[]
override this.EncryptValue : byte[] -> byte[]
[<System.Obsolete("RSA.EncryptValue and DecryptValue are not supported and throw NotSupportedException. Use RSA.Encrypt and RSA.Decrypt instead.", DiagnosticId="SYSLIB0048", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
abstract member EncryptValue : byte[] -> byte[]
override this.EncryptValue : byte[] -> byte[]
abstract member EncryptValue : byte[] -> byte[]
Public Overridable Function EncryptValue (rgb As Byte()) As Byte()
Public MustOverride Function EncryptValue (rgb As Byte()) As Byte()

参数

rgb
Byte[]

要加密的纯文本。

返回

Byte[]

rgb 参数产生的密码文本形式的加密结果。

属性

例外

不支持此方法调用。 从 .NET Framework 4.6 开始引发此异常。

注解

在 .NET Framework 4.5.2 及更低版本的 .NET Framework中,此方法为 abstract。 但是,派生类 RSACryptoServiceProvider.DecryptValue的唯一实现也引发了异常 NotSupportedException

适用于

另请参阅