Re: openssl module for php

From: Date: Fri, 04 May 2001 20:09:51 +0000
Subject: Re: openssl module for php
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-53950@lists.php.net to get a copy of this message
On 2001-05-04 20:47:25, "Stig Venaas" <venaas@php.net> wrote: > Even though it is 4 functions, I think users will find it easier to > work with functions called openssl_public_encrypt, > openssl_private_decrypt etc. It also separates them from possible > symmetric enryption later on. So are we looking at openssl_asym_public_encrypt() (or is the asym part redundant by implication?). IMHO, I prefer to spell it out - especially to those new to openssl (I'm fairly new to it!) it helps to have things spelled out. That way, you don't have to be an openssl hacker to benefit from the PHP interface. > I think it's generally better to not alter arguments, better return it > this way. Is it good enough to report errors by returning an empty > string? I think so. Can an empty string become an non-empty string when encrypted? If so, when we decrypt it, we will not be able to distinguish the correctly decrypted empty string from an error condition. We could return false (as is the convention), but then everyone would have to use === to check it correctly. If an empty string is not a valid return result, then we are OK. --Wez.

« previous php.dev (#53950) next »