|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-04-19 23:59 UTC] sniper@php.net
[2005-04-20 19:49 UTC] ivan at mishanin dot ru
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 15:00:01 2025 UTC |
Description: ------------ When i try to encrypt big string it return null. If i try to use big key to encrypt - it help my, but if i use a big sting (300 000 signs) - it isn't work. i try encrypt big string by part, it's ok, but then i try to decrypt it - openssl_public_decrypt make a null decrypt text... certificate is OK - under MS BizTolk server it's work right. Reproduce code: --------------- prkeyid = openssl_pkey_get_private("file://c:/cert/CAkey.pem", '1234'); $pubkeyid = openssl_pkey_get_public("file://c:/cert/CAcert.pem"); openssl_private_encrypt($res,$crypttext,$prkeyid); $fp = fopen ("c:/file.xml", "w+"); // for test fwrite ($fp, $crypttext); fclose ($fp); openssl_public_decrypt($crypttext, $ext_data, $pubkeyid); $fp = fopen ("c:/file2.xml", "w+"); fwrite ($fp, $ext_data); fclose ($fp); Actual result: -------------- null