Changeset 52988
- Timestamp:
- 03/24/2022 03:18:31 PM (3 years ago)
- Location:
- trunk/src/wp-includes/sodium_compat/src
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/sodium_compat/src/Compat.php
r51591 r52988 3534 3534 } 3535 3535 } 3536 /** @var positive-int $numBytes */ 3536 3537 if (self::use_fallback('randombytes_buf')) { 3537 3538 return (string) call_user_func('\\Sodium\\randombytes_buf', $numBytes); 3539 } 3540 if ($numBytes < 0) { 3541 throw new SodiumException("Number of bytes must be a positive integer"); 3538 3542 } 3539 3543 return random_bytes($numBytes); -
trunk/src/wp-includes/sodium_compat/src/Core/BLAKE2b.php
r51002 r52988 51 51 public static function new64($high, $low) 52 52 { 53 if (PHP_INT_SIZE === 4) { 54 throw new SodiumException("Error, use 32-bit"); 55 } 53 56 $i64 = new SplFixedArray(2); 54 57 $i64[0] = $high & 0xffffffff; … … 87 90 protected static function add64($x, $y) 88 91 { 92 if (PHP_INT_SIZE === 4) { 93 throw new SodiumException("Error, use 32-bit"); 94 } 89 95 $l = ($x[1] + $y[1]) & 0xffffffff; 90 96 return self::new64( … … 120 126 protected static function xor64(SplFixedArray $x, SplFixedArray $y) 121 127 { 128 if (PHP_INT_SIZE === 4) { 129 throw new SodiumException("Error, use 32-bit"); 130 } 122 131 if (!is_numeric($x[0])) { 123 132 throw new SodiumException('x[0] is not an integer'); … … 148 157 public static function rotr64($x, $c) 149 158 { 159 if (PHP_INT_SIZE === 4) { 160 throw new SodiumException("Error, use 32-bit"); 161 } 150 162 if ($c >= 64) { 151 163 $c %= 64; … … 165 177 $c = 64 - $c; 166 178 179 /** @var int $c */ 167 180 if ($c < 32) { 168 /** @var int $h0 */169 181 $h0 = ((int) ($x[0]) << $c) | ( 170 182 ( … … 174 186 ) >> (32 - $c) 175 187 ); 176 /** @var int $l0 */177 188 $l0 = (int) ($x[1]) << $c; 178 189 } else { 179 /** @var int $h0 */180 190 $h0 = (int) ($x[1]) << ($c - 32); 181 191 } … … 185 195 186 196 if ($c1 < 32) { 187 /** @var int $h1 */188 197 $h1 = (int) ($x[0]) >> $c1; 189 /** @var int $l1 */190 198 $l1 = ((int) ($x[1]) >> $c1) | ((int) ($x[0]) & ((1 << $c1) - 1)) << (32 - $c1); 191 199 } else { 192 /** @var int $l1 */193 200 $l1 = (int) ($x[0]) >> ($c1 - 32); 194 201 } -
trunk/src/wp-includes/sodium_compat/src/Core/Curve25519.php
r51591 r52988 343 343 ParagonIE_Sodium_Core_Curve25519_Fe $g 344 344 ) { 345 // Ensure limbs aren't oversized. 346 $f = self::fe_normalize($f); 347 $g = self::fe_normalize($g); 345 348 $f0 = $f[0]; 346 349 $f1 = $f[1]; … … 477 480 $f9g8_19 = self::mul($g8_19, $f9, 25); 478 481 $f9g9_38 = self::mul($g9_19, $f9_2, 26); 482 479 483 $h0 = $f0g0 + $f1g9_38 + $f2g8_19 + $f3g7_38 + $f4g6_19 + $f5g5_38 + $f6g4_19 + $f7g3_38 + $f8g2_19 + $f9g1_38; 480 484 $h1 = $f0g1 + $f1g0 + $f2g9_19 + $f3g8_19 + $f4g7_19 + $f5g6_19 + $f6g5_19 + $f7g4_19 + $f8g3_19 + $f9g2_19; … … 531 535 $h0 -= $carry0 << 26; 532 536 533 return ParagonIE_Sodium_Core_Curve25519_Fe::fromArray( 534 array( 535 (int) $h0, 536 (int) $h1, 537 (int) $h2, 538 (int) $h3, 539 (int) $h4, 540 (int) $h5, 541 (int) $h6, 542 (int) $h7, 543 (int) $h8, 544 (int) $h9 537 return self::fe_normalize( 538 ParagonIE_Sodium_Core_Curve25519_Fe::fromArray( 539 array( 540 (int) $h0, 541 (int) $h1, 542 (int) $h2, 543 (int) $h3, 544 (int) $h4, 545 (int) $h5, 546 (int) $h6, 547 (int) $h7, 548 (int) $h8, 549 (int) $h9 550 ) 545 551 ) 546 552 ); … … 564 570 $h[$i] = -$f[$i]; 565 571 } 566 return $h;572 return self::fe_normalize($h); 567 573 } 568 574 … … 579 585 public static function fe_sq(ParagonIE_Sodium_Core_Curve25519_Fe $f) 580 586 { 587 $f = self::fe_normalize($f); 581 588 $f0 = (int) $f[0]; 582 589 $f1 = (int) $f[1]; … … 712 719 $h0 -= $carry0 << 26; 713 720 714 return ParagonIE_Sodium_Core_Curve25519_Fe::fromArray( 715 array( 716 (int) $h0, 717 (int) $h1, 718 (int) $h2, 719 (int) $h3, 720 (int) $h4, 721 (int) $h5, 722 (int) $h6, 723 (int) $h7, 724 (int) $h8, 725 (int) $h9 721 return self::fe_normalize( 722 ParagonIE_Sodium_Core_Curve25519_Fe::fromArray( 723 array( 724 (int) $h0, 725 (int) $h1, 726 (int) $h2, 727 (int) $h3, 728 (int) $h4, 729 (int) $h5, 730 (int) $h6, 731 (int) $h7, 732 (int) $h8, 733 (int) $h9 734 ) 726 735 ) 727 736 ); … … 741 750 public static function fe_sq2(ParagonIE_Sodium_Core_Curve25519_Fe $f) 742 751 { 752 $f = self::fe_normalize($f); 743 753 $f0 = (int) $f[0]; 744 754 $f1 = (int) $f[1]; … … 875 885 $h0 -= $carry0 << 26; 876 886 877 return ParagonIE_Sodium_Core_Curve25519_Fe::fromArray( 878 array( 879 (int) $h0, 880 (int) $h1, 881 (int) $h2, 882 (int) $h3, 883 (int) $h4, 884 (int) $h5, 885 (int) $h6, 886 (int) $h7, 887 (int) $h8, 888 (int) $h9 887 return self::fe_normalize( 888 ParagonIE_Sodium_Core_Curve25519_Fe::fromArray( 889 array( 890 (int) $h0, 891 (int) $h1, 892 (int) $h2, 893 (int) $h3, 894 (int) $h4, 895 (int) $h5, 896 (int) $h6, 897 (int) $h7, 898 (int) $h8, 899 (int) $h9 900 ) 889 901 ) 890 902 ); … … 959 971 public static function fe_pow22523(ParagonIE_Sodium_Core_Curve25519_Fe $z) 960 972 { 973 $z = self::fe_normalize($z); 961 974 # fe_sq(t0, z); 962 975 # fe_sq(t1, t0); … … 1086 1099 public static function fe_sub(ParagonIE_Sodium_Core_Curve25519_Fe $f, ParagonIE_Sodium_Core_Curve25519_Fe $g) 1087 1100 { 1088 return ParagonIE_Sodium_Core_Curve25519_Fe::fromArray( 1089 array( 1090 (int) ($f[0] - $g[0]), 1091 (int) ($f[1] - $g[1]), 1092 (int) ($f[2] - $g[2]), 1093 (int) ($f[3] - $g[3]), 1094 (int) ($f[4] - $g[4]), 1095 (int) ($f[5] - $g[5]), 1096 (int) ($f[6] - $g[6]), 1097 (int) ($f[7] - $g[7]), 1098 (int) ($f[8] - $g[8]), 1099 (int) ($f[9] - $g[9]) 1101 return self::fe_normalize( 1102 ParagonIE_Sodium_Core_Curve25519_Fe::fromArray( 1103 array( 1104 (int) ($f[0] - $g[0]), 1105 (int) ($f[1] - $g[1]), 1106 (int) ($f[2] - $g[2]), 1107 (int) ($f[3] - $g[3]), 1108 (int) ($f[4] - $g[4]), 1109 (int) ($f[5] - $g[5]), 1110 (int) ($f[6] - $g[6]), 1111 (int) ($f[7] - $g[7]), 1112 (int) ($f[8] - $g[8]), 1113 (int) ($f[9] - $g[9]) 1114 ) 1100 1115 ) 1101 1116 ); … … 2536 2551 $s21 = 2097151 & (self::load_3(self::substr($s, 55, 3)) >> 1); 2537 2552 $s22 = 2097151 & (self::load_4(self::substr($s, 57, 4)) >> 6); 2538 $s23 = (self::load_4(self::substr($s, 60, 4)) >> 3);2553 $s23 = 0x1fffffff & (self::load_4(self::substr($s, 60, 4)) >> 3); 2539 2554 2540 2555 $s11 += self::mul($s23, 666643, 20); … … 3783 3798 return self::intArrayToString($s_); 3784 3799 } 3800 3801 /** 3802 * Ensure limbs are less than 28 bits long to prevent float promotion. 3803 * 3804 * This uses a constant-time conditional swap under the hood. 3805 * 3806 * @param ParagonIE_Sodium_Core_Curve25519_Fe $f 3807 * @return ParagonIE_Sodium_Core_Curve25519_Fe 3808 */ 3809 public static function fe_normalize(ParagonIE_Sodium_Core_Curve25519_Fe $f) 3810 { 3811 $x = (PHP_INT_SIZE << 3) - 1; // 31 or 63 3812 3813 $g = self::fe_copy($f); 3814 for ($i = 0; $i < 10; ++$i) { 3815 $mask = -(($g[$i] >> $x) & 1); 3816 3817 /* 3818 * Get two candidate normalized values for $g[$i], depending on the sign of $g[$i]: 3819 */ 3820 $a = $g[$i] & 0x7ffffff; 3821 $b = -((-$g[$i]) & 0x7ffffff); 3822 3823 /* 3824 * Return the appropriate candidate value, based on the sign of the original input: 3825 * 3826 * The following is equivalent to this ternary: 3827 * 3828 * $g[$i] = (($g[$i] >> $x) & 1) ? $a : $b; 3829 * 3830 * Except what's written doesn't contain timing leaks. 3831 */ 3832 $g[$i] = ($a ^ (($a ^ $b) & $mask)); 3833 } 3834 return $g; 3835 } 3785 3836 } -
trunk/src/wp-includes/sodium_compat/src/Core/Util.php
r51591 r52988 459 459 /** @var array<int, int> $unpacked */ 460 460 $unpacked = unpack('V', $string); 461 return (int) ($unpacked[1] & 0xffffffff);461 return (int) $unpacked[1]; 462 462 } 463 463 … … 614 614 $high = 0; 615 615 /** @var int $low */ 616 $low = $num & 0xffffffff; 616 if (PHP_INT_SIZE === 4) { 617 $low = (int) $num; 618 } else { 619 $low = $num & 0xffffffff; 620 } 617 621 618 622 if ((+(abs($num))) >= 1) { -
trunk/src/wp-includes/sodium_compat/src/Core32/Curve25519.php
r46586 r52988 326 326 $f[9] = $f[9]->subInt64($carry9->shiftLeft(25)); 327 327 328 /** @var int $h0 */329 328 $h0 = $f[0]->toInt32()->toInt(); 330 /** @var int $h1 */331 329 $h1 = $f[1]->toInt32()->toInt(); 332 /** @var int $h2 */333 330 $h2 = $f[2]->toInt32()->toInt(); 334 /** @var int $h3 */335 331 $h3 = $f[3]->toInt32()->toInt(); 336 /** @var int $h4 */337 332 $h4 = $f[4]->toInt32()->toInt(); 338 /** @var int $h5 */339 333 $h5 = $f[5]->toInt32()->toInt(); 340 /** @var int $h6 */341 334 $h6 = $f[6]->toInt32()->toInt(); 342 /** @var int $h7 */343 335 $h7 = $f[7]->toInt32()->toInt(); 344 /** @var int $h8 */345 336 $h8 = $f[8]->toInt32()->toInt(); 346 /** @var int $h9 */347 337 $h9 = $f[9]->toInt32()->toInt(); 348 338 … … 419 409 $zero = str_repeat("\x00", 32); 420 410 } 421 /** @var string $str */422 411 $str = self::fe_tobytes($f); 423 412 /** @var string $zero */ … … 498 487 $g8_19 = $g8->mulInt(19, 5); 499 488 $g9_19 = $g9->mulInt(19, 5); 500 /** @var ParagonIE_Sodium_Core32_Int64 $f1_2 */501 489 $f1_2 = $f1->shiftLeft(1); 502 /** @var ParagonIE_Sodium_Core32_Int64 $f3_2 */503 490 $f3_2 = $f3->shiftLeft(1); 504 /** @var ParagonIE_Sodium_Core32_Int64 $f5_2 */505 491 $f5_2 = $f5->shiftLeft(1); 506 /** @var ParagonIE_Sodium_Core32_Int64 $f7_2 */507 492 $f7_2 = $f7->shiftLeft(1); 508 /** @var ParagonIE_Sodium_Core32_Int64 $f9_2 */509 493 $f9_2 = $f9->shiftLeft(1); 510 494 $f0g0 = $f0->mulInt64($g0, 27); … … 776 760 public static function fe_sq(ParagonIE_Sodium_Core32_Curve25519_Fe $f) 777 761 { 778 /** @var ParagonIE_Sodium_Core32_Int64 $f0 */779 762 $f0 = $f[0]->toInt64(); 780 /** @var ParagonIE_Sodium_Core32_Int64 $f1 */781 763 $f1 = $f[1]->toInt64(); 782 /** @var ParagonIE_Sodium_Core32_Int64 $f2 */783 764 $f2 = $f[2]->toInt64(); 784 /** @var ParagonIE_Sodium_Core32_Int64 $f3 */785 765 $f3 = $f[3]->toInt64(); 786 /** @var ParagonIE_Sodium_Core32_Int64 $f4 */787 766 $f4 = $f[4]->toInt64(); 788 /** @var ParagonIE_Sodium_Core32_Int64 $f5 */789 767 $f5 = $f[5]->toInt64(); 790 /** @var ParagonIE_Sodium_Core32_Int64 $f6 */791 768 $f6 = $f[6]->toInt64(); 792 /** @var ParagonIE_Sodium_Core32_Int64 $f7 */793 769 $f7 = $f[7]->toInt64(); 794 /** @var ParagonIE_Sodium_Core32_Int64 $f8 */795 770 $f8 = $f[8]->toInt64(); 796 /** @var ParagonIE_Sodium_Core32_Int64 $f9 */797 771 $f9 = $f[9]->toInt64(); 798 772 799 /** @var ParagonIE_Sodium_Core32_Int64 $f0_2 */800 773 $f0_2 = $f0->shiftLeft(1); 801 774 $f1_2 = $f1->shiftLeft(1); … … 811 784 $f8_19 = $f8->mulInt(19, 5); 812 785 $f9_38 = $f9->mulInt(38, 6); 813 /** @var ParagonIE_Sodium_Core32_Int64 $f0f0*/ 786 814 787 $f0f0 = $f0->mulInt64($f0, 28); 815 788 $f0f1_2 = $f0_2->mulInt64($f1, 28); … … 980 953 public static function fe_sq2(ParagonIE_Sodium_Core32_Curve25519_Fe $f) 981 954 { 982 /** @var ParagonIE_Sodium_Core32_Int64 $f0 */983 955 $f0 = $f[0]->toInt64(); 984 /** @var ParagonIE_Sodium_Core32_Int64 $f1 */985 956 $f1 = $f[1]->toInt64(); 986 /** @var ParagonIE_Sodium_Core32_Int64 $f2 */987 957 $f2 = $f[2]->toInt64(); 988 /** @var ParagonIE_Sodium_Core32_Int64 $f3 */989 958 $f3 = $f[3]->toInt64(); 990 /** @var ParagonIE_Sodium_Core32_Int64 $f4 */991 959 $f4 = $f[4]->toInt64(); 992 /** @var ParagonIE_Sodium_Core32_Int64 $f5 */993 960 $f5 = $f[5]->toInt64(); 994 /** @var ParagonIE_Sodium_Core32_Int64 $f6 */995 961 $f6 = $f[6]->toInt64(); 996 /** @var ParagonIE_Sodium_Core32_Int64 $f7 */997 962 $f7 = $f[7]->toInt64(); 998 /** @var ParagonIE_Sodium_Core32_Int64 $f8 */999 963 $f8 = $f[8]->toInt64(); 1000 /** @var ParagonIE_Sodium_Core32_Int64 $f9 */1001 964 $f9 = $f[9]->toInt64(); 1002 965 … … 1480 1443 static $d = null; 1481 1444 if (!$d) { 1482 /** @var ParagonIE_Sodium_Core32_Curve25519_Fe $d */1483 1445 $d = ParagonIE_Sodium_Core32_Curve25519_Fe::fromArray( 1484 1446 array( … … 1496 1458 ); 1497 1459 } 1460 /** @var ParagonIE_Sodium_Core32_Curve25519_Fe $d */ 1498 1461 1499 1462 # fe_frombytes(h->Y,s); … … 1834 1797 public static function equal($b, $c) 1835 1798 { 1836 return (int) ((($b ^ $c) - 1 & 0xffffffff) >> 31); 1799 $b0 = $b & 0xffff; 1800 $b1 = ($b >> 16) & 0xffff; 1801 $c0 = $c & 0xffff; 1802 $c1 = ($c >> 16) & 0xffff; 1803 1804 $d0 = (($b0 ^ $c0) - 1) >> 31; 1805 $d1 = (($b1 ^ $c1) - 1) >> 31; 1806 return ($d0 & $d1) & 1; 1837 1807 } 1838 1808 … … 1851 1821 } 1852 1822 /** @var string $char */ 1853 /** @var int $x */1854 1823 $x = self::chrToInt(self::substr($char, 0, 1)); 1855 1824 return (int) ($x >> 31); … … 1957 1926 1958 1927 $bnegative = self::negative($b); 1959 /** @var int $babs */1960 1928 $babs = $b - (((-$bnegative) & $b) << 1); 1961 1929 … … 1965 1933 $t, 1966 1934 $base[$pos][$i], 1967 self::equal($babs, $i + 1)1935 -self::equal($babs, $i + 1) 1968 1936 ); 1969 1937 } … … 2231 2199 for ($i = 0; $i < 63; ++$i) { 2232 2200 $e[$i] += $carry; 2233 /** @var int $carry */2234 2201 $carry = $e[$i] + 8; 2235 /** @var int $carry */2236 2202 $carry >>= 4; 2237 2203 $e[$i] -= $carry << 4; … … 3141 3107 public static function ge_mul_l(ParagonIE_Sodium_Core32_Curve25519_Ge_P3 $A) 3142 3108 { 3143 /** @var array<int, int> $aslide */3144 3109 $aslide = array( 3145 3110 13, 0, 0, 0, 0, -1, 0, 0, 0, 0, -11, 0, 0, 0, 0, 0, 0, -5, 0, 0, 0, -
trunk/src/wp-includes/sodium_compat/src/Core32/Curve25519/Fe.php
r51591 r52988 49 49 } else { 50 50 for ($i = 0; $i < $count; ++$i) { 51 if (!($array[$i] instanceof ParagonIE_Sodium_Core32_Int32)) { 52 throw new TypeError('Expected ParagonIE_Sodium_Core32_Int32'); 53 } 51 54 $array[$i]->overflow = 0; 52 55 $obj->offsetSet($i, $array[$i]); -
trunk/src/wp-includes/sodium_compat/src/Core32/Int32.php
r46586 r52988 139 139 { 140 140 /** @var int $hi */ 141 $hi = ($m >> 16) & 0xffff; 141 $hi = ((int) $m >> 16); 142 $hi &= 0xffff; 142 143 /** @var int $lo */ 143 $lo = ( $m & 0xffff);144 $lo = ((int) $m) & 0xffff; 144 145 return new ParagonIE_Sodium_Core32_Int32( 145 146 array( … … 169 170 $b_j = $b[$j]; 170 171 $product = ($a_i * $b_j) + $r[$i + $j]; 171 $carry = ( $product >> $baseLog2 & 0xffff);172 $r[$i + $j] = ( $product - (int) ($carry * $base)) & 0xffff;172 $carry = ((int) $product >> $baseLog2 & 0xffff); 173 $r[$i + $j] = ((int) $product - (int) ($carry * $base)) & 0xffff; 173 174 $r[$i + $j + 1] += $carry; 174 175 } -
trunk/src/wp-includes/sodium_compat/src/Core32/Int64.php
r46586 r52988 338 338 for ($j = 0; $j < $a_l; ++$j) { 339 339 $b_j = $b[$j]; 340 $product = ( $a_i * $b_j) + $r[$i + $j];341 $carry = ( $product >> $baseLog2& 0xffff);342 $r[$i + $j] = ( $product - (int) ($carry * $base)) & 0xffff;340 $product = (($a_i * $b_j) + $r[$i + $j]); 341 $carry = (((int) $product >> $baseLog2) & 0xffff); 342 $r[$i + $j] = ((int) $product - (int) ($carry * $base)) & 0xffff; 343 343 $r[$i + $j + 1] += $carry; 344 344 } -
trunk/src/wp-includes/sodium_compat/src/Core32/Poly1305/State.php
r46858 r52988 420 420 421 421 /** @var int $mask */ 422 $mask = (~$mask) & 0xffffffff;422 $mask = ~$mask; 423 423 424 424 $h0 = $h0->mask($mask)->orInt32($g0); -
trunk/src/wp-includes/sodium_compat/src/Core32/XChaCha20.php
r46586 r52988 62 62 ); 63 63 } 64 65 /** 66 * @internal You should not use this directly from another application 67 * 68 * @param string $message 69 * @param string $nonce 70 * @param string $key 71 * @param string $ic 72 * @return string 73 * @throws SodiumException 74 * @throws TypeError 75 */ 76 public static function ietfStreamXorIc($message, $nonce = '', $key = '', $ic = '') 77 { 78 return self::encryptBytes( 79 new ParagonIE_Sodium_Core32_ChaCha20_IetfCtx( 80 self::hChaCha20(self::substr($nonce, 0, 16), $key), 81 "\x00\x00\x00\x00" . self::substr($nonce, 16, 8), 82 $ic 83 ), 84 $message 85 ); 86 } 64 87 } -
trunk/src/wp-includes/sodium_compat/src/File.php
r51002 r52988 1155 1155 private static function sign_core32($filePath, $secretKey) 1156 1156 { 1157 /** @var int|bool $size */1158 1157 $size = filesize($filePath); 1159 1158 if (!is_int($size)) { 1160 1159 throw new SodiumException('Could not obtain the file size'); 1161 1160 } 1162 /** @var int $size */ 1163 1164 /** @var resource|bool $fp */ 1161 1165 1162 $fp = fopen($filePath, 'rb'); 1166 1163 if (!is_resource($fp)) { 1167 1164 throw new SodiumException('Could not open input file for reading'); 1168 1165 } 1169 /** @var resource $fp */1170 1166 1171 1167 /** @var string $az */ … … 1180 1176 $hs = self::updateHashWithFile($hs, $fp, $size); 1181 1177 1182 /** @var string $nonceHash */1183 1178 $nonceHash = hash_final($hs, true); 1184 1185 /** @var string $pk */1186 1179 $pk = self::substr($secretKey, 32, 32); 1187 1188 /** @var string $nonce */1189 1180 $nonce = ParagonIE_Sodium_Core32_Ed25519::sc_reduce($nonceHash) . self::substr($nonceHash, 32); 1190 1191 /** @var string $sig */1192 1181 $sig = ParagonIE_Sodium_Core32_Ed25519::ge_p3_tobytes( 1193 1182 ParagonIE_Sodium_Core32_Ed25519::ge_scalarmult_base($nonce) … … 1200 1189 $hs = self::updateHashWithFile($hs, $fp, $size); 1201 1190 1202 /** @var string $hramHash */1203 1191 $hramHash = hash_final($hs, true); 1204 1192 1205 /** @var string $hram */1206 1193 $hram = ParagonIE_Sodium_Core32_Ed25519::sc_reduce($hramHash); 1207 1194 1208 /** @var string $sigAfter */1209 1195 $sigAfter = ParagonIE_Sodium_Core32_Ed25519::sc_muladd($hram, $az, $nonce); 1210 1196 … … 1244 1230 throw new SodiumException('Signature is on too small of an order'); 1245 1231 } 1232 1246 1233 if ((self::chrToInt($sig[63]) & 224) !== 0) { 1247 1234 throw new SodiumException('Invalid signature');
Note: See TracChangeset
for help on using the changeset viewer.