DSACng.Key Property

Definition

Gets the key that will be used by the DSACng object for any cryptographic operation that it performs.

public System.Security.Cryptography.CngKey Key { get; }

Property Value

The key used by the DSACng object to perform cryptographic operations.

Remarks

The CngKey object is disposed if the key is reset, for instance by changing the CngKey.KeySize property, by using the DSACng.ImportParameters method to create a new key, or by disposing the parent DSACng object. Therefore, you should ensure that the key object is no longer used in these cases.

This CngKey object is not the same as the CngKey object passed to the DSACng constructor, if that constructor was used. However, it will point to the same CNG key.

Applies to

Vara Útgáfur
.NET 6, 7, 8, 9
.NET Framework 4.6.2, 4.7, 4.7.1 (package-provided), 4.7.1, 4.7.2 (package-provided), 4.7.2, 4.8 (package-provided), 4.8, 4.8.1
.NET Standard 2.0 (package-provided), 2.1 (package-provided)
Windows Desktop 3.0, 3.1, 5