wp/wp-includes/sodium_compat/src/Core32/Ed25519.php
changeset 18 be944660c56a
parent 16 a86126ab1dd4
child 21 48c4eec2b7e6
--- a/wp/wp-includes/sodium_compat/src/Core32/Ed25519.php	Tue Dec 15 15:52:01 2020 +0100
+++ b/wp/wp-includes/sodium_compat/src/Core32/Ed25519.php	Wed Sep 21 18:19:35 2022 +0200
@@ -207,6 +207,7 @@
      * @return string
      * @throws SodiumException
      * @throws TypeError
+     * @psalm-suppress PossiblyInvalidArgument
      */
     public static function sign_detached($message, $sk)
     {
@@ -224,8 +225,8 @@
         # crypto_hash_sha512_update(&hs, m, mlen);
         # crypto_hash_sha512_final(&hs, nonce);
         $hs = hash_init('sha512');
-        hash_update($hs, self::substr($az, 32, 32));
-        hash_update($hs, $message);
+        self::hash_update($hs, self::substr($az, 32, 32));
+        self::hash_update($hs, $message);
         $nonceHash = hash_final($hs, true);
 
         # memmove(sig + 32, sk + 32, 32);
@@ -244,9 +245,9 @@
         # crypto_hash_sha512_update(&hs, m, mlen);
         # crypto_hash_sha512_final(&hs, hram);
         $hs = hash_init('sha512');
-        hash_update($hs, self::substr($sig, 0, 32));
-        hash_update($hs, self::substr($pk, 0, 32));
-        hash_update($hs, $message);
+        self::hash_update($hs, self::substr($sig, 0, 32));
+        self::hash_update($hs, self::substr($pk, 0, 32));
+        self::hash_update($hs, $message);
         $hramHash = hash_final($hs, true);
 
         # sc_reduce(hram);