SetSignProcessEd25519Identity
Bảo mật và chữ ký
Mô tả
Đặt một certificate và private key Ed25519 X.509 cho một chữ ký PDF detached
Certificate phải mã hóa DER và dùng thuật toán subject-public-key id-Ed25519, còn private key có thể là seed 32 byte hay một giá trị PKCS #8 DER chưa mã hóa
Cú pháp
Delphi
Function TPDFlib.SetSignProcessEd25519Identity(SignProcessID: Integer; Const CertificateDER, PrivateKeyDER: AnsiString): Integer;
ActiveX
Function PDFlib::SetSignProcessEd25519Identity(SignProcessID As Long, CertificateDER As Variant, PrivateKeyDER As Variant) As Long
DLL
int DLSetSignProcessEd25519Identity(int InstanceID, int SignProcessID, const char* CertificateDER, int CertificateLength, const char* PrivateKeyDER, int PrivateKeyLength);
Tham số
| SignProcessID | Giá trị được trả về bởi một hàm NewSignProcessFrom* |
|---|---|
| CertificateDER | Certificate X.509 mã hóa DER đầy đủ chứa public key Ed25519 |
| PrivateKeyDER | Raw 32-byte Ed25519 seed or unencrypted PKCS #8 DER private key |
Giá trị trả về
| 1 | Định danh đã được gắn vào quy trình |
|---|---|
| 0 | Process id hoặc đầu vào không hợp lệ |
Ghi chú
Dùng adbe.pkcs7.detached hay ETSI.CAdES.detached; Ed25519 dùng identifier digest CMS SHA-512 và ký trực tiếp giá trị signed-attributes canonicalCài đặt suy public key từ private seed và từ chối một định danh khi nó không khớp certificate
ActiveX nhận variant byte array, còn DLL nhận độ dài tường minh nên các byte 0 nhúng trong dữ liệu vẫn được giữ lại
ActiveX nhận các variant kiểu byte array, và DLL nhận độ dài tường minh nên các byte zero nhúng bên trong được giữ nguyên
Xem thêm
SetSignProcessEd25519IdentityFromFile, SetSignProcessDigestAlgorithm, SetSignProcessSubFilter