mahendra [MinG] wrote:
> 
> Questions:
> 1. What is the encoding format for the encrypted text that is generated
> from openssl_public_encrypt?
> 2. Is it possible that because when i generate the encrypted text, i echo
> it into a HTML textarea and hence changing the encoding?
> 

For the openssl smime encrypted format, you have either base64 or binary. 
Default is base64 (PEM). Some reply already posted says that you should use
the smime encrypt. That's the best method.   If you test it with the command
line tool "openssl smime -encrypt/-decrypt..." you will see it more clearly,
but you have to get well involved in key pairs creation, certificate
authority, CSR, signing certs and keeping track of all issued certs.  On the
other hand,   PHP has many algorithms to encrypt and decrypt that don't
require a cert.  I've used those, called symetric encryption,  but for real
security, asymetric (public/private keys and certs) is best.  What you
mention about the Textarea has nothing to do.  If you grab the
$_POST['field'] and encrypt all that, and later you decrypt it, you will
obtain the exact original data.  


-- 
View this message in context: 
http://www.nabble.com/PHP-Open-SSL-tp24465525p24560828.html
Sent from the OpenSSL - User mailing list archive at Nabble.com.

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to