php-pdf-digital-signature

所属分类:加密解密
开发工具:PHP
文件大小:9KB
下载次数:0
上传日期:2020-03-01 11:20:43
上 传 者sh-1993
说明:  应用数字签名的Pdf发生器
(Pdf generator with digital signature applied)

文件列表:
.env (12, 2020-03-01)
bin (0, 2020-03-01)
bin\console.php (1325, 2020-03-01)
composer.json (448, 2020-03-01)
composer.lock (15027, 2020-03-01)
output.crt (1452, 2020-03-01)
output.key (1186, 2020-03-01)
src (0, 2020-03-01)
src\Commands (0, 2020-03-01)
** (2175, 2020-03-01)
src\File (0, 2020-03-01)
src\File\Path.php (436, 2020-03-01)

# PDF Generator with Digital Signature applied ## How to setup & run ``` git clone git@github.com:harryosmar/php-pdf-digital-signature.git cd php-pdf-digital-signature composer install # this will generate .pdf file in storage/logs/ php bin/console.php app:pdf-generate ``` ### Verify generated file pdf signature Open https://account.ascertia.com/demos/PDFSignatureVerificationStep1 to verify the newly generated file ## How the Digital Signature applied ``` # generate new .crt file, it's contained certificate & private key openssl req -x509 -nodes -days 365000 -newkey rsa:1024 -keyout filename.crt -out filename.crt # convert .crt to binar .p12 file openssl pkcs12 -export -in tcpdf.crt -out filename.p12 # get private key from .p12 file, it will ask for passphrase/password, so the generated private key will be encrypted openssl pkcs12 -in filename.p12 -nocerts -out filename.key # get certificate from .p12 file openssl pkcs12 -in filename.p12 -clcerts -nokeys -out filename.crt ``` ```php setSignature('file://PATH-TO-CRT-FILE', 'file://PATH-TO-PRIVATE-KEY-FILE', 'PRIVATE-KEY-FILE-PASSPHRASE', '', 2, $info); ```

近期下载者

相关文件


收藏者