Changeset 58752 for trunk/src/wp-includes/sodium_compat/lib/php72compat.php
- Timestamp:
- 07/18/2024 12:58:40 PM (6 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/sodium_compat/lib/php72compat.php
r55699 r58752 15 15 'BASE64_VARIANT_URLSAFE', 16 16 'BASE64_VARIANT_URLSAFE_NO_PADDING', 17 'CRYPTO_AEAD_AES256GCM_KEYBYTES', 18 'CRYPTO_AEAD_AES256GCM_NSECBYTES', 19 'CRYPTO_AEAD_AES256GCM_NPUBBYTES', 20 'CRYPTO_AEAD_AES256GCM_ABYTES', 17 21 'CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES', 18 22 'CRYPTO_AEAD_CHACHA20POLY1305_NSECBYTES', 19 23 'CRYPTO_AEAD_CHACHA20POLY1305_NPUBBYTES', 20 24 'CRYPTO_AEAD_CHACHA20POLY1305_ABYTES', 21 'CRYPTO_AEAD_AES256GCM_KEYBYTES',22 'CRYPTO_AEAD_AES256GCM_NSECBYTES',23 'CRYPTO_AEAD_AES256GCM_NPUBBYTES',24 'CRYPTO_AEAD_AES256GCM_ABYTES',25 25 'CRYPTO_AEAD_CHACHA20POLY1305_IETF_KEYBYTES', 26 26 'CRYPTO_AEAD_CHACHA20POLY1305_IETF_NSECBYTES', … … 116 116 * @throws SodiumException 117 117 */ 118 function sodium_add(&$string1, $string2) 119 { 118 function sodium_add( 119 #[\SensitiveParameter] 120 &$string1, 121 #[\SensitiveParameter] 122 $string2 123 ) { 120 124 ParagonIE_Sodium_Compat::add($string1, $string2); 121 125 } … … 131 135 * @throws TypeError 132 136 */ 133 function sodium_base642bin($string, $variant, $ignore ='') 134 { 137 function sodium_base642bin( 138 #[\SensitiveParameter] 139 $string, 140 $variant, 141 $ignore ='' 142 ) { 135 143 return ParagonIE_Sodium_Compat::base642bin($string, $variant, $ignore); 136 144 } … … 145 153 * @throws TypeError 146 154 */ 147 function sodium_bin2base64($string, $variant) 148 { 155 function sodium_bin2base64( 156 #[\SensitiveParameter] 157 $string, 158 $variant 159 ) { 149 160 return ParagonIE_Sodium_Compat::bin2base64($string, $variant); 150 161 } … … 158 169 * @throws TypeError 159 170 */ 160 function sodium_bin2hex($string) 161 { 171 function sodium_bin2hex( 172 #[\SensitiveParameter] 173 $string 174 ) { 162 175 return ParagonIE_Sodium_Compat::bin2hex($string); 163 176 } … … 172 185 * @throws TypeError 173 186 */ 174 function sodium_compare($string1, $string2) 175 { 187 function sodium_compare( 188 #[\SensitiveParameter] 189 $string1, 190 #[\SensitiveParameter] 191 $string2 192 ) { 176 193 return ParagonIE_Sodium_Compat::compare($string1, $string2); 177 194 } … … 186 203 * @return string|bool 187 204 */ 188 function sodium_crypto_aead_aes256gcm_decrypt($ciphertext, $additional_data, $nonce, $key) 189 { 205 function sodium_crypto_aead_aes256gcm_decrypt( 206 $ciphertext, 207 $additional_data, 208 $nonce, 209 #[\SensitiveParameter] 210 $key 211 ) { 190 212 try { 191 213 return ParagonIE_Sodium_Compat::crypto_aead_aes256gcm_decrypt( … … 216 238 * @throws TypeError 217 239 */ 218 function sodium_crypto_aead_aes256gcm_encrypt($message, $additional_data, $nonce, $key) 219 { 240 function sodium_crypto_aead_aes256gcm_encrypt( 241 #[\SensitiveParameter] 242 $message, 243 $additional_data, 244 $nonce, 245 #[\SensitiveParameter] 246 $key 247 ) { 220 248 return ParagonIE_Sodium_Compat::crypto_aead_aes256gcm_encrypt($message, $additional_data, $nonce, $key); 221 249 } … … 240 268 * @return string|bool 241 269 */ 242 function sodium_crypto_aead_chacha20poly1305_decrypt($ciphertext, $additional_data, $nonce, $key) 243 { 270 function sodium_crypto_aead_chacha20poly1305_decrypt( 271 $ciphertext, 272 $additional_data, 273 $nonce, 274 #[\SensitiveParameter] 275 $key 276 ) { 244 277 try { 245 278 return ParagonIE_Sodium_Compat::crypto_aead_chacha20poly1305_decrypt( … … 267 300 * @throws TypeError 268 301 */ 269 function sodium_crypto_aead_chacha20poly1305_encrypt($message, $additional_data, $nonce, $key) 270 { 302 function sodium_crypto_aead_chacha20poly1305_encrypt( 303 #[\SensitiveParameter] 304 $message, 305 $additional_data, 306 $nonce, 307 #[\SensitiveParameter] 308 $key 309 ) { 271 310 return ParagonIE_Sodium_Compat::crypto_aead_chacha20poly1305_encrypt( 272 311 $message, … … 297 336 * @return string|bool 298 337 */ 299 function sodium_crypto_aead_chacha20poly1305_ietf_decrypt($message, $additional_data, $nonce, $key) 300 { 338 function sodium_crypto_aead_chacha20poly1305_ietf_decrypt( 339 $message, 340 $additional_data, 341 $nonce, 342 #[\SensitiveParameter] 343 $key 344 ) { 301 345 try { 302 346 return ParagonIE_Sodium_Compat::crypto_aead_chacha20poly1305_ietf_decrypt( … … 324 368 * @throws TypeError 325 369 */ 326 function sodium_crypto_aead_chacha20poly1305_ietf_encrypt($message, $additional_data, $nonce, $key) 327 { 370 function sodium_crypto_aead_chacha20poly1305_ietf_encrypt( 371 #[\SensitiveParameter] 372 $message, 373 $additional_data, 374 $nonce, 375 #[\SensitiveParameter] 376 $key 377 ) { 328 378 return ParagonIE_Sodium_Compat::crypto_aead_chacha20poly1305_ietf_encrypt( 329 379 $message, … … 354 404 * @return string|bool 355 405 */ 356 function sodium_crypto_aead_xchacha20poly1305_ietf_decrypt($ciphertext, $additional_data, $nonce, $key) 357 { 406 function sodium_crypto_aead_xchacha20poly1305_ietf_decrypt( 407 $ciphertext, 408 $additional_data, 409 $nonce, 410 #[\SensitiveParameter] 411 $key 412 ) { 358 413 try { 359 414 return ParagonIE_Sodium_Compat::crypto_aead_xchacha20poly1305_ietf_decrypt( … … 383 438 */ 384 439 function sodium_crypto_aead_xchacha20poly1305_ietf_encrypt( 440 #[\SensitiveParameter] 385 441 $message, 386 442 $additional_data, 387 443 $nonce, 444 #[\SensitiveParameter] 388 445 $key 389 446 ) { … … 417 474 * @throws TypeError 418 475 */ 419 function sodium_crypto_auth($message, $key) 420 { 476 function sodium_crypto_auth( 477 $message, 478 #[\SensitiveParameter] 479 $key 480 ) { 421 481 return ParagonIE_Sodium_Compat::crypto_auth($message, $key); 422 482 } … … 443 503 * @throws TypeError 444 504 */ 445 function sodium_crypto_auth_verify($mac, $message, $key) 446 { 505 function sodium_crypto_auth_verify( 506 $mac, 507 $message, 508 #[\SensitiveParameter] 509 $key 510 ) { 447 511 return ParagonIE_Sodium_Compat::crypto_auth_verify($mac, $message, $key); 448 512 } … … 458 522 * @throws TypeError 459 523 */ 460 function sodium_crypto_box($message, $nonce, $key_pair) 461 { 524 function sodium_crypto_box( 525 #[\SensitiveParameter] 526 $message, 527 $nonce, 528 #[\SensitiveParameter] 529 $key_pair 530 ) { 462 531 return ParagonIE_Sodium_Compat::crypto_box($message, $nonce, $key_pair); 463 532 } … … 484 553 * @throws TypeError 485 554 */ 486 function sodium_crypto_box_keypair_from_secretkey_and_publickey($secret_key, $public_key) 487 { 555 function sodium_crypto_box_keypair_from_secretkey_and_publickey( 556 #[\SensitiveParameter] 557 $secret_key, 558 $public_key 559 ) { 488 560 return ParagonIE_Sodium_Compat::crypto_box_keypair_from_secretkey_and_publickey($secret_key, $public_key); 489 561 } … … 497 569 * @return string|bool 498 570 */ 499 function sodium_crypto_box_open($ciphertext, $nonce, $key_pair) 500 { 571 function sodium_crypto_box_open( 572 $ciphertext, 573 $nonce, 574 #[\SensitiveParameter] 575 $key_pair 576 ) { 501 577 try { 502 578 return ParagonIE_Sodium_Compat::crypto_box_open($ciphertext, $nonce, $key_pair); … … 516 592 * @throws TypeError 517 593 */ 518 function sodium_crypto_box_publickey($key_pair) 519 { 594 function sodium_crypto_box_publickey( 595 #[\SensitiveParameter] 596 $key_pair 597 ) { 520 598 return ParagonIE_Sodium_Compat::crypto_box_publickey($key_pair); 521 599 } … … 529 607 * @throws TypeError 530 608 */ 531 function sodium_crypto_box_publickey_from_secretkey($secret_key) 532 { 609 function sodium_crypto_box_publickey_from_secretkey( 610 #[\SensitiveParameter] 611 $secret_key 612 ) { 533 613 return ParagonIE_Sodium_Compat::crypto_box_publickey_from_secretkey($secret_key); 534 614 } … … 543 623 * @throws TypeError 544 624 */ 545 function sodium_crypto_box_seal($message, $public_key) 546 { 625 function sodium_crypto_box_seal( 626 #[\SensitiveParameter] 627 $message, 628 $public_key 629 ) { 547 630 return ParagonIE_Sodium_Compat::crypto_box_seal($message, $public_key); 548 631 } … … 556 639 * @throws SodiumException 557 640 */ 558 function sodium_crypto_box_seal_open($message, $key_pair) 559 { 641 function sodium_crypto_box_seal_open( 642 $message, 643 #[\SensitiveParameter] 644 $key_pair 645 ) { 560 646 try { 561 647 return ParagonIE_Sodium_Compat::crypto_box_seal_open($message, $key_pair); … … 576 662 * @throws TypeError 577 663 */ 578 function sodium_crypto_box_secretkey($key_pair) 579 { 664 function sodium_crypto_box_secretkey( 665 #[\SensitiveParameter] 666 $key_pair 667 ) { 580 668 return ParagonIE_Sodium_Compat::crypto_box_secretkey($key_pair); 581 669 } … … 589 677 * @throws TypeError 590 678 */ 591 function sodium_crypto_box_seed_keypair($seed) 592 { 679 function sodium_crypto_box_seed_keypair( 680 #[\SensitiveParameter] 681 $seed 682 ) { 593 683 return ParagonIE_Sodium_Compat::crypto_box_seed_keypair($seed); 594 684 } … … 604 694 * @throws TypeError 605 695 */ 606 function sodium_crypto_generichash($message, $key = null, $length = 32) 607 { 696 function sodium_crypto_generichash( 697 $message, 698 #[\SensitiveParameter] 699 $key = null, 700 $length = 32 701 ) { 608 702 return ParagonIE_Sodium_Compat::crypto_generichash($message, $key, $length); 609 703 } … … 632 726 * @throws TypeError 633 727 */ 634 function sodium_crypto_generichash_init($key = null, $length = 32) 635 { 728 function sodium_crypto_generichash_init( 729 #[\SensitiveParameter] 730 $key = null, 731 $length = 32 732 ) { 636 733 return ParagonIE_Sodium_Compat::crypto_generichash_init($key, $length); 637 734 } … … 657 754 * @throws TypeError 658 755 */ 659 function sodium_crypto_generichash_update(&$state, $message = '') 660 { 756 function sodium_crypto_generichash_update( 757 #[\SensitiveParameter] 758 &$state, 759 $message = '' 760 ) { 661 761 ParagonIE_Sodium_Compat::crypto_generichash_update($state, $message); 662 762 } … … 683 783 * @throws Exception 684 784 */ 685 function sodium_crypto_kdf_derive_from_key($subkey_length, $subkey_id, $context, $key) 686 { 785 function sodium_crypto_kdf_derive_from_key( 786 $subkey_length, 787 $subkey_id, 788 $context, 789 #[\SensitiveParameter] 790 $key 791 ) { 687 792 return ParagonIE_Sodium_Compat::crypto_kdf_derive_from_key( 688 793 $subkey_length, … … 704 809 * @throws TypeError 705 810 */ 706 function sodium_crypto_kx($my_secret, $their_public, $client_public, $server_public) 707 { 811 function sodium_crypto_kx( 812 #[\SensitiveParameter] 813 $my_secret, 814 $their_public, 815 $client_public, 816 $server_public 817 ) { 708 818 return ParagonIE_Sodium_Compat::crypto_kx( 709 819 $my_secret, … … 720 830 * @throws Exception 721 831 */ 722 function sodium_crypto_kx_seed_keypair($seed) 723 { 832 function sodium_crypto_kx_seed_keypair( 833 #[\SensitiveParameter] 834 $seed 835 ) { 724 836 return ParagonIE_Sodium_Compat::crypto_kx_seed_keypair($seed); 725 837 } … … 742 854 * @throws SodiumException 743 855 */ 744 function sodium_crypto_kx_client_session_keys($client_key_pair, $server_key) 745 { 856 function sodium_crypto_kx_client_session_keys( 857 #[\SensitiveParameter] 858 $client_key_pair, 859 $server_key 860 ) { 746 861 return ParagonIE_Sodium_Compat::crypto_kx_client_session_keys($client_key_pair, $server_key); 747 862 } … … 754 869 * @throws SodiumException 755 870 */ 756 function sodium_crypto_kx_server_session_keys($server_key_pair, $client_key) 757 { 871 function sodium_crypto_kx_server_session_keys( 872 #[\SensitiveParameter] 873 $server_key_pair, 874 $client_key 875 ) { 758 876 return ParagonIE_Sodium_Compat::crypto_kx_server_session_keys($server_key_pair, $client_key); 759 877 } … … 765 883 * @throws Exception 766 884 */ 767 function sodium_crypto_kx_secretkey($key_pair) 768 { 885 function sodium_crypto_kx_secretkey( 886 #[\SensitiveParameter] 887 $key_pair 888 ) { 769 889 return ParagonIE_Sodium_Compat::crypto_kx_secretkey($key_pair); 770 890 } … … 776 896 * @throws Exception 777 897 */ 778 function sodium_crypto_kx_publickey($key_pair) 779 { 898 function sodium_crypto_kx_publickey( 899 #[\SensitiveParameter] 900 $key_pair 901 ) { 780 902 return ParagonIE_Sodium_Compat::crypto_kx_publickey($key_pair); 781 903 } … … 794 916 * @throws TypeError 795 917 */ 796 function sodium_crypto_pwhash($length, $passwd, $salt, $opslimit, $memlimit, $algo = null) 797 { 918 function sodium_crypto_pwhash( 919 $length, 920 #[\SensitiveParameter] 921 $passwd, 922 $salt, 923 $opslimit, 924 $memlimit, 925 $algo = null 926 ) { 798 927 return ParagonIE_Sodium_Compat::crypto_pwhash($length, $passwd, $salt, $opslimit, $memlimit, $algo); 799 928 } … … 809 938 * @throws TypeError 810 939 */ 811 function sodium_crypto_pwhash_str($passwd, $opslimit, $memlimit) 812 { 940 function sodium_crypto_pwhash_str( 941 #[\SensitiveParameter] 942 $passwd, 943 $opslimit, 944 $memlimit 945 ) { 813 946 return ParagonIE_Sodium_Compat::crypto_pwhash_str($passwd, $opslimit, $memlimit); 814 947 } … … 824 957 * @throws SodiumException 825 958 */ 826 function sodium_crypto_pwhash_str_needs_rehash($hash, $opslimit, $memlimit) 827 { 959 function sodium_crypto_pwhash_str_needs_rehash( 960 #[\SensitiveParameter] 961 $hash, 962 $opslimit, 963 $memlimit 964 ) { 828 965 return ParagonIE_Sodium_Compat::crypto_pwhash_str_needs_rehash($hash, $opslimit, $memlimit); 829 966 } … … 838 975 * @throws TypeError 839 976 */ 840 function sodium_crypto_pwhash_str_verify($passwd, $hash) 841 { 977 function sodium_crypto_pwhash_str_verify( 978 #[\SensitiveParameter] 979 $passwd, 980 #[\SensitiveParameter] 981 $hash 982 ) { 842 983 return ParagonIE_Sodium_Compat::crypto_pwhash_str_verify($passwd, $hash); 843 984 } … … 855 996 * @throws TypeError 856 997 */ 857 function sodium_crypto_pwhash_scryptsalsa208sha256($length, $passwd, $salt, $opslimit, $memlimit) 858 { 998 function sodium_crypto_pwhash_scryptsalsa208sha256( 999 $length, 1000 #[\SensitiveParameter] 1001 $passwd, 1002 $salt, 1003 $opslimit, 1004 $memlimit 1005 ) { 859 1006 return ParagonIE_Sodium_Compat::crypto_pwhash_scryptsalsa208sha256( 860 1007 $length, … … 876 1023 * @throws TypeError 877 1024 */ 878 function sodium_crypto_pwhash_scryptsalsa208sha256_str($passwd, $opslimit, $memlimit) 879 { 1025 function sodium_crypto_pwhash_scryptsalsa208sha256_str( 1026 #[\SensitiveParameter] 1027 $passwd, 1028 $opslimit, 1029 $memlimit 1030 ) { 880 1031 return ParagonIE_Sodium_Compat::crypto_pwhash_scryptsalsa208sha256_str($passwd, $opslimit, $memlimit); 881 1032 } … … 890 1041 * @throws TypeError 891 1042 */ 892 function sodium_crypto_pwhash_scryptsalsa208sha256_str_verify($passwd, $hash) 893 { 1043 function sodium_crypto_pwhash_scryptsalsa208sha256_str_verify( 1044 #[\SensitiveParameter] 1045 $passwd, 1046 #[\SensitiveParameter] 1047 $hash 1048 ) { 894 1049 return ParagonIE_Sodium_Compat::crypto_pwhash_scryptsalsa208sha256_str_verify($passwd, $hash); 895 1050 } … … 904 1059 * @throws TypeError 905 1060 */ 906 function sodium_crypto_scalarmult($n, $p) 907 { 1061 function sodium_crypto_scalarmult( 1062 #[\SensitiveParameter] 1063 $n, 1064 $p 1065 ) { 908 1066 return ParagonIE_Sodium_Compat::crypto_scalarmult($n, $p); 909 1067 } … … 917 1075 * @throws TypeError 918 1076 */ 919 function sodium_crypto_scalarmult_base($n) 920 { 1077 function sodium_crypto_scalarmult_base( 1078 #[\SensitiveParameter] 1079 $n 1080 ) { 921 1081 return ParagonIE_Sodium_Compat::crypto_scalarmult_base($n); 922 1082 } … … 932 1092 * @throws TypeError 933 1093 */ 934 function sodium_crypto_secretbox($message, $nonce, $key) 935 { 1094 function sodium_crypto_secretbox( 1095 #[\SensitiveParameter] 1096 $message, 1097 $nonce, 1098 #[\SensitiveParameter] 1099 $key 1100 ) { 936 1101 return ParagonIE_Sodium_Compat::crypto_secretbox($message, $nonce, $key); 937 1102 } … … 956 1121 * @return string|bool 957 1122 */ 958 function sodium_crypto_secretbox_open($ciphertext, $nonce, $key) 959 { 1123 function sodium_crypto_secretbox_open( 1124 $ciphertext, 1125 $nonce, 1126 #[\SensitiveParameter] 1127 $key 1128 ) { 960 1129 try { 961 1130 return ParagonIE_Sodium_Compat::crypto_secretbox_open($ciphertext, $nonce, $key); … … 973 1142 * @throws SodiumException 974 1143 */ 975 function sodium_crypto_secretstream_xchacha20poly1305_init_push($key) 976 { 1144 function sodium_crypto_secretstream_xchacha20poly1305_init_push( 1145 #[\SensitiveParameter] 1146 $key 1147 ) { 977 1148 return ParagonIE_Sodium_Compat::crypto_secretstream_xchacha20poly1305_init_push($key); 978 1149 } … … 988 1159 */ 989 1160 function sodium_crypto_secretstream_xchacha20poly1305_push( 1161 #[\SensitiveParameter] 990 1162 &$state, 1163 #[\SensitiveParameter] 991 1164 $message, 992 1165 $additional_data = '', … … 1008 1181 * @throws Exception 1009 1182 */ 1010 function sodium_crypto_secretstream_xchacha20poly1305_init_pull($header, $key) 1011 { 1183 function sodium_crypto_secretstream_xchacha20poly1305_init_pull( 1184 $header, 1185 #[\SensitiveParameter] 1186 $key 1187 ) { 1012 1188 return ParagonIE_Sodium_Compat::crypto_secretstream_xchacha20poly1305_init_pull($header, $key); 1013 1189 } … … 1021 1197 * @throws SodiumException 1022 1198 */ 1023 function sodium_crypto_secretstream_xchacha20poly1305_pull(&$state, $ciphertext, $additional_data = '') 1024 { 1199 function sodium_crypto_secretstream_xchacha20poly1305_pull( 1200 #[\SensitiveParameter] 1201 &$state, 1202 $ciphertext, 1203 $additional_data = '' 1204 ) { 1025 1205 return ParagonIE_Sodium_Compat::crypto_secretstream_xchacha20poly1305_pull( 1026 1206 $state, … … 1036 1216 * @throws SodiumException 1037 1217 */ 1038 function sodium_crypto_secretstream_xchacha20poly1305_rekey(&$state) 1039 { 1218 function sodium_crypto_secretstream_xchacha20poly1305_rekey( 1219 #[\SensitiveParameter] 1220 &$state 1221 ) { 1040 1222 ParagonIE_Sodium_Compat::crypto_secretstream_xchacha20poly1305_rekey($state); 1041 1223 } … … 1060 1242 * @throws TypeError 1061 1243 */ 1062 function sodium_crypto_shorthash($message, $key = '') 1063 { 1244 function sodium_crypto_shorthash( 1245 $message, 1246 #[\SensitiveParameter] 1247 $key = '' 1248 ) { 1064 1249 return ParagonIE_Sodium_Compat::crypto_shorthash($message, $key); 1065 1250 } … … 1085 1270 * @throws TypeError 1086 1271 */ 1087 function sodium_crypto_sign($message, $secret_key) 1088 { 1272 function sodium_crypto_sign( 1273 $message, 1274 #[\SensitiveParameter] 1275 $secret_key 1276 ) { 1089 1277 return ParagonIE_Sodium_Compat::crypto_sign($message, $secret_key); 1090 1278 } … … 1099 1287 * @throws TypeError 1100 1288 */ 1101 function sodium_crypto_sign_detached($message, $secret_key) 1102 { 1289 function sodium_crypto_sign_detached( 1290 $message, 1291 #[\SensitiveParameter] 1292 $secret_key 1293 ) { 1103 1294 return ParagonIE_Sodium_Compat::crypto_sign_detached($message, $secret_key); 1104 1295 } … … 1113 1304 * @throws TypeError 1114 1305 */ 1115 function sodium_crypto_sign_keypair_from_secretkey_and_publickey($secret_key, $public_key) 1116 { 1306 function sodium_crypto_sign_keypair_from_secretkey_and_publickey( 1307 #[\SensitiveParameter] 1308 $secret_key, 1309 $public_key 1310 ) { 1117 1311 return ParagonIE_Sodium_Compat::crypto_sign_keypair_from_secretkey_and_publickey($secret_key, $public_key); 1118 1312 } … … 1156 1350 * @throws TypeError 1157 1351 */ 1158 function sodium_crypto_sign_publickey($key_pair) 1159 { 1352 function sodium_crypto_sign_publickey( 1353 #[\SensitiveParameter] 1354 $key_pair 1355 ) { 1160 1356 return ParagonIE_Sodium_Compat::crypto_sign_publickey($key_pair); 1161 1357 } … … 1169 1365 * @throws TypeError 1170 1366 */ 1171 function sodium_crypto_sign_publickey_from_secretkey($secret_key) 1172 { 1367 function sodium_crypto_sign_publickey_from_secretkey( 1368 #[\SensitiveParameter] 1369 $secret_key 1370 ) { 1173 1371 return ParagonIE_Sodium_Compat::crypto_sign_publickey_from_secretkey($secret_key); 1174 1372 } … … 1182 1380 * @throws TypeError 1183 1381 */ 1184 function sodium_crypto_sign_secretkey($key_pair) 1185 { 1382 function sodium_crypto_sign_secretkey( 1383 #[\SensitiveParameter] 1384 $key_pair 1385 ) { 1186 1386 return ParagonIE_Sodium_Compat::crypto_sign_secretkey($key_pair); 1187 1387 } … … 1195 1395 * @throws TypeError 1196 1396 */ 1197 function sodium_crypto_sign_seed_keypair($seed) 1198 { 1397 function sodium_crypto_sign_seed_keypair( 1398 #[\SensitiveParameter] 1399 $seed 1400 ) { 1199 1401 return ParagonIE_Sodium_Compat::crypto_sign_seed_keypair($seed); 1200 1402 } … … 1236 1438 * @throws TypeError 1237 1439 */ 1238 function sodium_crypto_sign_ed25519_sk_to_curve25519($secret_key) 1239 { 1440 function sodium_crypto_sign_ed25519_sk_to_curve25519( 1441 #[\SensitiveParameter] 1442 $secret_key 1443 ) { 1240 1444 return ParagonIE_Sodium_Compat::crypto_sign_ed25519_sk_to_curve25519($secret_key); 1241 1445 } … … 1251 1455 * @throws TypeError 1252 1456 */ 1253 function sodium_crypto_stream($length, $nonce, $key) 1254 { 1457 function sodium_crypto_stream( 1458 $length, 1459 $nonce, 1460 #[\SensitiveParameter] 1461 $key 1462 ) { 1255 1463 return ParagonIE_Sodium_Compat::crypto_stream($length, $nonce, $key); 1256 1464 } … … 1277 1485 * @throws TypeError 1278 1486 */ 1279 function sodium_crypto_stream_xor($message, $nonce, $key) 1280 { 1487 function sodium_crypto_stream_xor( 1488 #[\SensitiveParameter] 1489 $message, 1490 $nonce, 1491 #[\SensitiveParameter] 1492 $key 1493 ) { 1281 1494 return ParagonIE_Sodium_Compat::crypto_stream_xor($message, $nonce, $key); 1282 1495 } … … 1292 1505 * @throws TypeError 1293 1506 */ 1294 function sodium_hex2bin($string, $ignore = '') 1295 { 1507 function sodium_hex2bin( 1508 #[\SensitiveParameter] 1509 $string, 1510 $ignore = '' 1511 ) { 1296 1512 return ParagonIE_Sodium_Compat::hex2bin($string, $ignore); 1297 1513 } … … 1305 1521 * @throws TypeError 1306 1522 */ 1307 function sodium_increment(&$string) 1308 { 1523 function sodium_increment( 1524 #[\SensitiveParameter] 1525 &$string 1526 ) { 1309 1527 ParagonIE_Sodium_Compat::increment($string); 1310 1528 } … … 1349 1567 * @throws TypeError 1350 1568 */ 1351 function sodium_memcmp($string1, $string2) 1352 { 1569 function sodium_memcmp( 1570 #[\SensitiveParameter] 1571 $string1, 1572 #[\SensitiveParameter] 1573 $string2 1574 ) { 1353 1575 return ParagonIE_Sodium_Compat::memcmp($string1, $string2); 1354 1576 } … … 1364 1586 * @psalm-suppress ReferenceConstraintViolation 1365 1587 */ 1366 function sodium_memzero(&$string) 1367 { 1588 function sodium_memzero( 1589 #[\SensitiveParameter] 1590 &$string 1591 ) { 1368 1592 ParagonIE_Sodium_Compat::memzero($string); 1369 1593 } … … 1378 1602 * @throws TypeError 1379 1603 */ 1380 function sodium_pad($unpadded, $block_size) 1381 { 1604 function sodium_pad( 1605 #[\SensitiveParameter] 1606 $unpadded, 1607 $block_size 1608 ) { 1382 1609 return ParagonIE_Sodium_Compat::pad($unpadded, $block_size, true); 1383 1610 } … … 1392 1619 * @throws TypeError 1393 1620 */ 1394 function sodium_unpad($padded, $block_size) 1395 { 1621 function sodium_unpad( 1622 #[\SensitiveParameter] 1623 $padded, 1624 $block_size 1625 ) { 1396 1626 return ParagonIE_Sodium_Compat::unpad($padded, $block_size, true); 1397 1627 }
Note: See TracChangeset
for help on using the changeset viewer.