SignedCms.Encode Method ()


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

The Encode method encodes the information in the object into a CMS/PKCS #7 message.

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

public byte[] Encode()

Return Value

Type: System.Byte[]

An array of byte values that represents the encoded message. The encoded message can be decoded by the Decode method.

Exception Condition

A cryptographic operation could not be completed.


A method call was invalid for the object's current state.

.NET Framework
Available since 2.0
Return to top