SignedCms.RemoveSignature Method (Int32)

 

Removes the signature at the specified index of the SignerInfos collection.

Namespace:   System.Security.Cryptography.Pkcs
Assembly:  System.Security (in System.Security.dll)

public void RemoveSignature(
	int index
)

Parameters

index
Type: System.Int32

The zero-based index of the signature to remove.

Exception Condition
InvalidOperationException

A CMS/PKCS #7 message is not signed, and index is invalid.

ArgumentOutOfRangeException

index is less than zero.

-or-

index is greater than the signature count minus 1.

CryptographicException

The signature could not be removed.

-or-

An internal cryptographic error occurred.

.NET Framework
Available since 2.0
Return to top
Show: