CipherData.CipherValue Property

Definition

Gets or sets the <CipherValue> element.

C#
public byte[]? CipherValue { get; set; }
C#
public byte[] CipherValue { get; set; }

Property Value

Byte[]

A byte array that represents the <CipherValue> element.

Exceptions

The CipherValue property was set to null.

The CipherValue property was set more than once.

Examples

The following code example shows how to create a new instance of the CipherData class.

C#
// Create a new CipherData object using a byte array to represent encrypted data.
Byte[] sampledata = new byte[8];
CipherData cd = new CipherData(sampledata);

Remarks

The value is encrypted data.

Примітка

The <CipherData> element can have either a CipherReference or a CipherValue child element, but not both. A CryptographicException is thrown if both are assigned to a CipherData object.

Applies to

Продукт Версії
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10