mirror of
https://github.com/crypto-pro-web/crypto-pro-php.git
synced 2025-01-18 19:25:51 +03:00
Пишем документацию
This commit is contained in:
parent
bdd545acf0
commit
f160e0066f
0
.gitattributes
vendored
Executable file → Normal file
0
.gitattributes
vendored
Executable file → Normal file
0
.github/workflows/static-analysis.yml
vendored
Executable file → Normal file
0
.github/workflows/static-analysis.yml
vendored
Executable file → Normal file
0
.gitignore
vendored
Executable file → Normal file
0
.gitignore
vendored
Executable file → Normal file
60
README.md
Executable file → Normal file
60
README.md
Executable file → Normal file
@ -1 +1,59 @@
|
|||||||
# PHP API для работы с бибилотекой КриптоПро libphpcades
|
<a name="cryptopro-php"></a>
|
||||||
|
# КриптоПРО PHP SDK
|
||||||
|
PHP SDK для работы с API расширения КриптоПро (`libphpcades`), аналогичный КриптоПро ЭЦП Browser plug-in
|
||||||
|
|
||||||
|
- [КриптоПРО PHP SDK](#cryptopro-php)
|
||||||
|
- [Зачем нужен этот пакет?](#why)
|
||||||
|
- [Установка](#install)
|
||||||
|
- [API](#api)
|
||||||
|
- [Методы класса CryptoPro](#api-cryptopro)
|
||||||
|
- [Методы объекта сертификата](#api-certificate)
|
||||||
|
- [Поддерживаемые СКЗИ](#supported-cist)
|
||||||
|
- [Примеры](#examples)
|
||||||
|
- [Тэг script (UMD)](#example-script-tag)
|
||||||
|
- [Тем, кто хочет помочь](#developers)
|
||||||
|
- [Запуск режима разработки](#dev-mode)
|
||||||
|
- [Запуск тестов](#tests-execution)
|
||||||
|
- [Проверка пакета перед публикацией в NPM](#final-check)
|
||||||
|
- [Лицензия](#lisense)
|
||||||
|
|
||||||
|
|
||||||
|
<a name="why"></a>
|
||||||
|
## Зачем нужен этот пакет?
|
||||||
|
Этот паект призван упроостить взаимодействие с абсолютно не документированным [расширением КриптоПро для PHP](https://docs.cryptopro.ru/cades/phpcades).
|
||||||
|
Пакет реализует упрощённый доступ к следующим операциям:
|
||||||
|
- работа с сертификатами;
|
||||||
|
- создание и проверка подписи;
|
||||||
|
- шифрование и расшифрование данных.
|
||||||
|
|
||||||
|
Немаловажным фактором, в выборе этого пакета, является полное соответсвие набора методов, с [КриптоПРО JS SDK](https://github.com/webmasterskaya/crypto-pro-js)
|
||||||
|
|
||||||
|
<a name="install"></a>
|
||||||
|
## Установка
|
||||||
|
|
||||||
|
Установка осуществляется через [Composer](https://getcomposer.org/).
|
||||||
|
```shell
|
||||||
|
composer require webmasterskaya/crypto-pro-php
|
||||||
|
```
|
||||||
|
|
||||||
|
<a name="api"></a>
|
||||||
|
## API
|
||||||
|
|
||||||
|
<a name="api-cryptopro"></a>
|
||||||
|
### Методы класса СryptoPro
|
||||||
|
- [СryptoPro::getUserCertificates()](docs/api/CryptoPro/getUserCertificates.md) - возвращает список сертификатов, доступных пользователю в системе
|
||||||
|
- [СryptoPro::getAllUserCertificates()](docs/api/CryptoPro/getAllUserCertificates.md) - возвращает список всех сертификатов, доступных пользователю в системе, в том числе, просроченные и без закрытого ключа
|
||||||
|
- [СryptoPro::getContainerCertificates()](docs/api/CryptoPro/getContainerCertificates.md) - возвращает список сертификатов, из закрытых ключей и/или сертификаты не установленные всистеме*
|
||||||
|
- [СryptoPro::getAllContainerCertificates()](docs/api/CryptoPro/getAllContainerCertificates.md) - возвращает список всех сертификатов, из закрытых ключей и/или сертификаты не установленные всистеме*, в том числе, просроченные и без закрытого ключа
|
||||||
|
- [СryptoPro::getCertificate()](docs/api/CryptoPro/getCertificate.md) - возвращает сертификат по отпечатку
|
||||||
|
- [СryptoPro::createAttachedSignature()](docs/api/CryptoPro/createAttachedSignature.md) - создает совмещенную (присоединенную) подпись сообщения
|
||||||
|
- [СryptoPro::createDetachedSignature()](docs/api/CryptoPro/createDetachedSignature.md) - создает отсоединенную (открепленную) подпись сообщения
|
||||||
|
- [СryptoPro::addAttachedSignature()](docs/api/CryptoPro/addAttachedSignature.md) - добавляет совмещенную (присоединенную) подпись к раннее подписанному документу (реализует метод coSign)
|
||||||
|
- [СryptoPro::addDetachedSignature()](docs/api/CryptoPro/addDetachedSignature.md) - добавляет отсоединенную (открепленную) подпись к раннее подписанному документу (реализует метод coSign)
|
||||||
|
- [СryptoPro::createHash()](docs/api/CryptoPro/createHash.md) - создает хеш сообщения по ГОСТ Р 34.11-2012 256 бит
|
||||||
|
- [СryptoPro::getSystemInfo()](docs/api/CryptoPro/getSystemInfo.md) - возвращает информацию о CSP и плагине
|
||||||
|
- [СryptoPro::isValidSystemSetup()](docs/api/CryptoPro/isValidSystemSetup.md) - возвращает флаг корректности настроек ЭП на машине
|
||||||
|
|
||||||
|
|
||||||
|
<a name="api-certificate"></a>
|
||||||
|
### Методы объекта сертификата
|
0
composer.json
Executable file → Normal file
0
composer.json
Executable file → Normal file
0
doc/ATTRIBUTES.md
Executable file → Normal file
0
doc/ATTRIBUTES.md
Executable file → Normal file
0
doc/GET-TEST-CERT.md
Executable file → Normal file
0
doc/GET-TEST-CERT.md
Executable file → Normal file
1
docs/api/CryptoPro/addAttachedSignature.md
Normal file
1
docs/api/CryptoPro/addAttachedSignature.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
# CryptoPro::addAttachedSignature
|
1
docs/api/CryptoPro/addDetachedSignature.md
Normal file
1
docs/api/CryptoPro/addDetachedSignature.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
# CryptoPro::addDetachedSignature
|
1
docs/api/CryptoPro/createAttachedSignature.md
Normal file
1
docs/api/CryptoPro/createAttachedSignature.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
# CryptoPro::createAttachedSignature
|
1
docs/api/CryptoPro/createDetachedSignature.md
Normal file
1
docs/api/CryptoPro/createDetachedSignature.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
# CryptoPro::createDetachedSignature
|
1
docs/api/CryptoPro/createHash.md
Normal file
1
docs/api/CryptoPro/createHash.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
# CryptoPro::createHash
|
1
docs/api/CryptoPro/getAllContainerCertificates.md
Normal file
1
docs/api/CryptoPro/getAllContainerCertificates.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
# CryptoPro::getAllContainerCertificates
|
1
docs/api/CryptoPro/getAllUserCertificates.md
Normal file
1
docs/api/CryptoPro/getAllUserCertificates.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
# CryptoPro::getAllUserCertificates
|
1
docs/api/CryptoPro/getCertificate.md
Normal file
1
docs/api/CryptoPro/getCertificate.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
# CryptoPro::getCertificate
|
1
docs/api/CryptoPro/getContainerCertificates.md
Normal file
1
docs/api/CryptoPro/getContainerCertificates.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
# CryptoPro::getContainerCertificates
|
1
docs/api/CryptoPro/getSystemInfo.md
Normal file
1
docs/api/CryptoPro/getSystemInfo.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
# CryptoPro::getSystemInfo
|
1
docs/api/CryptoPro/getUserCertificates.md
Normal file
1
docs/api/CryptoPro/getUserCertificates.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
# CryptoPro::getUserCertificates
|
1
docs/api/CryptoPro/isValidSystemSetup.md
Normal file
1
docs/api/CryptoPro/isValidSystemSetup.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
# CryptoPro::isValidSystemSetup
|
0
examples/list_of_all_valid_certificates.php
Executable file → Normal file
0
examples/list_of_all_valid_certificates.php
Executable file → Normal file
0
phpstan.neon
Executable file → Normal file
0
phpstan.neon
Executable file → Normal file
0
src/Certificate.php
Executable file → Normal file
0
src/Certificate.php
Executable file → Normal file
0
src/Constants/CADESCOM_ATTRIBUTE.php
Executable file → Normal file
0
src/Constants/CADESCOM_ATTRIBUTE.php
Executable file → Normal file
0
src/Constants/CADESCOM_CADES_TYPE.php
Executable file → Normal file
0
src/Constants/CADESCOM_CADES_TYPE.php
Executable file → Normal file
0
src/Constants/CADESCOM_CONTENT_ENCODING_TYPE.php
Executable file → Normal file
0
src/Constants/CADESCOM_CONTENT_ENCODING_TYPE.php
Executable file → Normal file
0
src/Constants/CADESCOM_DISPLAY_DATA.php
Executable file → Normal file
0
src/Constants/CADESCOM_DISPLAY_DATA.php
Executable file → Normal file
0
src/Constants/CADESCOM_ENCODING_TYPE.php
Executable file → Normal file
0
src/Constants/CADESCOM_ENCODING_TYPE.php
Executable file → Normal file
0
src/Constants/CADESCOM_ENCRYPTION_ALGORITHM.php
Executable file → Normal file
0
src/Constants/CADESCOM_ENCRYPTION_ALGORITHM.php
Executable file → Normal file
0
src/Constants/CADESCOM_HASH_ALGORITHM.php
Executable file → Normal file
0
src/Constants/CADESCOM_HASH_ALGORITHM.php
Executable file → Normal file
0
src/Constants/CADESCOM_STORE_LOCATION.php
Executable file → Normal file
0
src/Constants/CADESCOM_STORE_LOCATION.php
Executable file → Normal file
0
src/Constants/CAPICOM_CERTIFICATE_FIND_TYPE.php
Executable file → Normal file
0
src/Constants/CAPICOM_CERTIFICATE_FIND_TYPE.php
Executable file → Normal file
0
src/Constants/CAPICOM_CERTIFICATE_INCLUDE_OPTION.php
Executable file → Normal file
0
src/Constants/CAPICOM_CERTIFICATE_INCLUDE_OPTION.php
Executable file → Normal file
0
src/Constants/CAPICOM_PROPID.php
Executable file → Normal file
0
src/Constants/CAPICOM_PROPID.php
Executable file → Normal file
0
src/Constants/CAPICOM_STORE_LOCATION.php
Executable file → Normal file
0
src/Constants/CAPICOM_STORE_LOCATION.php
Executable file → Normal file
0
src/Constants/CAPICOM_STORE_OPEN_MODE.php
Executable file → Normal file
0
src/Constants/CAPICOM_STORE_OPEN_MODE.php
Executable file → Normal file
0
src/CryptoPro.php
Executable file → Normal file
0
src/CryptoPro.php
Executable file → Normal file
0
src/Dictionary/AbstractDictionary.php
Executable file → Normal file
0
src/Dictionary/AbstractDictionary.php
Executable file → Normal file
0
src/Dictionary/AbstractTagsDictionary.php
Executable file → Normal file
0
src/Dictionary/AbstractTagsDictionary.php
Executable file → Normal file
0
src/Dictionary/AdditionalTagsDictionary.php
Executable file → Normal file
0
src/Dictionary/AdditionalTagsDictionary.php
Executable file → Normal file
0
src/Dictionary/DescriptionAwareInterface.php
Executable file → Normal file
0
src/Dictionary/DescriptionAwareInterface.php
Executable file → Normal file
0
src/Dictionary/DictionaryInterface.php
Executable file → Normal file
0
src/Dictionary/DictionaryInterface.php
Executable file → Normal file
0
src/Dictionary/DictionaryItem.php
Executable file → Normal file
0
src/Dictionary/DictionaryItem.php
Executable file → Normal file
0
src/Dictionary/IssuerTagsDictionary.php
Executable file → Normal file
0
src/Dictionary/IssuerTagsDictionary.php
Executable file → Normal file
0
src/Dictionary/OIDAwareInterface.php
Executable file → Normal file
0
src/Dictionary/OIDAwareInterface.php
Executable file → Normal file
0
src/Dictionary/OIDAwareTrait.php
Executable file → Normal file
0
src/Dictionary/OIDAwareTrait.php
Executable file → Normal file
0
src/Dictionary/OIDDictionary.php
Executable file → Normal file
0
src/Dictionary/OIDDictionary.php
Executable file → Normal file
0
src/Dictionary/RDNAwareInterface.php
Executable file → Normal file
0
src/Dictionary/RDNAwareInterface.php
Executable file → Normal file
0
src/Dictionary/RDNAwareTrait.php
Executable file → Normal file
0
src/Dictionary/RDNAwareTrait.php
Executable file → Normal file
0
src/Dictionary/StandardTagsDictionary.php
Executable file → Normal file
0
src/Dictionary/StandardTagsDictionary.php
Executable file → Normal file
0
src/Dictionary/SubjectTagsDictionary.php
Executable file → Normal file
0
src/Dictionary/SubjectTagsDictionary.php
Executable file → Normal file
0
src/Dictionary/TitleAwareInterface.php
Executable file → Normal file
0
src/Dictionary/TitleAwareInterface.php
Executable file → Normal file
0
src/Dictionary/TitleAwareTrait.php
Executable file → Normal file
0
src/Dictionary/TitleAwareTrait.php
Executable file → Normal file
0
src/Helpers/ArrayHelper.php
Executable file → Normal file
0
src/Helpers/ArrayHelper.php
Executable file → Normal file
0
src/Helpers/CertificateHelper.php
Executable file → Normal file
0
src/Helpers/CertificateHelper.php
Executable file → Normal file
0
src/Helpers/ErrorMessageHelper.php
Executable file → Normal file
0
src/Helpers/ErrorMessageHelper.php
Executable file → Normal file
0
src/Helpers/Messages/HumanReadebleCPErrors.php
Executable file → Normal file
0
src/Helpers/Messages/HumanReadebleCPErrors.php
Executable file → Normal file
0
tmp/src.txt
Executable file → Normal file
0
tmp/src.txt
Executable file → Normal file
Loading…
Reference in New Issue
Block a user