Re: SHA-1 + RSA + base64

From: Date: Thu, 27 Mar 2003 13:42:40 +0000
Subject: Re: SHA-1 + RSA + base64
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-141215@lists.php.net to get a copy of this message
I'm not sure why you would want to encrypt a hash of a string, a hash (sha1) is already non reversible and you also do not need to base64_encode a sha1 hash (try <?php print sha1('hello'); ?>).. If you want to do RSA public key encryption you will need to use an external application such as gpg or pgp. Also please note if you are intending to encode the plain text three different ways you are exposing yourself with base64, base64 is not an encryption technique. The way I understand your question is data -> sha1 -> rsa -> base64_encode but it could also be data -> sha1 data -> rsa data -> base64 The latter is not secure because you are using base64 which is not even trivial to decode. Jason Veniamin Goldin wrote:
Hi all, I need some help, I have a request to encode string with SHA-1, then with RSA and at the end with base64, There no problems with SHA-1 and base64, but i can't find any functions to encode using RSA. md5 seems to be not what I'm looking for. I heard also, that there should be special function, that makes SHA-1 + RSA at once. Help please.


« previous php.general (#141215) next »