ExternalSignature
개요
ExternalSignature은 Aspose.PDF FOSS에서 .NET용 클래스입니다. 상속 대상: Signature.
이미 로드된 플랫폼 인증서를 기반으로 하는 분리형 PKCS#7 서명 구성 — 일반적으로 OS 인증서 저장소, 스마트 카드 또는 HSM에서 가져오며 — PFX 파일이 아니라.
이 클래스는 .NET 프로그램에서 ExternalSignature 객체를 다루기 위한 11개의 메서드를 제공합니다. 사용 가능한 메서드: ExternalSignature, GetSignatureAlgorithmInfo, Signature, Verify. Aspose.PDF FOSS for .NET 패키지를 설치한 후 모든 .NET 애플리케이션에서 모든 공개 멤버에 접근할 수 있습니다. 속성: Authority, AvoidEstimatingSignatureLength, ByteRange, Certificate, ContactInfo, CustomAppearance, 및 기타 9개.
속성
| 이름 | 유형 | 액세스 | 설명 |
|---|---|---|---|
Certificate | System.Security.Cryptography.X509Certificates.X509Certificate2 | 읽기 | 이 인스턴스가 구성된 인증서. |
Authority | string | 읽기/쓰기 | 권한을 가져오거나 설정합니다. |
ContactInfo | string | 읽기/쓰기 | 연락처 정보를 가져오거나 설정합니다. |
Location | string | 읽기/쓰기 | 위치를 가져오거나 설정합니다. |
Reason | string | 읽기/쓰기 | 이유를 가져오거나 설정합니다. |
Date | DateTime | 읽기/쓰기 | 날짜를 가져오거나 설정합니다. |
ByteRange | int[] | 읽기 | 시그니처의 /ByteRange 항목입니다. |
TimestampSettings | Aspose.Pdf.TimestampSettings | 읽기/쓰기 | RFC 3161 TSA 설정; 설정될 때 서명자에 의해 적용됩니다. |
OcspSettings | Aspose.Pdf.OcspSettings | 읽기/쓰기 | OCSP / 폐기 확인 설정; 설정될 때 서명자에 의해 적용됩니다. |
CustomAppearance | SignatureCustomAppearance? | 읽기/쓰기 | 시각적 외관 조정값은 SignWithAppearance에 의해, 서명이 visible-rect 오버로드를 통해 서명될 때 존중됩니다. |
CustomSignHash | SignHash? | 읽기/쓰기 | 선택적 외부 서명자 콜백. |
UseLtv | bool | 읽기/쓰기 | ltv 사용 여부를 가져오거나 설정합니다. |
AvoidEstimatingSignatureLength | bool | 읽기/쓰기 | true일 경우, 서명자는 바이트 범위 추정 단계를 건너뛰고 PKCS#7 /Contents 16진수 문자열을 위한 공간을 예약할 때 DefaultSignatureLength를 직접 사용합니다. |
DefaultSignatureLength | int | 읽기/쓰기 | PKCS#7 /Contents 16진수 문자열을 위해 예약된 바이트 수. |
ShowProperties | bool | 읽기/쓰기 | true일 경우, 보이는 서명 모양에 서명자의 Reason/Location/ContactInfo가 텍스트로 포함됩니다. |
메서드
| 시그니처 | 설명 |
|---|---|
ExternalSignature(certificate: System.Security.Cryptography.X509Certificates.X509Certificate2) | 이 ExternalSignature 인스턴스에서 ExternalSignature(certificate)를 호출합니다. |
ExternalSignature(certificate: System.Security.Cryptography.X509Certificates.X509Certificate2, detached: bool) | detached는 핸들러를 선택하며, PKCS7 / PKCS7Detached 쌍이 하는 방식과 정확히 동일합니다: true는 SHA-256 다이제스트 위에 adbe.pkcs7.detached 엔벨로프를 방출하고, false는 SHA-1 다이제스트 위에 adbe.pkcs7.sha1 핸들러를 방출합니다. |
ExternalSignature(certificate: System.Security.Cryptography.X509Certificates.X509Certificate2, digestHashAlgorithm: DigestHashAlgorithm) | 이 ExternalSignature 인스턴스에서 ExternalSignature(certificate, digestHashAlgorithm)를 호출합니다. |
ExternalSignature(base64Certificate: string, detached: bool) | CustomSignHash를 통해 연기/외부 서명을 위해 base64 인코딩된 공개 인증서(개인 키 없음)로부터 구성합니다. |
Signature() | 이 ExternalSignature 인스턴스에서 Signature를 호출합니다. |
Signature(pfx: string, password: string) | 이 ExternalSignature 인스턴스에서 Signature(pfx, password)를 호출합니다. |
Signature(pfx: Stream, password: string) | 이 ExternalSignature 인스턴스에서 Signature(pfx, password)를 호출합니다. |
Verify() | 로드된 서명의 PKCS#7을 원본 PDF 바이트와 비교하여 검증합니다 — 서명이 디코딩되고 검증될 때 true를 반환합니다. |
Verify(options: Security.ValidationOptions, validationResult: Security.ValidationResult) | 명시적인 옵션과 결과 DTO를 사용하여 검증합니다. |
Verify(publicKeyCertificate: System.Security.Cryptography.X509Certificates.X509Certificate2, options: Security.ValidationOptions, validationResult: Security.ValidationResult) | 공개키 고정 검증. |
GetSignatureAlgorithmInfo() | PKCS#7 엔벨로프를 파싱하여(기존 서명에서 로드된 경우) 서명 알고리즘 / 다이제스트 알고리즘 / 암호 표준 삼중항을 보고합니다. |