다음을 통해 공유


SignedCms.Decode 메서드

정의

오버로드

Decode(Byte[])

인코딩된 SignedCms 메시지를 디코딩합니다.

Decode(ReadOnlySpan<Byte>)

Decode(Byte[])

Source:
SignedCms.cs
Source:
SignedCms.cs
Source:
SignedCms.cs
Source:
SignedCms.cs

인코딩된 SignedCms 메시지를 디코딩합니다.

public:
 void Decode(cli::array <System::Byte> ^ encodedMessage);
public void Decode (byte[] encodedMessage);
member this.Decode : byte[] -> unit
Public Sub Decode (encodedMessage As Byte())

매개 변수

encodedMessage
Byte[]

디코딩할 인코딩된 CMS/PKCS#7 메시지를 나타내는 바이트 값 배열입니다.

예외

encodedMessage이(가) null인 경우

encodedMessage를 성공적으로 디코딩할 수 없습니다.

예제

다음 예제에서는 메시지의 Decode 서명을 확인하는 과정에서 메서드의 배치를 SignedCms 보여 줍니다. 이 예제에서는 메시지 콘텐츠가 분리되지 않으므로 메시지 콘텐츠가 메시지에 포함 SignedCms 됩니다.

// Create a new, nondetached SignedCms message.
SignedCms signedCms = new SignedCms();

// encodedMessage is the encoded message received from
// the sender.
signedCms.Decode(encodedMessage);

// Verify the signature without validating the
// certificate.
signedCms.CheckSignature(true);
' Create a new, nondetached SignedCms message.
Dim signedCms As New SignedCms()

' encodedMessage is the encoded message received from 
' the sender.
signedCms.Decode(encodedMessage)

' Verify the signature without validating the 
' certificate.
signedCms.CheckSignature(True)

다음 예제에서는 메시지의 Decode 서명을 확인하는 과정에서 메서드의 배치를 SignedCms 보여 줍니다. 이 예제에서는 메시지 콘텐츠가 분리되므로 메시지 콘텐츠는 메시지와 독립적으로 SignedCms 확인해야 합니다.

// Create a ContentInfo object from the inner content obtained
// independently from encodedMessage.
ContentInfo contentInfo = new ContentInfo(innerContent);

// Create a new, detached SignedCms message.
SignedCms signedCms = new SignedCms(contentInfo, true);

// encodedMessage is the encoded message received from
// the sender.
signedCms.Decode(encodedMessage);

// Verify the signature without validating the
// certificate.
signedCms.CheckSignature(true);
' Create a ContentInfo object from the inner content obtained 
' independently from encodedMessage.
Dim contentInfo As New ContentInfo(innerContent)

' Create a new, detached SignedCms message.
Dim signedCms As New SignedCms(contentInfo, True)

' encodedMessage is the encoded message received from 
' the sender.
signedCms.Decode(encodedMessage)

' Verify the signature without validating the 
' certificate.
signedCms.CheckSignature(True)

설명

이 메서드는 성공적인 디코딩에서 얻은 정보를 사용하여 개체의 모든 멤버 변수를 다시 설정합니다.

추가 정보

적용 대상

Decode(ReadOnlySpan<Byte>)

Source:
SignedCms.cs
Source:
SignedCms.cs
Source:
SignedCms.cs
Source:
SignedCms.cs
public:
 void Decode(ReadOnlySpan<System::Byte> encodedMessage);
public void Decode (ReadOnlySpan<byte> encodedMessage);
member this.Decode : ReadOnlySpan<byte> -> unit
Public Sub Decode (encodedMessage As ReadOnlySpan(Of Byte))

매개 변수

encodedMessage
ReadOnlySpan<Byte>

디코딩할 인코딩된 CMS/PKCS#7 메시지를 나타내는 바이트 값의 읽기 전용 범위입니다.

예외

encodedMessage를 성공적으로 디코딩할 수 없습니다.

추가 정보

적용 대상