Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n6EL6-0002ZT-24 for pgsql-general@arkaria.postgresql.org; Sat, 08 Jan 2022 16:13:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1n6EL4-0004ez-HK for pgsql-general@arkaria.postgresql.org; Sat, 08 Jan 2022 16:13:06 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n6EL2-0004eq-B3 for pgsql-general@lists.postgresql.org; Sat, 08 Jan 2022 16:13:06 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1n6EKt-0000FJ-EN for pgsql-general@lists.postgresql.org; Sat, 08 Jan 2022 16:13:03 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id B9CBB5C00D4; Sat, 8 Jan 2022 11:12:51 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sat, 08 Jan 2022 11:12:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= message-id:date:mime-version:subject:to:references:from :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=3 WBAz+ibJvtY+8ZUlohSUWIDRGIC//nwIQO388ddDNE=; b=Obc2QANqiPYZTiBuR hh/aouAKPazWccHNzW2Sukter9IvHBuOyHn+Sjn03+A3eTL2cij4aNLD9AaaD2TK 4Ra+mcVrkaQq33tokRtTa61y9G95b/T90Z2hv28vFzB7muJLV53MkIVoDPbVfSeu sIZoSxFLrUcwh/ZAFL/v+/sMXNqZMVE8JsRYb0CulNJbDuKY5Gk/3+Fzn4q2KN1u MmJFKj52VeWs0SC/gCnYzbnvEaT3A65eZVdJF6X1JBWday6p7XPT+PXqLS7hezd6 U6jNtBzcO1yRGuKu8wli9KThuw5a5xoDwJvXrXqbWCDGlCtlCjpNu7L0w63FxXl+ In2qw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=3WBAz+ibJvtY+8ZUlohSUWIDRGIC//nwIQO388ddD NE=; b=RVxOluHL5oUMsVcUeV4J8S2rAJ2aX6XtF3YnvoKN9ZahEcwEjI+Nx9V2o AbZy2O3Ep6yWtYZa9DU5kNiEhjd+luEJ/+DVLhh1ynEuksVoGugNeRC7+dtRD6Q+ gTYYJHhtjjp4/Cs/ZRkZmpmozchb/+uh1yCCMgwABpSLztfmYnlKqZ5ulxyDVKuJ 8b/I5XkLQUm/TxupTBPL/OxFw5bsioEqms4pSBcWgeopryK2z0Gg6HLDed9FjuKi gxIWmRf2kA/lwaWYa6BY1Cwz98N7jZ1av7DKJsZXXf8YmMrLm9cKoKZJpOvbprOx 1dqgfVUuB2LDkrk2GRK9MP+4QzwAA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrudeghedgiedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtke ertddtfeejnecuhfhrohhmpeetughrihgrnhcumfhlrghvvghruceorggurhhirghnrdhk lhgrvhgvrhesrghklhgrvhgvrhdrtghomheqnecuggftrfgrthhtvghrnhepudfgueelge evfffhgeeljeehhfettdegieelgefgheefffefveegjedtueetffdtnecuvehluhhsthgv rhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprggurhhirghnrdhklhgrvh gvrhesrghklhgrvhgvrhdrtghomh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 8 Jan 2022 11:12:51 -0500 (EST) Message-ID: <533f71da-16f1-349e-d391-08f048ea27bc@aklaver.com> Date: Sat, 8 Jan 2022 08:12:50 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.1 Subject: Re: How are md5.h: pg_md5_hash() function and below functions working? Content-Language: en-US To: Ali Koca , pgsql-general@lists.postgresql.org References: From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 1/8/22 05:21, Ali Koca wrote: > I can't understand functions in md5.h, these are seemingly little bit > weird. Such as: > >     /* Utilities common to all the MD5 implementations, >     as of md5_common.c */ >     extern bool pg_md5_hash(const void *buff, size_t len, char *hexsum); >     extern bool pg_md5_binary(const void *buff, size_t len, void *outbuf); >     extern bool pg_md5_encrypt(const char *passwd, const char *salt, >                            size_t salt_len, char *buf); > > What they do is explained in md5_common.c. -- Adrian Klaver adrian.klaver@aklaver.com