Signature.Sign 메서드
XML 디지털 서명 블록을 쓰고 서명한 데이터의 암호화 해시를 계산합니다.
이 메서드는 CLS 규격이 아닙니다.
네임스페이스: Microsoft.Office.Interop.InfoPath.SemiTrust
어셈블리: Microsoft.Office.Interop.InfoPath.SemiTrust(microsoft.office.interop.infopath.semitrust.dll)
구문
<DispIdAttribute(5)> _
Sub Sign
Dim instance As Signature
instance.Sign
[DispIdAttribute(5)]
void Sign ()
주의
Sign 메서드는 OnSign 이벤트에서만 호출할 수 있습니다. 이 메서드를 호출하면 디지털 서명 마법사가 서명 프로세스의 두 번째 단계로 이동하여 인증서를 선택할 수 있습니다.
![]() |
---|
이 멤버는 양식 옵션 대화 상자의 보안 및 신뢰 범주에서 완전히 신뢰할 수 있는 상태로 실행되도록 구성된 양식 서식 파일에서 열린 양식에서만 액세스할 수 있습니다. 이 멤버를 사용하려면 직접 호출자에 대한 전체 신뢰가 필요합니다. 자세한 내용은 MSDN의 "부분 신뢰 코드에서 라이브러리 사용"을 참고하십시오. |
예제
다음 예제에서는 InfoPath 디자이너 사용자 인터페이스의 도구 메뉴에서 프로그래밍을 선택한 후 OnSign 이벤트를 양식에 추가하여 만든 디지털 서명을 SignatureObject 개체의Sign 메서드를 사용하여 양식에 추가합니다.
public void OnSign(SignEvent e)
{
// The OnSign handler can be customized only in fully trusted form templates.
Signature thisSignature = e.SignedDataBlock.Signatures.Create();
// You can add other pieces of information to sign by modifying the signature
// template in thisSignature.SignatureBlockXmlNode.
thisSignature.Sign();
e.ReturnStatus = true;
}
참고 항목
참조
Signature 인터페이스
Signature 구성원
Microsoft.Office.Interop.InfoPath.SemiTrust 네임스페이스