С помощью CryproPro Browser Plugin подписываем данные (данные в подпись не включаются) и передаем данные и подпись на сервер. Как на backend'е с помощью PHP проверить подпись?
Тестовый пример:
Подписываемые данные:
MTIz
Подпись:
MIIHrwYJKoZIhvcNAQcCoIIHoDCCB5wCAQExDDAKBgYqhQMCAgkFADALBgkqhkiG9w0BBwGgggWO
MIIFijCCBTmgAwIBAgIKFa5nHQAAAAAAEzAIBgYqhQMCAgMwVzELMAkGA1UEBhMCUlUxSDBGBgNV
BAMTP0NlbnRlci1JbmZvcm0gVGVzdCBHb3N0IENBIGZvciBBdXRvbWF0ZWQgQ2VydGlmaWNhdGlv
biBTZXJ2aWNlczAeFw0xNjA0MjkxMTU2MDBaFw0xNjA1MjkxMjA2MDBaMIICATEYMBYGCCqFAwOB
DQEBEgo3ODI3MDEwMDAwMRYwFAYFKoUDZAMSCzE0MTQ2NTk0NDYwMRgwFgYFKoUDZAESDTEwMzc4
MDAwMDY1MjkxGjAYBggqhQMDgQMBARIMMDAwMDAwMDAwMDAwMSgwJgYJKoZIhvcNAQkBFhlrLnZh
Z25lckBjZW50ZXItaW5mb3JtLnJ1MQswCQYDVQQGEwJSVTEtMCsGA1UECAwkNzgg0LMuINCh0LDQ
vdC60YIt0J/QtdGC0LXRgNCx0YPRgNCzMQowCAYDVQQHDAEwMTMwMQYDVQQKDCrQntCe0J4gIjEy
0KLQtdGB0YLQvtCy0LDRjyDQktCw0LPQvdC10YAxMiIxCjAIBgNVBAsMATAxMzAxBgNVBAMMKtCe
0J7QniAiMTLQotC10YHRgtC+0LLQsNGPINCS0LDQs9C90LXRgDEyIjEKMAgGA1UECQwBMDEwMC4G
CSqGSIb3DQEJAgwhMDAwMDAwMDAwMC03ODA0MDEwMTItNzAxNzA4OTAzMzA3MSwwKgYDVQQMDCPQ
ktC10LTRg9GJ0LjQuSDRgdC/0LXRhtC40LDQu9C40YHRgjEsMCoGA1UEKgwj0JrRgdC10L3QuNGP
INCT0YDQuNCz0L7RgNGM0LXQstC90LAxFT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