php - Unable to decode decrypted string returning null -
after decrypting string using private key, using echo returns value. when try base64_decode returning null. needed value base64_decode.
openssl_private_decrypt(base64_decode($_post['data']), $data, $privatekey, openssl_no_padding); echo $data; // returning value --> k/hgb3uqz1klyehlj2jhcg5fsoy+gowif4bich195ll7znf9sqbgg/1mkiupk4scflt2e0xiwxzanggrni2yeg== echo base64_decode($data); // returning null
base64 decoding string:
k/hgb3uqz1klyehlj2jhcg5fsoy+gowif4bich195ll7znf9sqbgg/1mkiupk4scflt2e0xiwxzanggrni2yeg==
the decoded base64, binary data not string:
93f1e0077b90675925c9e1e52768e1706e5f48ecbe1a8c081786e2721d7de6597bccd17db106e083fd4c92252993849c1654f67b45c8c17cc034682b362db212
in general binary data can not represented in printable characters , in cases can not represented in character set.
Comments
Post a Comment