Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:124592 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id 341201A00B7 for ; Thu, 25 Jul 2024 18:35:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1721932637; bh=pnUF5igBQ82tNPHUOjW5XPvSUD7WrLWs206jNPqq3FY=; h=Date:Subject:To:References:From:In-Reply-To:From; b=TpukVcbslf7F1pfKASFa/hCe4ejGxHAPlnhCZ2RO5jHZwthVMtREh45JOgxVLNpoF 5ue1OavNTrmvjysG7fM4/rp3y3PplALKB+4ILu4zh+q+YNnpf4w3TtXnYQZbDaq/dA FvsasnChgCcHlcg5Ib0Kt9gl4WO/VmuHi4f/0+okipVETRtR0ywGr8F05dVEX9hbYY n+JTgTWrgN5KS7BYRFfqSjOvwZkPnnMOZYGtPVj9F/7yyutq7bEHpqCnRM0dVJ8hlu TBrHzSY3G9NiOp5OyMqUF6jrMxB/91cnN0Hl+QP2akDLxHTfnqw1esND2Cb2pwIHQ+ aOChW38SMBYiw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 9A32E180051 for ; Thu, 25 Jul 2024 18:37:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from chrono.xqk7.com (chrono.xqk7.com [176.9.45.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 25 Jul 2024 18:37:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1721932539; bh=NrrG6ykZJG/ofm/gES+xCxvJdYeKc9q9zX/gZCUxhxQ=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type:from:to:cc:subject:message-id; b=nsRsoBP/QQ17x5KMrkmyog4JQxULk1Pz9IBuejYzU/CZjWrbnMEK8e9ZlH14M+Yd8 kFJxk8G3VQM3s7MTuLEGt55is2bdO0m0EZWz32wJAPiUmZdY/zj2/gtS+uMTCSk8rS AIOjK7TFlNTqO5sxC82/plp/crSDTQeRs/LKtN2EeiJ4oDBp840faMxaOZ2Ka0yRdy YLh4u3/3feFENC6rpqjHLNohydK67VhqCHNAes1aHoGum95u9zAkoNhX4ABpOUpaMT 4Or/hqoeSYBXVswKLLgef2zXJujWnMb93/p3F5mEYo1jOWQK9x/TSz/MsldJQ0eki0 YdQE1PccKMsWA== Message-ID: Date: Thu, 25 Jul 2024 20:35:38 +0200 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Subject: Re: [PHP-DEV] [RFC] [VOTE] Deprecations for PHP 8.4 To: Nick Lockheart , internals@lists.php.net References: <1a88918e-e808-d778-45e1-53797660e093@php.net> <95147d9d-d6e8-4396-bf0b-409c33679f90@bastelstu.be> <68ba999c63215204227eae87af69572d25e6b1b8.camel@ageofdream.com> Content-Language: en-US In-Reply-To: <68ba999c63215204227eae87af69572d25e6b1b8.camel@ageofdream.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit From: tim@bastelstu.be (=?UTF-8?Q?Tim_D=C3=BCsterhus?=) Hi On 7/25/24 19:28, Nick Lockheart wrote: > I'm in the process of refactoring an old framework and I just found a > use of sha1(). It's being used to generate a unique resource lock. It > doesn't need to be secure, just a fast and random UID. SHA-1 is a deterministic algorithm, thus it is unable to generate a random UID. Whatever this code is doing can most likely be more reliably achieved in a different way. Best regards Tim Düsterhus