Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:110487 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 89574 invoked from network); 11 Jun 2020 18:14:51 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 11 Jun 2020 18:14:51 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id AE202180562 for ; Thu, 11 Jun 2020 09:59:03 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 11 Jun 2020 09:59:03 -0700 (PDT) Received: by mail-wr1-f42.google.com with SMTP id q11so6937873wrp.3 for ; Thu, 11 Jun 2020 09:59:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=xGbNcEJ6elriCRp8Opc1VSGO9vRhvdpPc48cq1rzfxk=; b=KkuP4SrEVEGJZ3eTRSCuqqpKZWEwxOdkomJ8+rX5i8wmmBS26Tm5Iab7SEVgKKsTzk xE4NvE9+m2Fa+moFHkOky+i0RAhUAwDMjuXnSjNXHTlkeQfept0g/9vDgmTSj7694ORf skbI8QOVF6EiMrKkLbVHBkriC3EFUcjFWwUv/PD+0C5GyHRFLqRTqWvxU9zQuBXKZEyA kZ/Fzflvk2thkwZzyO0Wl36q2LOQmiYgpvi9AzEsyVwH/v+KP52GJZD3GpT0gBD14PLj eVDgBmoB4j7ppCXMGjdV8lMoHTxo+D1NLtcF9c2dHiItOlT1xoyyszXuiEAizHxWP/p4 A3Og== X-Gm-Message-State: AOAM5305Hpmbobh4a8CR3QVz6AmSibilrTXgnhd0K1Sct9eqtRSxF4TL gNC1gAEXWlOOSbt24iIUTFNZQMWQSBQ/5/GrzHg= X-Google-Smtp-Source: ABdhPJwyHpLWSNGEktU/SZb65k1NFFuGAlAJdi6XGQJ7QXrTQz7VER7MsLW2VjV0Hjkd5qks4RWZBmqSkWTju3p4UFc= X-Received: by 2002:a5d:4488:: with SMTP id j8mr10221973wrq.242.1591894740333; Thu, 11 Jun 2020 09:59:00 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Thu, 11 Jun 2020 12:58:49 -0400 Message-ID: To: =?UTF-8?Q?Johannes_Schl=C3=BCter?= Cc: Eddie Kohler , PHP Internals , Sara Golemon Content-Type: multipart/alternative; boundary="0000000000008486f605a7d1e0a6" Subject: Re: [PHP-DEV] New functions `hash_serialize` and `hash_unserialize`? From: kohler@seas.harvard.edu (Eddie Kohler) --0000000000008486f605a7d1e0a6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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? Eddie On Mon, Jun 8, 2020 at 9:28 AM Johannes Schl=C3=BCter 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 > > --0000000000008486f605a7d1e0a6--