Редагувати

Поділитися через


RSA.EncryptValue(Byte[]) Method

Definition

Caution

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

When overridden in a derived class, encrypts the input data using the public key.

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()

Parameters

rgb
Byte[]

The plain text to be encrypted.

Returns

Byte[]

The resulting encryption of the rgb parameter as cipher text.

Attributes

Exceptions

This method call is not supported. This exception is thrown starting with the .NET Framework 4.6.

Remarks

In the .NET Framework 4.5.2 and earlier versions of the .NET Framework, this method was abstract. However, the only implementation by a derived class, RSACryptoServiceProvider.DecryptValue, also threw a NotSupportedException exception.

Applies to

See also