Changeset 45355 for branches/5.2/src/wp-includes/sodium_compat/src/File.php
- Timestamp:
- 05/17/2019 05:19:21 PM (5 years ago)
- Location:
- branches/5.2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/5.2
-
branches/5.2/src/wp-includes/sodium_compat/src/File.php
r44953 r45355 591 591 $az[31] = self::intToChr((self::chrToInt($az[31]) & 63) | 64); 592 592 593 /** @var resource $hs */594 593 $hs = hash_init('sha512'); 595 594 hash_update($hs, self::substr($az, 32, 32)); … … 611 610 ); 612 611 613 /** @var resource $hs */614 612 $hs = hash_init('sha512'); 615 613 hash_update($hs, self::substr($sig, 0, 32)); … … 720 718 $A = ParagonIE_Sodium_Core_Ed25519::ge_frombytes_negate_vartime($publicKey); 721 719 722 /** @var resource $hs */723 720 $hs = hash_init('sha512'); 724 721 hash_update($hs, self::substr($sig, 0, 32)); … … 1080 1077 * @param resource $fp 1081 1078 * @param int $size 1082 * @return mixed (resource on PHP < 7.2, object on PHP >= 7.2)1079 * @return resource|object Resource on PHP < 7.2, HashContext object on PHP >= 7.2 1083 1080 * @throws SodiumException 1084 1081 * @throws TypeError … … 1096 1093 throw new TypeError('Argument 1 must be a resource, ' . gettype($hash) . ' given.'); 1097 1094 } 1098 1099 1095 } else { 1100 1096 if (!is_object($hash)) { … … 1102 1098 } 1103 1099 } 1100 1104 1101 if (!is_resource($fp)) { 1105 1102 throw new TypeError('Argument 2 must be a resource, ' . gettype($fp) . ' given.'); … … 1168 1165 $az[31] = self::intToChr((self::chrToInt($az[31]) & 63) | 64); 1169 1166 1170 /** @var resource $hs */1171 1167 $hs = hash_init('sha512'); 1172 1168 hash_update($hs, self::substr($az, 32, 32)); … … 1188 1184 ); 1189 1185 1190 /** @var resource $hs */1191 1186 $hs = hash_init('sha512'); 1192 1187 hash_update($hs, self::substr($sig, 0, 32)); … … 1273 1268 $A = ParagonIE_Sodium_Core32_Ed25519::ge_frombytes_negate_vartime($publicKey); 1274 1269 1275 /** @var resource $hs */1276 1270 $hs = hash_init('sha512'); 1277 1271 hash_update($hs, self::substr($sig, 0, 32));
Note: See TracChangeset
for help on using the changeset viewer.