Re: New functions `hash_serialize` and `hash_unserialize`?
| From: | Christoph M. Becker | Date: | Thu, 11 Jun 2020 21:07:52 +0000 |
| Subject: | Re: New functions `hash_serialize` and `hash_unserialize`? | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-110491@lists.php.net to get a copy of this message | ||
On 11.06.2020 at 18:58, Eddie Kohler wrote:
> Thanks for this suggestion. I've updated the implementation to make
> HashContext implement Serializable.
>
> I'd still be grateful for more feedback, or perhaps I should just create an
> RFC?
Not sure if that would need an RFC; maybe just start by submitting a
pull request. :)
Thanks,
Christoph
> Eddie
>
>
> On Mon, Jun 8, 2020 at 9:28 AM Johannes Schlüter <johannes@schlueters.de>
> wrote:
>
>> On Mon, 2020-06-08 at 09:01 -0400, Eddie Kohler wrote:
>>> I'm writing to gauge interest in two new functions to the PHP
>>>
hash
>>> extension, hash_serialize and
>>> hash_unserialize. These functions
>>> would serialize and unserialize the internals of a HashContext
>>> objectallowing a partially-computed hash to be saved, then restored
>>> and completed in a laterrun.
>>
>> I would suggest to make the HashContext Serializable, then
>>
>> serialize($hash_context);
>>
>> works. Then it also fits when stored in other objects or something ...
>>
>> johannes
>>
>>
>