Version Description
- February 5, 2019 =
- Improvement: Integrated Wordfence with Wordfence Central, a new service allowing you to manage multiple Wordfence installations from a single interface.
- Improvement: Added a help link to the mode display when a host disabling Live Traffic is active.
- Improvement: Added an option for whitelisting ManageWP in "Whitelisted Services".
- Fix: Enqueued fonts used in admin notices on all admin pages.
- Fix: Change false positive user-reports link to use https.
- Fix: Fix reference to non-existent function when registering menus.
Download this release
Release Info
Developer | wfmatt |
Plugin | Wordfence Security – Firewall & Malware Scan |
Version | 7.2.1 |
Comparing to | |
See all releases |
Code changes from version 7.1.20 to 7.2.1
- css/{activity-report-widget.1546968199.css → activity-report-widget.1549315000.css} +0 -0
- css/{diff.1546968199.css → diff.1549315000.css} +0 -0
- css/{dt_table.1546968199.css → dt_table.1549315000.css} +0 -0
- css/{fullLog.1546968199.css → fullLog.1549315000.css} +0 -0
- css/{iptraf.1546968199.css → iptraf.1549315000.css} +0 -0
- css/{jquery-ui-timepicker-addon.1546968199.css → jquery-ui-timepicker-addon.1549315000.css} +0 -0
- css/{jquery-ui.min.1546968199.css → jquery-ui.min.1549315000.css} +0 -0
- css/{jquery-ui.structure.min.1546968199.css → jquery-ui.structure.min.1549315000.css} +0 -0
- css/{jquery-ui.theme.min.1546968199.css → jquery-ui.theme.min.1549315000.css} +0 -0
- css/main.1546968199.css +0 -1
- css/main.1549315000.css +1 -0
- css/{phpinfo.1546968199.css → phpinfo.1549315000.css} +0 -0
- css/{wf-adminbar.1546968199.css → wf-adminbar.1549315000.css} +0 -0
- css/{wf-colorbox.1546968199.css → wf-colorbox.1549315000.css} +0 -0
- css/{wf-font-awesome.1546968199.css → wf-font-awesome.1549315000.css} +0 -0
- css/wf-global.1549315000.css +1 -0
- css/{wf-ionicons.1546968199.css → wf-ionicons.1549315000.css} +0 -0
- css/{wf-onboarding.1546968199.css → wf-onboarding.1549315000.css} +0 -0
- css/{wf-roboto-font.1546968199.css → wf-roboto-font.1549315000.css} +0 -0
- css/{wfselect2.min.1546968199.css → wfselect2.min.1549315000.css} +0 -0
- css/{wordfenceBox.1546968199.css → wordfenceBox.1549315000.css} +0 -0
- images/wf-central-logo.svg +1 -0
- js/{Chart.bundle.min.1546968199.js → Chart.bundle.min.1549315000.js} +0 -0
- js/{admin.1546968199.js → admin.1549315000.js} +2 -2
- js/{admin.ajaxWatcher.1546968199.js → admin.ajaxWatcher.1549315000.js} +0 -0
- js/{admin.liveTraffic.1546968199.js → admin.liveTraffic.1549315000.js} +0 -0
- js/{date.1546968199.js → date.1549315000.js} +0 -0
- js/{jquery-ui-timepicker-addon.1546968199.js → jquery-ui-timepicker-addon.1549315000.js} +0 -0
- js/{jquery.colorbox-min.1546968199.js → jquery.colorbox-min.1549315000.js} +0 -0
- js/{jquery.colorbox.1546968199.js → jquery.colorbox.1549315000.js} +0 -0
- js/{jquery.dataTables.min.1546968199.js → jquery.dataTables.min.1549315000.js} +0 -0
- js/{jquery.qrcode.min.1546968199.js → jquery.qrcode.min.1549315000.js} +0 -0
- js/{jquery.tmpl.min.1546968199.js → jquery.tmpl.min.1549315000.js} +0 -0
- js/{jquery.tools.min.1546968199.js → jquery.tools.min.1549315000.js} +0 -0
- js/{knockout-3.3.0.1546968199.js → knockout-3.3.0.1549315000.js} +0 -0
- js/{perf.1546968199.js → perf.1549315000.js} +0 -0
- js/{wfdashboard.1546968199.js → wfdashboard.1549315000.js} +0 -0
- js/{wfdropdown.1546968199.js → wfdropdown.1549315000.js} +0 -0
- js/{wfglobal.1546968199.js → wfglobal.1549315000.js} +0 -0
- js/{wfpopover.1546968199.js → wfpopover.1549315000.js} +0 -0
- js/{wfselect2.min.1546968199.js → wfselect2.min.1549315000.js} +0 -0
- lib/dashboard/widget_notifications.php +64 -2
- lib/email_newIssues.php +36 -29
- lib/menu_options.php +1 -3
- lib/menu_tools_diagnostic.php +15 -51
- lib/menu_tools_livetraffic.php +2 -2
- lib/menu_wordfence_central.php +287 -0
- lib/rest-api/wfRESTAuthenticationController.php +179 -0
- lib/rest-api/wfRESTBaseController.php +87 -0
- lib/rest-api/wfRESTConfigController.php +244 -0
- lib/rest-api/wfRESTScanController.php +163 -0
- lib/wfCentralAPI.php +469 -0
- lib/wfConfig.php +20 -9
- lib/wfDashboard.php +15 -1
- lib/wfIPWhitelist.php +1 -0
- lib/wfIssues.php +184 -30
- lib/wfJWT.php +237 -0
- lib/wfScanEngine.php +41 -31
- lib/wfUtils.php +21 -0
- lib/wordfenceClass.php +346 -7
- lib/wordfenceConstants.php +4 -1
- lib/wordfenceHash.php +8 -8
- lib/wordfenceScanner.php +6 -6
- models/scanner/wfScanner.php +7 -0
- readme.txt +15 -1
- vendor/composer/autoload_files.php +11 -0
- vendor/paragonie/random_compat/LICENSE +22 -0
- vendor/paragonie/random_compat/dist/random_compat.phar.pubkey +5 -0
- vendor/paragonie/random_compat/dist/random_compat.phar.pubkey.asc +11 -0
- vendor/paragonie/random_compat/lib/byte_safe_strings.php +181 -0
- vendor/paragonie/random_compat/lib/cast_to_int.php +75 -0
- vendor/paragonie/random_compat/lib/error_polyfill.php +49 -0
- vendor/paragonie/random_compat/lib/random.php +225 -0
- vendor/paragonie/random_compat/lib/random_bytes_com_dotnet.php +88 -0
- vendor/paragonie/random_compat/lib/random_bytes_dev_urandom.php +167 -0
- vendor/paragonie/random_compat/lib/random_bytes_libsodium.php +88 -0
- vendor/paragonie/random_compat/lib/random_bytes_libsodium_legacy.php +92 -0
- vendor/paragonie/random_compat/lib/random_bytes_mcrypt.php +77 -0
- vendor/paragonie/random_compat/lib/random_int.php +190 -0
- vendor/paragonie/random_compat/psalm-autoload.php +9 -0
- vendor/paragonie/sodium_compat/LICENSE +21 -0
- vendor/paragonie/sodium_compat/autoload-fast.php +4 -0
- vendor/paragonie/sodium_compat/autoload-pedantic.php +6 -0
- vendor/paragonie/sodium_compat/autoload.php +49 -0
- vendor/paragonie/sodium_compat/lib/constants.php +50 -0
- vendor/paragonie/sodium_compat/lib/namespaced.php +46 -0
- vendor/paragonie/sodium_compat/lib/php72compat.php +1052 -0
- vendor/paragonie/sodium_compat/lib/sodium_compat.php +835 -0
- vendor/paragonie/sodium_compat/namespaced/Compat.php +7 -0
- vendor/paragonie/sodium_compat/namespaced/Core/BLAKE2b.php +7 -0
- vendor/paragonie/sodium_compat/namespaced/Core/ChaCha20.php +7 -0
- vendor/paragonie/sodium_compat/namespaced/Core/ChaCha20/Ctx.php +7 -0
- vendor/paragonie/sodium_compat/namespaced/Core/ChaCha20/IetfCtx.php +7 -0
- vendor/paragonie/sodium_compat/namespaced/Core/Curve25519.php +7 -0
- vendor/paragonie/sodium_compat/namespaced/Core/Curve25519/Fe.php +7 -0
- vendor/paragonie/sodium_compat/namespaced/Core/Curve25519/Ge/Cached.php +7 -0
- vendor/paragonie/sodium_compat/namespaced/Core/Curve25519/Ge/P1p1.php +7 -0
- vendor/paragonie/sodium_compat/namespaced/Core/Curve25519/Ge/P2.php +7 -0
- vendor/paragonie/sodium_compat/namespaced/Core/Curve25519/Ge/P3.php +7 -0
- vendor/paragonie/sodium_compat/namespaced/Core/Curve25519/Ge/Precomp.php +7 -0
- vendor/paragonie/sodium_compat/namespaced/Core/Curve25519/H.php +7 -0
- vendor/paragonie/sodium_compat/namespaced/Core/Ed25519.php +7 -0
- vendor/paragonie/sodium_compat/namespaced/Core/HChaCha20.php +7 -0
- vendor/paragonie/sodium_compat/namespaced/Core/HSalsa20.php +7 -0
- vendor/paragonie/sodium_compat/namespaced/Core/Poly1305.php +7 -0
- vendor/paragonie/sodium_compat/namespaced/Core/Poly1305/State.php +7 -0
- vendor/paragonie/sodium_compat/namespaced/Core/Salsa20.php +7 -0
- vendor/paragonie/sodium_compat/namespaced/Core/SipHash.php +7 -0
- vendor/paragonie/sodium_compat/namespaced/Core/Util.php +7 -0
- vendor/paragonie/sodium_compat/namespaced/Core/X25519.php +7 -0
- vendor/paragonie/sodium_compat/namespaced/Core/XChaCha20.php +7 -0
- vendor/paragonie/sodium_compat/namespaced/Core/Xsalsa20.php +7 -0
- vendor/paragonie/sodium_compat/namespaced/Crypto.php +7 -0
- vendor/paragonie/sodium_compat/namespaced/File.php +7 -0
- vendor/paragonie/sodium_compat/src/Compat.php +2705 -0
- vendor/paragonie/sodium_compat/src/Core/BLAKE2b.php +746 -0
- vendor/paragonie/sodium_compat/src/Core/ChaCha20.php +395 -0
- vendor/paragonie/sodium_compat/src/Core/ChaCha20/Ctx.php +120 -0
- vendor/paragonie/sodium_compat/src/Core/ChaCha20/IetfCtx.php +38 -0
- vendor/paragonie/sodium_compat/src/Core/Curve25519.php +2685 -0
css/{activity-report-widget.1546968199.css → activity-report-widget.1549315000.css}
RENAMED
File without changes
|
css/{diff.1546968199.css → diff.1549315000.css}
RENAMED
File without changes
|
css/{dt_table.1546968199.css → dt_table.1549315000.css}
RENAMED
File without changes
|
css/{fullLog.1546968199.css → fullLog.1549315000.css}
RENAMED
File without changes
|
css/{iptraf.1546968199.css → iptraf.1549315000.css}
RENAMED
File without changes
|
css/{jquery-ui-timepicker-addon.1546968199.css → jquery-ui-timepicker-addon.1549315000.css}
RENAMED
File without changes
|
css/{jquery-ui.min.1546968199.css → jquery-ui.min.1549315000.css}
RENAMED
File without changes
|
css/{jquery-ui.structure.min.1546968199.css → jquery-ui.structure.min.1549315000.css}
RENAMED
File without changes
|
css/{jquery-ui.theme.min.1546968199.css → jquery-ui.theme.min.1549315000.css}
RENAMED
File without changes
|
css/main.1546968199.css
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
.wf-clearfix:before,.wf-clearfix:after{content:" ";display:table}.wf-clearfix:after{clear:both}.wf-btn{display:inline-block;margin-bottom:0;font-weight:normal;text-align:center;vertical-align:middle;touch-action:manipulation;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;text-transform:uppercase;padding:.4rem 1rem;font-size:.875rem;line-height:1.3125rem;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}@media (min-width: 768px){.wf-btn{padding:.5rem 1.25rem;font-size:.875rem;line-height:1.3125rem;border-radius:4px}}.wf-btn:focus,.wf-btn.wf-focus,.wf-btn:active:focus,.wf-btn:active.wf-focus,.wf-btn.wf-active:focus,.wf-btn.wf-active.wf-focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.wf-btn:hover,.wf-btn:focus,.wf-btn.wf-focus{color:#00709e;text-decoration:none}.wf-btn:active,.wf-btn.wf-active{outline:0;background-image:none;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.wf-btn.wf-disabled,.wf-btn[disabled],.wf-btn[readonly],fieldset[disabled] .wf-btn{cursor:not-allowed;-webkit-box-shadow:none;box-shadow:none}a.wf-btn{text-decoration:none}a.wf-btn.wf-disabled,fieldset[disabled] a.wf-btn{cursor:not-allowed;pointer-events:none}.wf-btn-default{color:#00709e;background-color:#fff;border-color:#00709e}.wf-btn-default:focus,.wf-btn-default.focus{color:#00709e;background-color:#e6e6e6;border-color:#00161f}.wf-btn-default:hover{color:#00709e;background-color:#e6e6e6;border-color:#004561}.wf-btn-default:active,.wf-btn-default.active,.wf-open>.wf-btn-default.wf-dropdown-toggle{color:#00709e;background-color:#e6e6e6;border-color:#004561}.wf-btn-default:active:hover,.wf-btn-default:active:focus,.wf-btn-default:active.focus,.wf-btn-default.active:hover,.wf-btn-default.active:focus,.wf-btn-default.active.focus,.wf-open>.wf-btn-default.wf-dropdown-toggle:hover,.wf-open>.wf-btn-default.wf-dropdown-toggle:focus,.wf-open>.wf-btn-default.wf-dropdown-toggle.focus{color:#00709e;background-color:#d4d4d4;border-color:#00161f}.wf-btn-default:active,.wf-btn-default.wf-active,.wf-open>.wf-btn-default.wf-dropdown-toggle{background-image:none}.wf-btn-default.wf-disabled,.wf-btn-default[disabled],.wf-btn-default[readonly],fieldset[disabled] .wf-btn-default{color:#777;background-color:#fff;border-color:#e2e2e2;cursor:not-allowed}.wf-btn-default.wf-disabled:hover,.wf-btn-default.wf-disabled:focus,.wf-btn-default.wf-disabled.wf-focus,.wf-btn-default[disabled]:hover,.wf-btn-default[disabled]:focus,.wf-btn-default[disabled].wf-focus,.wf-btn-default[readonly]:hover,.wf-btn-default[readonly]:focus,.wf-btn-default[readonly].wf-focus,fieldset[disabled] .wf-btn-default:hover,fieldset[disabled] .wf-btn-default:focus,fieldset[disabled] .wf-btn-default.wf-focus{background-color:#fff;border-color:#00709e}.wf-btn-default .wf-badge{color:#fff;background-color:#00709e}.wf-btn-primary{color:#fff;background-color:#00709e;border-color:#005e85}.wf-btn-primary:focus,.wf-btn-primary.focus{color:#fff;background-color:#004c6b;border-color:#000405}.wf-btn-primary:hover{color:#fff;background-color:#004c6b;border-color:#003347}.wf-btn-primary:active,.wf-btn-primary.active,.wf-open>.wf-btn-primary.wf-dropdown-toggle{color:#fff;background-color:#004c6b;border-color:#003347}.wf-btn-primary:active:hover,.wf-btn-primary:active:focus,.wf-btn-primary:active.focus,.wf-btn-primary.active:hover,.wf-btn-primary.active:focus,.wf-btn-primary.active.focus,.wf-open>.wf-btn-primary.wf-dropdown-toggle:hover,.wf-open>.wf-btn-primary.wf-dropdown-toggle:focus,.wf-open>.wf-btn-primary.wf-dropdown-toggle.focus{color:#fff;background-color:#003347;border-color:#000405}.wf-btn-primary:active,.wf-btn-primary.wf-active,.wf-open>.wf-btn-primary.wf-dropdown-toggle{background-image:none}.wf-btn-primary.wf-disabled,.wf-btn-primary[disabled],.wf-btn-primary[readonly],fieldset[disabled] .wf-btn-primary{color:#fff;background-color:#59a2c0;border-color:#5996b0;cursor:not-allowed}.wf-btn-primary.wf-disabled:hover,.wf-btn-primary.wf-disabled:focus,.wf-btn-primary.wf-disabled.wf-focus,.wf-btn-primary[disabled]:hover,.wf-btn-primary[disabled]:focus,.wf-btn-primary[disabled].wf-focus,.wf-btn-primary[readonly]:hover,.wf-btn-primary[readonly]:focus,.wf-btn-primary[readonly].wf-focus,fieldset[disabled] .wf-btn-primary:hover,fieldset[disabled] .wf-btn-primary:focus,fieldset[disabled] .wf-btn-primary.wf-focus{background-color:#00709e;border-color:#005e85}.wf-btn-primary .wf-badge{color:#00709e;background-color:#fff}.wf-btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.wf-btn-success:focus,.wf-btn-success.focus{color:#fff;background-color:#449d44;border-color:#255625}.wf-btn-success:hover{color:#fff;background-color:#449d44;border-color:#398439}.wf-btn-success:active,.wf-btn-success.active,.wf-open>.wf-btn-success.wf-dropdown-toggle{color:#fff;background-color:#449d44;border-color:#398439}.wf-btn-success:active:hover,.wf-btn-success:active:focus,.wf-btn-success:active.focus,.wf-btn-success.active:hover,.wf-btn-success.active:focus,.wf-btn-success.active.focus,.wf-open>.wf-btn-success.wf-dropdown-toggle:hover,.wf-open>.wf-btn-success.wf-dropdown-toggle:focus,.wf-open>.wf-btn-success.wf-dropdown-toggle.focus{color:#fff;background-color:#398439;border-color:#255625}.wf-btn-success:active,.wf-btn-success.wf-active,.wf-open>.wf-btn-success.wf-dropdown-toggle{background-image:none}.wf-btn-success.wf-disabled,.wf-btn-success[disabled],.wf-btn-success[readonly],fieldset[disabled] .wf-btn-success{color:#fff;background-color:#95d195;border-color:#8bca8b;cursor:not-allowed}.wf-btn-success.wf-disabled:hover,.wf-btn-success.wf-disabled:focus,.wf-btn-success.wf-disabled.wf-focus,.wf-btn-success[disabled]:hover,.wf-btn-success[disabled]:focus,.wf-btn-success[disabled].wf-focus,.wf-btn-success[readonly]:hover,.wf-btn-success[readonly]:focus,.wf-btn-success[readonly].wf-focus,fieldset[disabled] .wf-btn-success:hover,fieldset[disabled] .wf-btn-success:focus,fieldset[disabled] .wf-btn-success.wf-focus{background-color:#5cb85c;border-color:#4cae4c}.wf-btn-success .wf-badge{color:#5cb85c;background-color:#fff}.wf-btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.wf-btn-info:focus,.wf-btn-info.focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.wf-btn-info:hover{color:#fff;background-color:#31b0d5;border-color:#269abc}.wf-btn-info:active,.wf-btn-info.active,.wf-open>.wf-btn-info.wf-dropdown-toggle{color:#fff;background-color:#31b0d5;border-color:#269abc}.wf-btn-info:active:hover,.wf-btn-info:active:focus,.wf-btn-info:active.focus,.wf-btn-info.active:hover,.wf-btn-info.active:focus,.wf-btn-info.active.focus,.wf-open>.wf-btn-info.wf-dropdown-toggle:hover,.wf-open>.wf-btn-info.wf-dropdown-toggle:focus,.wf-open>.wf-btn-info.wf-dropdown-toggle.focus{color:#fff;background-color:#269abc;border-color:#1b6d85}.wf-btn-info:active,.wf-btn-info.wf-active,.wf-open>.wf-btn-info.wf-dropdown-toggle{background-image:none}.wf-btn-info.wf-disabled,.wf-btn-info[disabled],.wf-btn-info[readonly],fieldset[disabled] .wf-btn-info{color:#fff;background-color:#94d6ea;border-color:#87d1e7;cursor:not-allowed}.wf-btn-info.wf-disabled:hover,.wf-btn-info.wf-disabled:focus,.wf-btn-info.wf-disabled.wf-focus,.wf-btn-info[disabled]:hover,.wf-btn-info[disabled]:focus,.wf-btn-info[disabled].wf-focus,.wf-btn-info[readonly]:hover,.wf-btn-info[readonly]:focus,.wf-btn-info[readonly].wf-focus,fieldset[disabled] .wf-btn-info:hover,fieldset[disabled] .wf-btn-info:focus,fieldset[disabled] .wf-btn-info.wf-focus{background-color:#5bc0de;border-color:#46b8da}.wf-btn-info .wf-badge{color:#5bc0de;background-color:#fff}.wf-btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.wf-btn-warning:focus,.wf-btn-warning.focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.wf-btn-warning:hover{color:#fff;background-color:#ec971f;border-color:#d58512}.wf-btn-warning:active,.wf-btn-warning.active,.wf-open>.wf-btn-warning.wf-dropdown-toggle{color:#fff;background-color:#ec971f;border-color:#d58512}.wf-btn-warning:active:hover,.wf-btn-warning:active:focus,.wf-btn-warning:active.focus,.wf-btn-warning.active:hover,.wf-btn-warning.active:focus,.wf-btn-warning.active.focus,.wf-open>.wf-btn-warning.wf-dropdown-toggle:hover,.wf-open>.wf-btn-warning.wf-dropdown-toggle:focus,.wf-open>.wf-btn-warning.wf-dropdown-toggle.focus{color:#fff;background-color:#d58512;border-color:#985f0d}.wf-btn-warning:active,.wf-btn-warning.wf-active,.wf-open>.wf-btn-warning.wf-dropdown-toggle{background-image:none}.wf-btn-warning.wf-disabled,.wf-btn-warning[disabled],.wf-btn-warning[readonly],fieldset[disabled] .wf-btn-warning{color:#fff;background-color:#f5ca8c;border-color:#f4c37c;cursor:not-allowed}.wf-btn-warning.wf-disabled:hover,.wf-btn-warning.wf-disabled:focus,.wf-btn-warning.wf-disabled.wf-focus,.wf-btn-warning[disabled]:hover,.wf-btn-warning[disabled]:focus,.wf-btn-warning[disabled].wf-focus,.wf-btn-warning[readonly]:hover,.wf-btn-warning[readonly]:focus,.wf-btn-warning[readonly].wf-focus,fieldset[disabled] .wf-btn-warning:hover,fieldset[disabled] .wf-btn-warning:focus,fieldset[disabled] .wf-btn-warning.wf-focus{background-color:#f0ad4e;border-color:#eea236}.wf-btn-warning .wf-badge{color:#f0ad4e;background-color:#fff}.wf-btn-danger{color:#fff;background-color:#930000;border-color:#7a0000}.wf-btn-danger:focus,.wf-btn-danger.focus{color:#fff;background-color:#600000;border-color:#000}.wf-btn-danger:hover{color:#fff;background-color:#600000;border-color:#3c0000}.wf-btn-danger:active,.wf-btn-danger.active,.wf-open>.wf-btn-danger.wf-dropdown-toggle{color:#fff;background-color:#600000;border-color:#3c0000}.wf-btn-danger:active:hover,.wf-btn-danger:active:focus,.wf-btn-danger:active.focus,.wf-btn-danger.active:hover,.wf-btn-danger.active:focus,.wf-btn-danger.active.focus,.wf-open>.wf-btn-danger.wf-dropdown-toggle:hover,.wf-open>.wf-btn-danger.wf-dropdown-toggle:focus,.wf-open>.wf-btn-danger.wf-dropdown-toggle.focus{color:#fff;background-color:#3c0000;border-color:#000}.wf-btn-danger:active,.wf-btn-danger.wf-active,.wf-open>.wf-btn-danger.wf-dropdown-toggle{background-image:none}.wf-btn-danger.wf-disabled,.wf-btn-danger[disabled],.wf-btn-danger[readonly],fieldset[disabled] .wf-btn-danger{color:#fff;background-color:#b95959;border-color:#a95959;cursor:not-allowed}.wf-btn-danger.wf-disabled:hover,.wf-btn-danger.wf-disabled:focus,.wf-btn-danger.wf-disabled.wf-focus,.wf-btn-danger[disabled]:hover,.wf-btn-danger[disabled]:focus,.wf-btn-danger[disabled].wf-focus,.wf-btn-danger[readonly]:hover,.wf-btn-danger[readonly]:focus,.wf-btn-danger[readonly].wf-focus,fieldset[disabled] .wf-btn-danger:hover,fieldset[disabled] .wf-btn-danger:focus,fieldset[disabled] .wf-btn-danger.wf-focus{background-color:#930000;border-color:#7a0000}.wf-btn-danger .wf-badge{color:#930000;background-color:#fff}.wf-btn-callout{font-weight:600;text-transform:uppercase}.wf-btn-callout-subtle{font-weight:400;text-transform:uppercase}.wf-btn-link{color:#00709e;font-weight:normal;border-radius:0}.wf-btn-link,.wf-btn-link:active,.wf-btn-link.wf-active,.wf-btn-link[disabled],fieldset[disabled] .wf-btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.wf-btn-link,.wf-btn-link:hover,.wf-btn-link:focus,.wf-btn-link:active{border-color:transparent}.wf-btn-link:hover,.wf-btn-link:focus{color:#003a52;text-decoration:underline;background-color:transparent}.wf-btn-link[disabled]:hover,.wf-btn-link[disabled]:focus,fieldset[disabled] .wf-btn-link:hover,fieldset[disabled] .wf-btn-link:focus{color:#777;text-decoration:none}.wf-btn-lg,.wf-btn-group-lg>.wf-btn{padding:10px 16px;font-size:18px;line-height:1.33333;border-radius:6px}.wf-btn-sm,.wf-btn-group-sm>.wf-btn{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.wf-btn-xs,.wf-btn-group-xs>.wf-btn{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.wf-btn-block{display:block;width:100%}.wf-btn-block+.wf-btn-block{margin-top:5px}input[type="submit"].wf-btn-block,input[type="reset"].wf-btn-block,input[type="button"].wf-btn-block{width:100%}.wf-btn-group,.wf-btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.wf-btn-group>.wf-btn,.wf-btn-group-vertical>.wf-btn{position:relative;float:left}.wf-btn-group>.wf-btn:hover,.wf-btn-group>.wf-btn:focus,.wf-btn-group>.wf-btn:active,.wf-btn-group>.wf-btn.wf-active,.wf-btn-group-vertical>.wf-btn:hover,.wf-btn-group-vertical>.wf-btn:focus,.wf-btn-group-vertical>.wf-btn:active,.wf-btn-group-vertical>.wf-btn.wf-active{z-index:2}.wf-btn-group .wf-btn+.wf-btn,.wf-btn-group .wf-btn+.wf-btn-group,.wf-btn-group .wf-btn-group+.wf-btn,.wf-btn-group .wf-btn-group+.wf-btn-group{margin-left:-1px}.wf-btn-toolbar{margin-left:-5px}.wf-btn-toolbar:before,.wf-btn-toolbar:after{content:" ";display:table}.wf-btn-toolbar:after{clear:both}.wf-btn-toolbar .wf-btn,.wf-btn-toolbar .wf-btn-group,.wf-btn-toolbar .wf-input-group{float:left}.wf-btn-toolbar>.wf-btn,.wf-btn-toolbar>.wf-btn-group,.wf-btn-toolbar>.wf-input-group{margin-left:5px}.wf-btn-group>.wf-btn:not(:first-child):not(:last-child):not(.wf-dropdown-toggle){border-radius:0}.wf-btn-group>.wf-btn:first-child{margin-left:0}.wf-btn-group>.wf-btn:first-child:not(:last-child):not(.wf-dropdown-toggle){-moz-border-radius-topright:0;-webkit-border-top-right-radius:0;border-top-right-radius:0;-moz-border-radius-bottomright:0;-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0}.wf-btn-group>.wf-btn:last-child:not(:first-child),.wf-btn-group>.wf-dropdown-toggle:not(:first-child){-moz-border-radius-topleft:0;-webkit-border-top-left-radius:0;border-top-left-radius:0;-moz-border-radius-bottomleft:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0}.wf-btn-group>.wf-btn-group{float:left}.wf-btn-group>.wf-btn-group:not(:first-child):not(:last-child)>.wf-btn{border-radius:0}.wf-btn-group>.wf-btn-group:first-child:not(:last-child)>.wf-btn:last-child,.wf-btn-group>.wf-btn-group:first-child:not(:last-child)>.wf-dropdown-toggle{-moz-border-radius-topright:0;-webkit-border-top-right-radius:0;border-top-right-radius:0;-moz-border-radius-bottomright:0;-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0}.wf-btn-group>.wf-btn-group:last-child:not(:first-child)>.wf-btn:first-child{-moz-border-radius-topleft:0;-webkit-border-top-left-radius:0;border-top-left-radius:0;-moz-border-radius-bottomleft:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0}.wf-btn-group .wf-dropdown-toggle:active,.wf-btn-group.wf-open .wf-dropdown-toggle{outline:0}.wf-btn-group>.wf-btn+.wf-dropdown-toggle{padding-left:8px;padding-right:8px}.wf-btn-group>.wf-btn-lg+.wf-dropdown-toggle,.wf-btn-group-lg.wf-btn-group>.wf-btn+.wf-dropdown-toggle{padding-left:12px;padding-right:12px}.wf-btn-group.open .wf-dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.wf-btn-group.open .wf-dropdown-toggle.wf-btn-link{-webkit-box-shadow:none;box-shadow:none}.wf-btn .wf-caret{margin-left:0}.wf-btn-lg .wf-caret,.wf-btn-group-lg>.wf-btn .wf-caret{border-width:5px 5px 0;border-bottom-width:0}.wf-dropup .wf-btn-lg .wf-caret,.wf-dropup .wf-btn-group-lg>.wf-btn .wf-caret{border-width:0 5px 5px}.wf-btn-group-vertical>.wf-btn,.wf-btn-group-vertical>.wf-btn-group,.wf-btn-group-vertical>.wf-btn-group>.wf-btn{display:block;float:none;width:100%;max-width:100%}.wf-btn-group-vertical>.wf-btn-group:before,.wf-btn-group-vertical>.wf-btn-group:after{content:" ";display:table}.wf-btn-group-vertical>.wf-btn-group:after{clear:both}.wf-btn-group-vertical>.wf-btn-group>.wf-btn{float:none}.wf-btn-group-vertical>.wf-btn+.wf-btn,.wf-btn-group-vertical>.wf-btn+.wf-btn-group,.wf-btn-group-vertical>.wf-btn-group+.wf-btn,.wf-btn-group-vertical>.wf-btn-group+.wf-btn-group{margin-top:-1px;margin-left:0}.wf-btn-group-vertical>.wf-btn:not(:first-child):not(:last-child){border-radius:0}.wf-btn-group-vertical>.wf-btn:first-child:not(:last-child){-moz-border-radius-topleft:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topright:4px;-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-bottomleft:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0;-moz-border-radius-bottomright:0;-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0}.wf-btn-group-vertical>.wf-btn:last-child:not(:first-child){-moz-border-radius-topleft:0;-webkit-border-top-left-radius:0;border-top-left-radius:0;-moz-border-radius-topright:0;-webkit-border-top-right-radius:0;border-top-right-radius:0;-moz-border-radius-bottomleft:4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomright:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px}.wf-btn-group-vertical>.wf-btn-group:not(:first-child):not(:last-child)>.wf-btn{border-radius:0}.wf-btn-group-vertical>.wf-btn-group:first-child:not(:last-child)>.wf-btn:last-child,.wf-btn-group-vertical>.wf-btn-group:first-child:not(:last-child)>.wf-dropdown-toggle{-moz-border-radius-bottomleft:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0;-moz-border-radius-bottomright:0;-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0}.wf-btn-group-vertical>.wf-btn-group:last-child:not(:first-child)>.wf-btn:first-child{-moz-border-radius-topleft:0;-webkit-border-top-left-radius:0;border-top-left-radius:0;-moz-border-radius-topright:0;-webkit-border-top-right-radius:0;border-top-right-radius:0}.wf-btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.wf-btn-group-justified>.wf-btn,.wf-btn-group-justified>.wf-btn-group{float:none;display:table-cell;width:1%}.wf-btn-group-justified>.wf-btn-group .wf-btn{width:100%}.wf-btn-group-justified>.wf-btn-group .wf-dropdown-menu{left:auto}[data-toggle="buttons"]>.wf-btn input[type="radio"],[data-toggle="buttons"]>.wf-btn input[type="checkbox"],[data-toggle="buttons"]>.wf-btn-group>.wf-btn input[type="radio"],[data-toggle="buttons"]>.wf-btn-group>.wf-btn input[type="checkbox"]{position:absolute;clip:rect(0, 0, 0, 0);pointer-events:none}.wf-pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.wf-pagination>li{display:inline}.wf-pagination>li>a,.wf-pagination>li>span{position:relative;float:left;padding:.5rem 1.25rem;line-height:1.42857;text-decoration:none;color:#00709e;background-color:#fff;border:1px solid #ddd;margin-left:-1px}.wf-pagination>li:first-child>a,.wf-pagination>li:first-child>span{margin-left:0;-moz-border-radius-topleft:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-bottomleft:4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px}.wf-pagination>li:last-child>a,.wf-pagination>li:last-child>span{-moz-border-radius-topright:4px;-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-bottomright:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px}.wf-pagination>li>a:hover,.wf-pagination>li>a:focus,.wf-pagination>li>span:hover,.wf-pagination>li>span:focus{z-index:2;color:#003a52;background-color:#e2e2e2;border-color:#ddd}.wf-pagination>.wf-active>a,.wf-pagination>.wf-active>a:hover,.wf-pagination>.wf-active>a:focus,.wf-pagination>.wf-active>span,.wf-pagination>.wf-active>span:hover,.wf-pagination>.wf-active>span:focus{z-index:3;color:#fff;background-color:#00709e;border-color:#00709e;cursor:default}.wf-pagination>.wf-disabled>span,.wf-pagination>.wf-disabled>span:hover,.wf-pagination>.wf-disabled>span:focus,.wf-pagination>.wf-disabled>a,.wf-pagination>.wf-disabled>a:hover,.wf-pagination>.wf-disabled>a:focus{color:#777;background-color:#fff;border-color:#ddd;cursor:not-allowed}.wf-pagination-lg>li>a,.wf-pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.33333}.wf-pagination-lg>li:first-child>a,.wf-pagination-lg>li:first-child>span{-moz-border-radius-topleft:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px}.wf-pagination-lg>li:last-child>a,.wf-pagination-lg>li:last-child>span{-moz-border-radius-topright:6px;-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-moz-border-radius-bottomright:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px}.wf-pagination-sm>li>a,.wf-pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.wf-pagination-sm>li:first-child>a,.wf-pagination-sm>li:first-child>span{-moz-border-radius-topleft:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;-moz-border-radius-bottomleft:3px;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px}.wf-pagination-sm>li:last-child>a,.wf-pagination-sm>li:last-child>span{-moz-border-radius-topright:3px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-moz-border-radius-bottomright:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px}@-ms-viewport{width:device-width}.wf-visible-xs{display:none !important}.wf-visible-sm{display:none !important}.wf-visible-md{display:none !important}.wf-visible-lg{display:none !important}.wf-visible-xs-block,.wf-visible-xs-inline,.wf-visible-xs-inline-block,.wf-visible-sm-block,.wf-visible-sm-inline,.wf-visible-sm-inline-block,.wf-visible-md-block,.wf-visible-md-inline,.wf-visible-md-inline-block,.wf-visible-lg-block,.wf-visible-lg-inline,.wf-visible-lg-inline-block{display:none !important}@media (max-width: 767px){.wf-visible-xs{display:block !important}table.wf-visible-xs{display:table !important}tr.wf-visible-xs{display:table-row !important}th.wf-visible-xs,td.wf-visible-xs{display:table-cell !important}}@media (max-width: 767px){.wf-visible-xs-block{display:block !important}}@media (max-width: 767px){.wf-visible-xs-inline{display:inline !important}}@media (max-width: 767px){.wf-visible-xs-inline-block{display:inline-block !important}}@media (min-width: 768px) and (max-width: 991px){.wf-visible-sm{display:block !important}table.wf-visible-sm{display:table !important}tr.wf-visible-sm{display:table-row !important}th.wf-visible-sm,td.wf-visible-sm{display:table-cell !important}}@media (min-width: 768px) and (max-width: 991px){.wf-visible-sm-block{display:block !important}}@media (min-width: 768px) and (max-width: 991px){.wf-visible-sm-inline{display:inline !important}}@media (min-width: 768px) and (max-width: 991px){.wf-visible-sm-inline-block{display:inline-block !important}}@media (min-width: 992px) and (max-width: 1199px){.wf-visible-md{display:block !important}table.wf-visible-md{display:table !important}tr.wf-visible-md{display:table-row !important}th.wf-visible-md,td.wf-visible-md{display:table-cell !important}}@media (min-width: 992px) and (max-width: 1199px){.wf-visible-md-block{display:block !important}}@media (min-width: 992px) and (max-width: 1199px){.wf-visible-md-inline{display:inline !important}}@media (min-width: 992px) and (max-width: 1199px){.wf-visible-md-inline-block{display:inline-block !important}}@media (min-width: 1200px){.wf-visible-lg{display:block !important}table.wf-visible-lg{display:table !important}tr.wf-visible-lg{display:table-row !important}th.wf-visible-lg,td.wf-visible-lg{display:table-cell !important}}@media (min-width: 1200px){.wf-visible-lg-block{display:block !important}}@media (min-width: 1200px){.wf-visible-lg-inline{display:inline !important}}@media (min-width: 1200px){.wf-visible-lg-inline-block{display:inline-block !important}}@media (max-width: 767px){.wf-hidden-xs{display:none !important}}@media (min-width: 768px) and (max-width: 991px){.wf-hidden-sm{display:none !important}}@media (min-width: 992px) and (max-width: 1199px){.wf-hidden-md{display:none !important}}@media (min-width: 1200px){.wf-hidden-lg{display:none !important}}.wf-visible-print{display:none !important}@media print{.wf-visible-print{display:block !important}table.wf-visible-print{display:table !important}tr.wf-visible-print{display:table-row !important}th.wf-visible-print,td.wf-visible-print{display:table-cell !important}}.wf-visible-print-block{display:none !important}@media print{.wf-visible-print-block{display:block !important}}.wf-visible-print-inline{display:none !important}@media print{.wf-visible-print-inline{display:inline !important}}.wf-visible-print-inline-block{display:none !important}@media print{.wf-visible-print-inline-block{display:inline-block !important}}@media print{.wf-hidden-print{display:none !important}}.wf-container{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}.wf-container:before,.wf-container:after{content:" ";display:table}.wf-container:after{clear:both}@media (min-width: 768px){.wf-container{width:750px}}@media (min-width: 992px){.wf-container{width:970px}}@media (min-width: 1200px){.wf-container{width:1170px}}.wf-container-fluid{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}.wf-container-fluid:before,.wf-container-fluid:after{content:" ";display:table}.wf-container-fluid:after{clear:both}.wf-row{margin-left:-15px;margin-right:-15px}.wf-row:before,.wf-row:after{content:" ";display:table}.wf-row:after{clear:both}.wf-col-xs-1,.wf-col-sm-1,.wf-col-md-1,.wf-col-lg-1,.wf-col-xs-2,.wf-col-sm-2,.wf-col-md-2,.wf-col-lg-2,.wf-col-xs-3,.wf-col-sm-3,.wf-col-md-3,.wf-col-lg-3,.wf-col-xs-4,.wf-col-sm-4,.wf-col-md-4,.wf-col-lg-4,.wf-col-xs-5,.wf-col-sm-5,.wf-col-md-5,.wf-col-lg-5,.wf-col-xs-6,.wf-col-sm-6,.wf-col-md-6,.wf-col-lg-6,.wf-col-xs-7,.wf-col-sm-7,.wf-col-md-7,.wf-col-lg-7,.wf-col-xs-8,.wf-col-sm-8,.wf-col-md-8,.wf-col-lg-8,.wf-col-xs-9,.wf-col-sm-9,.wf-col-md-9,.wf-col-lg-9,.wf-col-xs-10,.wf-col-sm-10,.wf-col-md-10,.wf-col-lg-10,.wf-col-xs-11,.wf-col-sm-11,.wf-col-md-11,.wf-col-lg-11,.wf-col-xs-12,.wf-col-sm-12,.wf-col-md-12,.wf-col-lg-12{position:relative;min-height:1px;padding-left:15px;padding-right:15px;box-sizing:border-box}.wf-col-xs-1,.wf-col-xs-2,.wf-col-xs-3,.wf-col-xs-4,.wf-col-xs-5,.wf-col-xs-6,.wf-col-xs-7,.wf-col-xs-8,.wf-col-xs-9,.wf-col-xs-10,.wf-col-xs-11,.wf-col-xs-12{float:left}.wf-col-xs-1{width:8.33333%}.wf-col-xs-2{width:16.66667%}.wf-col-xs-3{width:25%}.wf-col-xs-4{width:33.33333%}.wf-col-xs-5{width:41.66667%}.wf-col-xs-6{width:50%}.wf-col-xs-7{width:58.33333%}.wf-col-xs-8{width:66.66667%}.wf-col-xs-9{width:75%}.wf-col-xs-10{width:83.33333%}.wf-col-xs-11{width:91.66667%}.wf-col-xs-12{width:100%}.wf-col-xs-pull-0{right:auto}.wf-col-xs-pull-1{right:8.33333%}.wf-col-xs-pull-2{right:16.66667%}.wf-col-xs-pull-3{right:25%}.wf-col-xs-pull-4{right:33.33333%}.wf-col-xs-pull-5{right:41.66667%}.wf-col-xs-pull-6{right:50%}.wf-col-xs-pull-7{right:58.33333%}.wf-col-xs-pull-8{right:66.66667%}.wf-col-xs-pull-9{right:75%}.wf-col-xs-pull-10{right:83.33333%}.wf-col-xs-pull-11{right:91.66667%}.wf-col-xs-pull-12{right:100%}.wf-col-xs-push-0{left:auto}.wf-col-xs-push-1{left:8.33333%}.wf-col-xs-push-2{left:16.66667%}.wf-col-xs-push-3{left:25%}.wf-col-xs-push-4{left:33.33333%}.wf-col-xs-push-5{left:41.66667%}.wf-col-xs-push-6{left:50%}.wf-col-xs-push-7{left:58.33333%}.wf-col-xs-push-8{left:66.66667%}.wf-col-xs-push-9{left:75%}.wf-col-xs-push-10{left:83.33333%}.wf-col-xs-push-11{left:91.66667%}.wf-col-xs-push-12{left:100%}.wf-col-xs-offset-0{margin-left:0%}.wf-col-xs-offset-1{margin-left:8.33333%}.wf-col-xs-offset-2{margin-left:16.66667%}.wf-col-xs-offset-3{margin-left:25%}.wf-col-xs-offset-4{margin-left:33.33333%}.wf-col-xs-offset-5{margin-left:41.66667%}.wf-col-xs-offset-6{margin-left:50%}.wf-col-xs-offset-7{margin-left:58.33333%}.wf-col-xs-offset-8{margin-left:66.66667%}.wf-col-xs-offset-9{margin-left:75%}.wf-col-xs-offset-10{margin-left:83.33333%}.wf-col-xs-offset-11{margin-left:91.66667%}.wf-col-xs-offset-12{margin-left:100%}.wf-col-xs-half-padding-left{padding-left:8px}.wf-col-xs-half-padding-right{padding-right:7px}@media (min-width: 768px){.wf-col-sm-1,.wf-col-sm-2,.wf-col-sm-3,.wf-col-sm-4,.wf-col-sm-5,.wf-col-sm-6,.wf-col-sm-7,.wf-col-sm-8,.wf-col-sm-9,.wf-col-sm-10,.wf-col-sm-11,.wf-col-sm-12{float:left}.wf-col-sm-1{width:8.33333%}.wf-col-sm-2{width:16.66667%}.wf-col-sm-3{width:25%}.wf-col-sm-4{width:33.33333%}.wf-col-sm-5{width:41.66667%}.wf-col-sm-6{width:50%}.wf-col-sm-7{width:58.33333%}.wf-col-sm-8{width:66.66667%}.wf-col-sm-9{width:75%}.wf-col-sm-10{width:83.33333%}.wf-col-sm-11{width:91.66667%}.wf-col-sm-12{width:100%}.wf-col-sm-pull-0{right:auto}.wf-col-sm-pull-1{right:8.33333%}.wf-col-sm-pull-2{right:16.66667%}.wf-col-sm-pull-3{right:25%}.wf-col-sm-pull-4{right:33.33333%}.wf-col-sm-pull-5{right:41.66667%}.wf-col-sm-pull-6{right:50%}.wf-col-sm-pull-7{right:58.33333%}.wf-col-sm-pull-8{right:66.66667%}.wf-col-sm-pull-9{right:75%}.wf-col-sm-pull-10{right:83.33333%}.wf-col-sm-pull-11{right:91.66667%}.wf-col-sm-pull-12{right:100%}.wf-col-sm-push-0{left:auto}.wf-col-sm-push-1{left:8.33333%}.wf-col-sm-push-2{left:16.66667%}.wf-col-sm-push-3{left:25%}.wf-col-sm-push-4{left:33.33333%}.wf-col-sm-push-5{left:41.66667%}.wf-col-sm-push-6{left:50%}.wf-col-sm-push-7{left:58.33333%}.wf-col-sm-push-8{left:66.66667%}.wf-col-sm-push-9{left:75%}.wf-col-sm-push-10{left:83.33333%}.wf-col-sm-push-11{left:91.66667%}.wf-col-sm-push-12{left:100%}.wf-col-sm-offset-0{margin-left:0%}.wf-col-sm-offset-1{margin-left:8.33333%}.wf-col-sm-offset-2{margin-left:16.66667%}.wf-col-sm-offset-3{margin-left:25%}.wf-col-sm-offset-4{margin-left:33.33333%}.wf-col-sm-offset-5{margin-left:41.66667%}.wf-col-sm-offset-6{margin-left:50%}.wf-col-sm-offset-7{margin-left:58.33333%}.wf-col-sm-offset-8{margin-left:66.66667%}.wf-col-sm-offset-9{margin-left:75%}.wf-col-sm-offset-10{margin-left:83.33333%}.wf-col-sm-offset-11{margin-left:91.66667%}.wf-col-sm-offset-12{margin-left:100%}.wf-col-sm-half-padding-left{padding-left:8px}.wf-col-sm-half-padding-right{padding-right:7px}}@media (min-width: 992px){.wf-col-md-1,.wf-col-md-2,.wf-col-md-3,.wf-col-md-4,.wf-col-md-5,.wf-col-md-6,.wf-col-md-7,.wf-col-md-8,.wf-col-md-9,.wf-col-md-10,.wf-col-md-11,.wf-col-md-12{float:left}.wf-col-md-1{width:8.33333%}.wf-col-md-2{width:16.66667%}.wf-col-md-3{width:25%}.wf-col-md-4{width:33.33333%}.wf-col-md-5{width:41.66667%}.wf-col-md-6{width:50%}.wf-col-md-7{width:58.33333%}.wf-col-md-8{width:66.66667%}.wf-col-md-9{width:75%}.wf-col-md-10{width:83.33333%}.wf-col-md-11{width:91.66667%}.wf-col-md-12{width:100%}.wf-col-md-pull-0{right:auto}.wf-col-md-pull-1{right:8.33333%}.wf-col-md-pull-2{right:16.66667%}.wf-col-md-pull-3{right:25%}.wf-col-md-pull-4{right:33.33333%}.wf-col-md-pull-5{right:41.66667%}.wf-col-md-pull-6{right:50%}.wf-col-md-pull-7{right:58.33333%}.wf-col-md-pull-8{right:66.66667%}.wf-col-md-pull-9{right:75%}.wf-col-md-pull-10{right:83.33333%}.wf-col-md-pull-11{right:91.66667%}.wf-col-md-pull-12{right:100%}.wf-col-md-push-0{left:auto}.wf-col-md-push-1{left:8.33333%}.wf-col-md-push-2{left:16.66667%}.wf-col-md-push-3{left:25%}.wf-col-md-push-4{left:33.33333%}.wf-col-md-push-5{left:41.66667%}.wf-col-md-push-6{left:50%}.wf-col-md-push-7{left:58.33333%}.wf-col-md-push-8{left:66.66667%}.wf-col-md-push-9{left:75%}.wf-col-md-push-10{left:83.33333%}.wf-col-md-push-11{left:91.66667%}.wf-col-md-push-12{left:100%}.wf-col-md-offset-0{margin-left:0%}.wf-col-md-offset-1{margin-left:8.33333%}.wf-col-md-offset-2{margin-left:16.66667%}.wf-col-md-offset-3{margin-left:25%}.wf-col-md-offset-4{margin-left:33.33333%}.wf-col-md-offset-5{margin-left:41.66667%}.wf-col-md-offset-6{margin-left:50%}.wf-col-md-offset-7{margin-left:58.33333%}.wf-col-md-offset-8{margin-left:66.66667%}.wf-col-md-offset-9{margin-left:75%}.wf-col-md-offset-10{margin-left:83.33333%}.wf-col-md-offset-11{margin-left:91.66667%}.wf-col-md-offset-12{margin-left:100%}.wf-col-md-half-padding-left{padding-left:8px}.wf-col-md-half-padding-right{padding-right:7px}}@media (min-width: 1200px){.wf-col-lg-1,.wf-col-lg-2,.wf-col-lg-3,.wf-col-lg-4,.wf-col-lg-5,.wf-col-lg-6,.wf-col-lg-7,.wf-col-lg-8,.wf-col-lg-9,.wf-col-lg-10,.wf-col-lg-11,.wf-col-lg-12{float:left}.wf-col-lg-1{width:8.33333%}.wf-col-lg-2{width:16.66667%}.wf-col-lg-3{width:25%}.wf-col-lg-4{width:33.33333%}.wf-col-lg-5{width:41.66667%}.wf-col-lg-6{width:50%}.wf-col-lg-7{width:58.33333%}.wf-col-lg-8{width:66.66667%}.wf-col-lg-9{width:75%}.wf-col-lg-10{width:83.33333%}.wf-col-lg-11{width:91.66667%}.wf-col-lg-12{width:100%}.wf-col-lg-pull-0{right:auto}.wf-col-lg-pull-1{right:8.33333%}.wf-col-lg-pull-2{right:16.66667%}.wf-col-lg-pull-3{right:25%}.wf-col-lg-pull-4{right:33.33333%}.wf-col-lg-pull-5{right:41.66667%}.wf-col-lg-pull-6{right:50%}.wf-col-lg-pull-7{right:58.33333%}.wf-col-lg-pull-8{right:66.66667%}.wf-col-lg-pull-9{right:75%}.wf-col-lg-pull-10{right:83.33333%}.wf-col-lg-pull-11{right:91.66667%}.wf-col-lg-pull-12{right:100%}.wf-col-lg-push-0{left:auto}.wf-col-lg-push-1{left:8.33333%}.wf-col-lg-push-2{left:16.66667%}.wf-col-lg-push-3{left:25%}.wf-col-lg-push-4{left:33.33333%}.wf-col-lg-push-5{left:41.66667%}.wf-col-lg-push-6{left:50%}.wf-col-lg-push-7{left:58.33333%}.wf-col-lg-push-8{left:66.66667%}.wf-col-lg-push-9{left:75%}.wf-col-lg-push-10{left:83.33333%}.wf-col-lg-push-11{left:91.66667%}.wf-col-lg-push-12{left:100%}.wf-col-lg-offset-0{margin-left:0%}.wf-col-lg-offset-1{margin-left:8.33333%}.wf-col-lg-offset-2{margin-left:16.66667%}.wf-col-lg-offset-3{margin-left:25%}.wf-col-lg-offset-4{margin-left:33.33333%}.wf-col-lg-offset-5{margin-left:41.66667%}.wf-col-lg-offset-6{margin-left:50%}.wf-col-lg-offset-7{margin-left:58.33333%}.wf-col-lg-offset-8{margin-left:66.66667%}.wf-col-lg-offset-9{margin-left:75%}.wf-col-lg-offset-10{margin-left:83.33333%}.wf-col-lg-offset-11{margin-left:91.66667%}.wf-col-lg-offset-12{margin-left:100%}.wf-col-lg-half-padding-left{padding-left:8px}.wf-col-lg-half-padding-right{padding-right:7px}}.wrap.wordfence{direction:ltr}@media (min-width: 768px){.wrap.wordfence{max-width:750px}}@media (min-width: 992px){.wrap.wordfence{max-width:970px}}@media (min-width: 1200px){.wrap.wordfence{max-width:1170px}}.wrap.wordfence>.wf-container-fluid{padding-left:0px;padding-right:0px}.wrap.wordfence .button-primary{text-align:center;text-transform:uppercase;font-weight:bold;background-color:#00709e}.wrap.wordfence a{text-decoration:none}.wrap.wordfence a:hover{text-decoration:underline}.wrap.wordfence a.wf-btn:hover{text-decoration:none}.wrap.wordfence p,.wrap.wordfence td,.wrap.wordfence li{font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:.875rem;color:#2d2d2d;line-height:1.3125;font-weight:normal}.wrap.wordfence p strong,.wrap.wordfence td strong,.wrap.wordfence li strong{font-weight:600}.wrap.wordfence p em,.wrap.wordfence td em,.wrap.wordfence li em{font-weight:normal}.wrap.wordfence h1,.wrap.wordfence h2,.wrap.wordfence h3,.wrap.wordfence h4,.wrap.wordfence h5,.wrap.wordfence h6{font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;color:#2d2d2d;font-weight:700}.wrap.wordfence h2{font-size:1.3125rem;line-height:1.5}.wrap.wordfence h3{font-size:1.125rem}.wrap.wordfence h4{font-size:1rem}a{color:#00709e}.wf-inline-help{color:#9f9fa0}.wf-inline-help:hover{color:#00709e}.wordfenceWrap{margin:20px 0 0 20px}.wordfence-icon32{width:32px;height:32px;background-position:0 0;background-repeat:no-repeat;padding:0;margin:7px 5px 0 0;float:left}#wfHeading:after{content:'.';visibility:hidden;display:block;clear:both;height:0px}.wordfence-lock-icon{background-image:url(../images/wordfence-logo-32x32.png)}a.wfhelp{margin:0 3px 0 3px;text-decoration:none;display:inline-block;vertical-align:middle;font:normal normal normal 14px/1 FontAwesome;text-rendering:auto;-webkit-font-smoothing:antialiased}a.wfhelp:before{content:'\f29c'}.wordfence .resulticon{display:block;float:left;width:16px;height:16px;background-position:0 0;background-repeat:no-repeat;border-width:0;padding:0;margin:0 3px 0 0;background-image:url(../images/icons/bullet_yellow.png)}.wordfenceBoldTD{font-weight:bold}.wfAjax24{display:none;width:24px;height:24px;background-image:url(../images/icons/ajax24.gif);margin:0;padding:0}div.wfLoadingWhite32{width:32px;height:32px;background-image:url(../images/icons/ajaxWhite32x32.gif);margin:0;padding:0}.wfTabsContainer{background-color:#FFF;overflow:hidden;border:1px solid #CCC;padding:15px;min-height:200px;-webkit-font-smoothing:antialiased}#wfTabs::after{content:".";display:block;height:0;width:0;line-height:0;clear:both;visibility:hidden}#wfTabs a{float:left;z-index:10;height:18px;margin:0 5px -1px 0;padding:5px 8px;border:1px solid #CCC;text-decoration:none;background-color:#EFEFEF;color:#21759B;-moz-border-radius-topright:3px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-moz-border-radius-topleft:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px}#wfTabs a.selected{border-bottom:1px solid #FFF;background-color:#FFF;color:#777}.wordfenceTopTab{display:none;margin-top:15px}.wordfenceTopTab.active{display:block}.wordfenceHelpLink{margin-top:15px}.wfAjaxLight128{background-image:url(../images/icons/ajax3.gif)}.wfStrong{font-weight:bold}.wordfenceModeElem{width:1px;height:1px;opacity:0}.wfWarn{color:#F00}.wf-flag{display:inline-block;vertical-align:middle;margin:0px 2px 0 0;background-repeat:no-repeat;background-position:center center;width:16px;height:11px;background-image:url(../images/flags.png);-webkit-flex-shrink:0;flex-shrink:0;-webkit-flex-grow:0;flex-grow:0}.wfHitTime{font-style:italic}.wfAvatar img{vertical-align:middle;margin-right:0.5rem}.wf-hex-sequence{color:#587ECB}.wfLoadMoreButton.disabled,.wfLoadMoreButton[disabled]{pointer-events:none;opacity:0.65}table.wfConfigForm th{font-weight:normal;text-align:left;padding:2px 3px 1px 0;vertical-align:middle}table.wfConfigForm td{vertical-align:middle}table.wfConfigForm td.align-top{vertical-align:top}table th.wfConfigEnable{font-weight:bold;min-width:25%}.wfSavedMsg{display:none;color:#A00}table th.wfSubheading{font-weight:bold;padding-top:10px}h3.wfConfigHeading{font-size:22px;color:#777;font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;font-style:italic;font-weight:normal}.wfTipText{color:#777;font-family:Georgia,Times New Roman,Times,serif;font-style:italic}.wfBlackCursor{color:#FFF}.wf-spinner{display:inline-block;width:4px}.wferror{color:#F00}#wordfenceWorking{padding:10px 40px 6px 16px;z-index:100000;position:fixed;right:16px;bottom:0px;background-color:#fcb214;border:5px solid #fcb214;border-width:6px 15px 6px 6px;color:#525355;font-size:12px;font-weight:bold;font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;background-image:url("../images/icons/working-indicator.gif");background-position:100% 50%;background-repeat:no-repeat}@media (max-width: 960px){#wordfenceWorking{left:auto;right:0px}}#paidWrap{position:relative}.paidInnerMsg{width:500px;margin:150px auto 0 auto;color:#000;font-size:18px;font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;line-height:1.8em;text-align:center;-webkit-font-smoothing:antialiased}.wfMarker{height:1px;width:1px}.wfPaidOnlyNotice{width:500px;background-color:#FFFFE0;border:1px solid #000;padding:10px;margin:20px}.wfOnOffSwitch{display:inline-block;position:relative !important;width:69px !important;-webkit-user-select:none !important;-moz-user-select:none !important;-ms-user-select:none !important;user-select:none !important}.wfOnOffSwitch-checkbox{display:none !important}.wfOnOffSwitch-label{display:block !important;overflow:hidden !important;cursor:pointer !important;border:2px solid #999999 !important;border-radius:19px !important;margin:0}.wfOnOffSwitch-inner{width:200% !important;margin-left:-100% !important;-webkit-transition:margin 0.3s ease-in !important;-o-transition:margin 0.3s ease-in !important;transition:margin 0.3s ease-in !important;-webkit-transition-delay:0s !important;transition-delay:0s !important}.wfOnOffSwitch-inner:before,.wfOnOffSwitch-inner:after{float:left !important;width:50% !important;height:19px !important;padding:0 !important;line-height:19px !important;font-size:14px !important;color:white !important;font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif !important;font-weight:bold !important;-webkit-box-sizing:border-box !important;-moz-box-sizing:border-box !important;box-sizing:border-box !important;-moz-border-radius:19px !important;-webkit-border-radius:19px;border-radius:19px !important;-webkit-box-shadow:0 9.5px 0 rgba(0,0,0,0.08) inset !important;box-shadow:0 9.5px 0 rgba(0,0,0,0.08) inset !important}.wfOnOffSwitch-inner:before{content:"ON" !important;padding-left:10px !important;background-color:#30D965 !important;color:#FFFFFF !important;-moz-border-radius:19px 0 0 19px !important;-webkit-border-radius:19px;border-radius:19px 0 0 19px !important}.wfOnOffSwitch-inner:after{content:"OFF" !important;padding-right:10px !important;background-color:#EEEEEE !important;color:#999999 !important;text-align:right !important;-moz-border-radius:0 19px 19px 0 !important;-webkit-border-radius:0;border-radius:0 19px 19px 0 !important}.wfOnOffSwitch-switch{width:19px !important;margin:0 !important;background:#FFFFFF !important;border:2px solid #999999 !important;-moz-border-radius:19px !important;-webkit-border-radius:19px;border-radius:19px !important;position:absolute !important;top:0 !important;bottom:0 !important;right:46px !important;-webkit-transition:all 0.3s ease-in !important;-o-transition:all 0.3s ease-in !important;transition:all 0.3s ease-in !important;-webkit-transition-delay:0s !important;transition-delay:0s !important;background-image:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwLjEiLz48c3RvcCBvZmZzZXQ9IjgwJSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwLjAiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJ1cmwoI2dyYWQpIiAvPjwvc3ZnPiA=') !important;background-size:100%;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(0,0,0,0.1)),color-stop(80%, rgba(0,0,0,0))) !important;background-image:-moz-linear-gradient(center top, rgba(0,0,0,0.1) 0%,rgba(0,0,0,0) 80%) !important;background-image:-webkit-linear-gradient(center top, rgba(0,0,0,0.1) 0%,rgba(0,0,0,0) 80%) !important;background-image:linear-gradient(to center bottom, rgba(0,0,0,0.1) 0%,rgba(0,0,0,0) 80%) !important;box-shadow:0 1px 1px white inset !important}.wfOnOffSwitch-checkbox:checked+.wfOnOffSwitch-label .wfOnOffSwitch-inner{margin-left:0 !important}.wfOnOffSwitch-checkbox:checked+.wfOnOffSwitch-label .wfOnOffSwitch-switch{right:0 !important}#wordfenceConfigWarning,#wordfenceAdminEmailWarning{clear:left;margin-top:5px}.wf-striped-table{width:100%;max-width:100%;border-collapse:collapse}.wf-striped-table th{border-left:1px solid #bdbdbd}.wf-striped-table th:first-of-type{border-left:0}.wf-striped-table th,.wf-striped-table td{padding:1rem}.wf-striped-table thead th,.wf-striped-table thead td,.wf-striped-table tfoot th,.wf-striped-table tfoot td,.wf-striped-table tbody.thead th,.wf-striped-table tbody.thead td{background-color:#ebebeb;color:#777;font-weight:bold;text-align:left}.wf-striped-table tbody tr.even td,.wf-striped-table tbody tr:nth-child(2n) td{background-color:#ffffff}.wf-striped-table tbody tr td,.wf-striped-table tbody tr.odd td{background-color:#fafafa}.wf-striped-table tbody tr:hover>td{background-color:#fffbd8}.wf-striped-table tbody.empty-row tr td{border-width:0;padding:8px 0;background-color:transparent}.wf-striped-table .wf-result-error,.wf-block-list .wf-result-error{color:#d0514c !important;font-weight:bold}.wf-striped-table .wf-result-error:before,.wf-block-list .wf-result-error:before{content:"\2718"}.wf-striped-table .wf-result-success{max-width:20%}.wf-striped-table .wf-result-success,.wf-block-list .wf-result-success{color:#008c10 !important;font-weight:bold}.wf-striped-table .wf-result-success:before,.wf-block-list .wf-result-success:before{content:"\2713"}.wf-striped-table .wf-result-success:before,.wf-block-list .wf-result-success:before,.wf-striped-table .wf-result-error:before,.wf-block-list .wf-result-error:before{font-size:16px;display:inline-block;margin:0px 8px 0px 0px}.wf-striped-table .wf-result-inactive,.wf-block-list .wf-result-inactive{font-weight:bold;color:#666666 !important}.wf-fixed-table{table-layout:fixed}pre.wf-pre{margin:8px 0 20px;padding:12px;background:#ffffff;border:1px solid #999999;overflow:auto}.wf-center{text-align:center}#wfConfigForm,.wf-diagnostics-wrapper{max-width:1035px}.wf-hidden{display:none !important}.wf-card{position:relative;margin:0 auto .625rem;padding:1rem;box-sizing:border-box;background:#fff;box-shadow:0 0 0 1px rgba(200,215,225,0.5),0 1px 2px #e9eff3}.wf-card .wf-card-inner{min-height:76px;width:100%;padding:8px;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;position:relative}.wf-card .wf-card-inner .wf-card-content{max-width:75%}.wf-card .wf-card-inner .wf-card-content .wf-card-title{font-size:1.125rem;width:100%}.wf-card .wf-card-inner .wf-card-content .wf-card-subtitle{margin-top:.125rem;margin-bottom:.125rem;font-size:.875rem;color:#4f748e}.wf-card .wf-card-inner .wf-card-action{position:absolute;top:0;right:0;height:100%;background:none;border:0;outline:0;width:48px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;vertical-align:middle;transition:transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275),color 0.2s ease-in}.wf-card .wf-card-inner .wf-card-action .wf-card-action-chevron{background:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJjaGV2cm9uLW9iamVjdCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiCgkgd2lkdGg9IjI0cHgiIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAyNCAyNCIKCSB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHBhdGggaWQ9ImNoZXZyb24iIGQ9Ik0yMCA5bC04IDgtOC04IDEuNDE0LTEuNDE0TDEyIDE0LjE3Mmw2LjU4Ni02LjU4NiIvPgo8L3N2Zz4K");background-repeat:no-repeat;background-position:center center;width:24px;height:24px;fill:#87a6bc}.wf-card .wf-card-inner .wf-card-action .wf-card-action-checkbox{background-image:url(../images/checkbox.png);background-repeat:no-repeat;background-position:left center;width:29px;height:29px}.wf-card .wf-card-inner .wf-card-action .wf-card-action-checkbox.checked{background-position:right center}.wf-card .wf-card-extra{display:none;padding:0.5rem;margin-top:1rem;border-top:1px solid #f3f6f8}@media (min-width: 768px){.wf-card .wf-card-extra{padding:1rem}}.wf-card.active .wf-card-extra{display:block}.wf-card.wf-card-left .wf-card-content{margin-left:48px}.wf-card.wf-card-left .wf-card-action{right:auto;left:0px}.wf-card.disabled .wf-card-content .wf-card-title{color:#aaaaaa}.wf-card.disabled .wf-card-content .wf-card-subtitle{color:#8ea6be}.wf-inline-block{display:inline-block}@media (max-width: 767px){.wf-inline-block-xs{display:inline-block}}.wf-full-width{width:100%;max-width:100%}.wf-no-top{margin-top:0 !important}.wf-add-top{margin-top:1rem !important}.wf-add-top-large{margin-top:1.5rem !important}.wf-add-top-medium{margin-top:0.75rem !important}.wf-add-top-small{margin-top:0.5rem !important}.wf-add-top-smaller{margin-top:0.25rem !important}.wf-no-bottom{margin-bottom:0 !important}.wf-add-bottom{margin-bottom:1rem !important}.wf-add-bottom-large{margin-bottom:1.5rem !important}.wf-add-bottom-medium{margin-bottom:0.75rem !important}.wf-add-bottom-small{margin-bottom:0.5rem !important}.wf-add-bottom-smaller{margin-bottom:0.25rem !important}.wf-padding-no-top{padding-top:0 !important}.wf-no-right{margin-right:0 !important}.wf-padding-no-bottom{padding-bottom:0 !important}.wf-padding-no-left{padding-left:0 !important}.wf-padding-no-right{padding-right:0 !important}.wf-padding-add-top{padding-top:1rem !important}.wf-padding-add-top-small{padding-top:0.5rem !important}.wf-padding-add-top-medium{padding-top:0.75rem !important}.wf-padding-add-top-large{padding-top:1.5rem !important}.wf-padding-add-bottom{padding-bottom:1rem !important}.wf-padding-add-bottom-small{padding-bottom:0.5rem !important}.wf-padding-add-bottom-medium{padding-bottom:0.75rem !important}.wf-padding-add-bottom-large{padding-bottom:1.5rem !important}.wf-padding-add-left{padding-left:1rem !important}.wf-padding-add-left-small{padding-left:0.5rem !important}.wf-padding-add-left-medium{padding-left:0.75rem !important}.wf-padding-add-left-large{padding-left:1.5rem !important}.wf-padding-add-right{padding-right:1rem !important}.wf-padding-add-right-small{padding-right:0.5rem !important}.wf-padding-add-right-medium{padding-right:0.75rem !important}.wf-padding-add-right-large{padding-right:1.5rem !important}.wf-left{text-align:left !important}.wf-center{text-align:center !important}.wf-block-center{margin:0 auto}.wf-right{text-align:right !important}.wf-block-right{margin:0 0 0 auto}@media (max-width: 767px){.wf-left-xs{text-align:left !important}.wf-center-xs{text-align:center !important}.wf-padding-add-top-xs{padding-top:1rem !important}.wf-padding-add-top-xs-small{padding-top:0.5rem !important}.wf-padding-add-top-xs-large{padding-top:1.5rem !important}.wf-padding-add-bottom-xs{padding-bottom:1rem !important}.wf-padding-add-bottom-xs-small{padding-bottom:0.5rem !important}.wf-padding-add-bottom-xs-large{padding-bottom:1.5rem !important}}@media (min-width: 768px) and (max-width: 991px){.wf-left-sm{text-align:left !important}.wf-center-sm{text-align:center !important}}@media (min-width: 992px) and (max-width: 1199px){.wf-left-md{text-align:left !important}.wf-center-md{text-align:center !important}}@media (min-width: 1200px){.wf-left-lg{text-align:left !important}.wf-center-lg{text-align:center !important}}.wf-border-no-top{border-top:none !important}.wf-border-no-right{border-right:none !important}.wf-border-no-bottom{border-bottom:none !important}.wf-border-no-left{border-left:none !important}.wf-overflow-x-auto{overflow-x:auto}.wf-overflow-y-auto{overflow-y:auto}@media (max-width: 767px){.wf-overflow-x-auto-xs{overflow-x:auto}.wf-overflow-y-auto-xs{overflow-y:auto}}.wf-blue{color:#00709e !important}.wf-blue-light{color:#008cc1 !important}.wf-gray-dark{color:#2d2d2d !important}.wf-gray-blue{color:#3f596b !important}.wf-green-dark{color:#11967a !important}.wf-green-light{color:#16bc9b !important}.wf-red-dark{color:#930000 !important}.wf-red-light{color:#c10000 !important}.wf-yellow-dark{color:#fcb214 !important}.wf-yellow-light{color:#ffd10a !important}.wf-gray{color:#525355 !important}.wf-gray-light{color:#9f9fa0 !important}.wf-nowrap{white-space:nowrap}.wf-tip{color:#fcb214;font-size:1.1rem;margin-right:0.25rem}.wf-text-small{font-size:80%}.wf-scroll-x::-webkit-scrollbar,.wf-scroll-y::-webkit-scrollbar{-webkit-appearance:none;width:7px;height:7px}.wf-scroll-x::-webkit-scrollbar-thumb,.wf-scroll-y::-webkit-scrollbar-thumb{border-radius:4px;background-color:rgba(0,0,0,0.194);-webkit-box-shadow:0 0 1px rgba(255,255,255,0.5)}.wf-split-word{word-wrap:break-word;word-break:break-all}@media (max-width: 767px){.wf-split-word-xs{word-wrap:break-word;word-break:break-all;white-space:normal !important}}.wfselect2-container{font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;min-width:200px}@media (min-width: 768px){.wfselect2-container{min-width:280px}}@media (min-width: 992px){.wfselect2-container{min-width:320px}}@media (max-width: 767px){.wfselect2-container .wfselect2-search.wfselect2-search--inline{margin:0 !important}}.wf-select2-placeholder-fix .wfselect2-search__field{width:auto !important}#wf-all-options-search .wfselect2-container{min-width:250px}#wf-all-options-search .wf-select2-placeholder-fix .wfselect2-search__field{margin-top:10px !important}.wf-page-title{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;margin-top:0.5rem}.wf-page-title>*{-webkit-flex-grow:0;flex-grow:0;min-width:0}.wf-page-title>*:first-child{-webkit-flex-grow:0;flex-grow:0;min-width:32px;-webkit-flex-basis:32px;flex-basis:32px;padding-right:0.25rem}.wf-page-title .wordfence-icon32{margin:0;margin-right:0.5rem}.wf-page-title h2{padding:0 !important}.wf-page-title .wfOnOffSwitch{-webkit-flex-basis:69px;flex-basis:69px;-webkit-flex-shrink:0;flex-shrink:0;margin-left:0.5rem}.wf-tab-container{background-color:#fff}@media (min-width: 768px){.wf-tab-container{background-color:unset}}.wf-page-tabs,.wf-page-fixed-tabs{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;border-bottom:1px solid #d0d0d0;margin:0;margin-top:0.5rem;margin-left:-10px;margin-right:-10px}@media (min-width: 768px){.wf-page-tabs,.wf-page-fixed-tabs{margin-left:0;margin-right:0}}.wf-page-tabs>*,.wf-page-fixed-tabs>*{-webkit-flex-grow:0;flex-grow:0;min-width:0}.wf-page-tabs>*:first-child,.wf-page-fixed-tabs>*:first-child{-webkit-flex-grow:0;flex-grow:0;min-width:32px;-webkit-flex-basis:32px;flex-basis:32px}.wf-page-tabs .wordfence-icon32,.wf-page-fixed-tabs .wordfence-icon32{margin:0;margin-right:0.5rem;margin-left:0.5rem}@media (min-width: 768px){.wf-page-tabs .wordfence-icon32,.wf-page-fixed-tabs .wordfence-icon32{margin-left:0}}.wf-page-tabs .wf-text-tab,.wf-page-fixed-tabs .wf-text-tab{margin:0;margin-left:0.5rem;color:#333}.wf-page-tabs .wf-tab,.wf-page-fixed-tabs .wf-tab{border:1px solid #fff;border-top-right-radius:0.5rem;border-top-left-radius:0.5rem;border-bottom:none;margin-bottom:-1px;margin-right:0.5rem;color:#333}@media (min-width: 768px){.wf-page-tabs .wf-tab,.wf-page-fixed-tabs .wf-tab{border:1px solid #d0d0d0;background:#e6e6e6}}.wf-page-tabs .wf-tab a,.wf-page-fixed-tabs .wf-tab a{display:block;padding:0.5rem 1rem;font-size:14px;line-height:24px;text-decoration:none;font-weight:bold;color:#333}.wf-page-tabs .wf-tab.wf-active,.wf-page-tabs .wf-tab:hover,.wf-page-fixed-tabs .wf-tab.wf-active,.wf-page-fixed-tabs .wf-tab:hover{border-bottom:1px solid #f1f1f1;background:#f1f1f1;color:#00709e;-webkit-box-shadow:none;box-shadow:none}.wf-page-tabs .wf-tab.wf-active a,.wf-page-tabs .wf-tab:hover a,.wf-page-fixed-tabs .wf-tab.wf-active a,.wf-page-fixed-tabs .wf-tab:hover a{color:#00709e}.wf-tab-content{display:none;margin-top:15px}.wf-tab-content.wf-active{display:block}.wf-fixed-tab-content{margin-top:15px}.wf-section-title{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start}.wf-section-title>*{-webkit-flex-grow:0;flex-grow:0;min-width:0}.wf-section-title>h1,.wf-section-title>h2,.wf-section-title>h3,.wf-section-title>h4,.wf-section-title>h5,.wf-section-title>h6{-webkit-flex-grow:1;flex-grow:1;color:#2d2d2d !important;font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif !important;line-height:1.5rem !important;font-weight:700 !important;padding:0 !important;margin:0 !important}@media (min-width: 768px){.wf-section-title>h1,.wf-section-title>h2,.wf-section-title>h3,.wf-section-title>h4,.wf-section-title>h5,.wf-section-title>h6{padding-right:0.25rem !important}}.wf-section-title h2{font-size:1.3125rem;line-height:1.5}.wf-section-title h3{font-size:1.125rem}.wf-section-title h4{font-size:1rem}.wf-section-title .wordfence-icon32{margin:0;margin-right:0.5rem}.wf-status-circular{position:relative}.wf-status-circular-text{position:absolute;left:50%;top:50%;padding:0;margin:0;transform:translate(-50%, -50%);color:#aaa;font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:1.3125rem;font-weight:300;line-height:1.5}.wf-status-circular .wf-status-overlay-text{position:absolute;left:50%;top:50%;padding:0;margin:0;width:200%;text-align:center;transform:translate(-50%, -50%);font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:.875rem;font-weight:normal;line-height:1.3125;opacity:0.0;color:#777}.wf-status-warning,.wf-status-critical,.wf-status-payment-expiring,.wf-status-renewing{width:100px;height:100px;margin-bottom:1rem}.wf-status-warning svg path{fill:#fcb214}.wf-status-critical svg path{fill:#930000}.wf-status-payment-expiring svg rect,.wf-status-payment-expiring svg path{fill:#930000}.wf-status-renewing svg rect,.wf-status-renewing svg path{fill:#11967a}#howGetIPs-preview{color:#8c8c8c}#howGetIPs-preview strong{color:#666}.wf-scrollTop{background:#424242;bottom:30px;right:15px;position:fixed;z-index:999;display:none}.wf-scrollTop a{background:#959595;display:block;padding:4px 5px;line-height:32px;width:32px;color:#ffffff;text-align:center}.wf-back-icon{color:#00709e;margin-right:0.75rem;font-size:1.5rem !important}.wf-back-link-chevron{margin-left:1rem}.wf-back-link-chevron:first-of-type{margin-left:0}.wf-back-link{font-weight:bold;text-decoration:none}.wf-premium-link{font-weight:bold}.wf-boolean-switch{border:1px solid #aaa;display:block;cursor:pointer;width:54px;height:30px;min-width:54px;min-height:30px;-moz-border-radius:15px;-webkit-border-radius:15px;border-radius:15px;line-height:30px !important;background-color:#ffffff;position:relative;box-sizing:border-box;transition:background-color 0.2s ease-in-out, border-color 0.2s ease-in-out}@media (min-width: 768px){.wf-boolean-switch{width:34px;height:20px;min-width:34px;min-height:20px;-moz-border-radius:10px;-webkit-border-radius:10px;border-radius:10px;line-height:20px !important}}.wf-boolean-switch .wf-boolean-switch-handle{position:relative;display:block;border:1px solid #aaa;background-color:#fff;width:30px;height:30px;min-width:30px;min-height:30px;-moz-border-radius:15px;-webkit-border-radius:15px;border-radius:15px;margin-top:-1px;box-sizing:border-box;left:-1px;transition:border-color 0.2s ease-in-out, left 0.2s ease-in-out}@media (min-width: 768px){.wf-boolean-switch .wf-boolean-switch-handle{width:20px;height:20px;min-width:20px;min-height:20px;-moz-border-radius:10px;-webkit-border-radius:10px;border-radius:10px}}.wf-boolean-switch.wf-active{border:1px solid #00709e;background-color:#00709e}.wf-boolean-switch.wf-active .wf-boolean-switch-handle{border:1px solid #00709e;left:25px}@media (min-width: 768px){.wf-boolean-switch.wf-active .wf-boolean-switch-handle{left:15px}}.wf-boolean-switch.wf-disabled{pointer-events:none;border-color:#e2e2e2}.wf-boolean-switch.wf-disabled .wf-boolean-switch-handle{border-color:#e2e2e2}.wf-boolean-switch.wf-disabled.wf-active{border-color:#e2e2e2;background-color:#e2e2e2}.wf-boolean-switch.wf-disabled.wf-active .wf-boolean-switch-handle{border-color:#e2e2e2}.wf-option-checkbox,[type=checkbox].wf-option-checkbox+label:before{content:"";font-family:"Ionicons" !important;display:block;cursor:pointer;width:30px;height:30px;min-width:30px;min-height:30px;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;line-height:30px !important;text-align:center !important;background-color:#ffffff !important;box-shadow:0px 0px 0px 1px #aaa;color:#ffffff !important;font-size:30px !important;font-weight:normal !important}@media (min-width: 768px){.wf-option-checkbox,[type=checkbox].wf-option-checkbox+label:before{width:20px;height:20px;min-width:20px;min-height:20px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;line-height:21px !important;font-size:25px !important}}@media (min-width: 768px){.wf-option-checkbox{position:relative}.wf-option-checkbox>*{position:absolute;top:9px;left:50%;transform:translateX(-50%) translateY(-50%)}}.wf-option-radio,[type=radio].wf-option-radio+label:before{content:"\f401";font-family:"Ionicons" !important;display:block;cursor:pointer;width:30px;height:30px;min-width:30px;min-height:30px;line-height:30px !important;text-align:center !important;color:#ccc !important;font-size:30px !important;font-weight:normal !important}@media (min-width: 768px){.wf-option-radio,[type=radio].wf-option-radio+label:before{width:20px;height:20px;min-width:20px;min-height:20px;-moz-border-radius:10px;-webkit-border-radius:10px;border-radius:10px;line-height:20px !important}}[type=checkbox].wf-option-checkbox.wf-small+label:before{width:20px;height:20px;min-width:20px;min-height:20px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;line-height:21px !important;font-size:20px !important}[type=radio].wf-option-radio.wf-small+label:before{width:20px;height:20px;min-width:20px;min-height:20px;line-height:21px !important;font-size:20px !important}[type=checkbox].wf-option-checkbox+label:before,[type=radio].wf-option-radio+label:before{text-align:center !important;text-indent:0px;display:inline-block;vertical-align:-6px;margin:0px 5px 0px 0px;font-weight:normal;font-style:normal}[type=checkbox].wf-option-checkbox.wf-small+label:before,[type=radio].wf-option-radio.wf-small+label:before{text-indent:0px;vertical-align:-3px}.wf-option-checkbox.wf-checked,[type=checkbox].wf-option-checkbox:checked+label:before{color:#ffffff !important;box-shadow:0px 0px 0px 1px #00709e !important;background-color:#00709e !important}.wf-option-checkbox.wf-disabled,[type=checkbox].wf-option-checkbox:disabled+label:before{color:#f1f1f1 !important;box-shadow:0px 0px 0px 1px #e2e2e2 !important;background-color:#f1f1f1 !important}.wf-option-checkbox.wf-checked.wf-disabled,[type=checkbox].wf-option-checkbox:disabled:checked+label:before{color:#777 !important;box-shadow:0px 0px 0px 1px #e2e2e2 !important;background-color:#f1f1f1 !important}.wf-option-radio.wf-checked,[type=radio].wf-option-radio:checked+label:before{content:"\f3a7";color:#00709e !important}.wf-option-checkbox[type=checkbox],.wf-option-checkbox[type=radio],.wf-option-radio[type=checkbox],.wf-option-radio[type=radio]{position:absolute;left:-9999px}.wf-option-text input[type="text"],input.wf-input-text{text-align:left;width:100%;height:40px;border-radius:0;border:0;background-color:#ffffff;box-shadow:1px 1px 1px 2px rgba(215,215,215,0.65)}.wf-option-text input[type="text"]:placeholder-shown,input.wf-input-text:placeholder-shown{font-style:italic;color:#bfbfbf}::-webkit-input-placeholder{color:#bfbfbf}:-moz-placeholder{color:#bfbfbf;opacity:1}::-moz-placeholder{color:#bfbfbf;opacity:1}:-ms-input-placeholder{color:#bfbfbf}::-ms-input-placeholder{color:#bfbfbf}::placeholder{color:#bfbfbf}.wf-option-premium .wf-option-title,.wf-option-premium .wf-option-title>ul>li,.wf-option.wf-disabled .wf-option-title,.wf-option.wf-disabled .wf-option-title>ul>li{color:#aaa !important}.wf-option-premium .wf-option-checkbox,.wf-option-premium .wf-option-radio,.wf-option.wf-disabled .wf-option-checkbox,.wf-option.wf-disabled .wf-option-radio{opacity:0.5}.wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status .wf-block-labeled-value-value{padding-top:0}.wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status .wf-block-labeled-value-value .wf-fa{font-size:8rem}.wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status .wf-block-labeled-value-value svg{width:160px}.wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status .wf-block-labeled-value-label{font-size:1.35rem;font-weight:300;padding-bottom:0}.wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status-premium .wf-block-labeled-value-value{color:#9f9fa0}.wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status-premium .wf-block-labeled-value-value svg{fill:#9f9fa0}.wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status-premium .wf-block-labeled-value-label{color:#9f9fa0}.wf-indeterminate-progress{-webkit-animation:wf-indeterminate-progress-keyframes 1s steps(8, end) infinite;-o-animation:wf-indeterminate-progress-keyframes 1s steps(8, end) infinite;animation:wf-indeterminate-progress-keyframes 1s steps(8, end) infinite}.wf-indeterminate-progress path{fill:#00709e}@-moz-keyframes wf-indeterminate-progress-keyframes{to{-moz-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes wf-indeterminate-progress-keyframes{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes wf-indeterminate-progress-keyframes{to{-moz-transform:rotate(360deg);-ms-transform:rotate(360deg);-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.wf-flex-row{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:row;flex-direction:row}.wf-flex-row .wf-flex-row-1{-webkit-flex-grow:1;flex-grow:1}.wf-flex-row .wf-flex-row-0{-webkit-flex-grow:0;flex-grow:0}.wf-switch{display:-webkit-flex !important;display:flex !important;-webkit-align-items:stretch !important;align-items:stretch !important;-webkit-justify-content:flex-start !important;justify-content:flex-start !important;-webkit-flex-direction:row !important;flex-direction:row !important;margin:0;padding:0}.wf-switch>li{margin:0 !important;padding:0.5rem 0.7rem !important;text-transform:uppercase;cursor:pointer;color:#aaa;font-weight:400;border-top:1px solid #bfbfbf;border-bottom:1px solid #bfbfbf;border-right:1px solid #bfbfbf}.wf-switch>li:first-of-type{border-left:1px solid #bfbfbf;-moz-border-radius-topleft:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px}.wf-switch>li:last-of-type{-moz-border-radius-topright:6px;-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-moz-border-radius-bottomright:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px}.wf-switch>li.wf-active{color:#ffffff;background-color:#00709e}.wf-tooltip,.ui-widget.wf-tooltip{max-width:600px;font-size:0.75rem;overflow-wrap:break-word}.wf-widget-learning-mode{border-top:1px solid #eee;margin:0 -1rem;padding:1rem;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;-webkit-flex-direction:row;flex-direction:row}@media (min-width: 768px){.wf-widget-learning-mode{padding:1.5rem}}.wf-widget-learning-mode svg{width:18px}.wf-widget-learning-mode svg path{fill:#aaa}.wf-widget-learning-mode span{padding-left:0.5rem;font-size:.875rem;line-height:1.3125;font-weight:600}.wf-drawer-overlay{position:fixed;top:0px;right:0px;bottom:0px;left:160px;background-color:rgba(0,0,0,0.5);z-index:9980;padding:5rem 0}.folded .wf-drawer-overlay{left:36px}@media only screen and (max-width: 960px){.auto-fold .wf-drawer-overlay{left:36px}}.rtl .wf-drawer-overlay{right:160px;left:0px}.rtl .folded .wf-drawer-overlay{right:36px}@media only screen and (max-width: 960px){.rtl .auto-fold .wf-drawer-overlay{right:36px}}@media screen and (max-width: 782px){.wf-drawer-overlay,.folded .wf-drawer-overlay,.auto-fold .wf-drawer-overlay,.rtl .wf-drawer-overlay,.rtl .folded .wf-drawer-overlay,.rtl .auto-fold .wf-drawer-overlay{left:0px;right:0px}}.wf-drawer{background-color:#ffffff;position:fixed;top:32px;bottom:0px;right:0px;z-index:9981}.wf-drawer .wf-modal{display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:column;flex-direction:column;height:100%}.wf-drawer .wf-modal ul,.wf-drawer .wf-modal li{padding:0;margin:0}.wf-drawer .wf-modal .wf-modal-header{-webkit-flex-shrink:0;flex-shrink:0;min-height:44px;padding:1rem;width:100%;box-sizing:border-box;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between;position:relative;background-color:#00709e;color:#ffffff}.wf-drawer .wf-modal .wf-modal-header .wf-modal-header-content{max-width:75%}.wf-drawer .wf-modal .wf-modal-header .wf-modal-header-content .wf-modal-title{font-size:1.3125rem;line-height:1.5;font-weight:300;width:100%;transition:color 0.2s ease-in}.wf-drawer .wf-modal .wf-modal-header .wf-modal-header-content .wf-modal-subtitle{margin-top:.125rem;margin-bottom:.125rem;font-size:.575rem;color:#4f748e}.wf-drawer .wf-modal .wf-modal-content{-webkit-flex-grow:1;flex-grow:1;display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:column;flex-direction:column;padding:1rem}.wf-drawer .wf-modal .wf-modal-content>*:first-child{margin-top:0}.wf-drawer .wf-modal .wf-modal-content select,.wf-drawer .wf-modal .wf-modal-content select option,.wf-drawer .wf-modal .wf-modal-content .wfselect2-container--default{font-size:0.7rem;font-weight:bold}@media (min-width: 768px){.wf-drawer .wf-modal .wf-modal-content select,.wf-drawer .wf-modal .wf-modal-content select option,.wf-drawer .wf-modal .wf-modal-content .wfselect2-container--default{font-size:0.8rem}}@media (min-width: 992px){.wf-drawer .wf-modal .wf-modal-content select,.wf-drawer .wf-modal .wf-modal-content select option,.wf-drawer .wf-modal .wf-modal-content .wfselect2-container--default{font-size:0.9rem}}.wf-drawer .wf-modal .wf-modal-content .wf-option-select-option,.wf-drawer .wf-modal .wf-modal-content .wfselect2-container--default,.wf-drawer .wf-modal .wf-modal-content .wfselect2-container--default .wfselect2-selection--single{text-align:left;height:40px;border-radius:0;border:0;background-color:#ffffff;box-shadow:1px 1px 1px 2px rgba(215,215,215,0.35)}.wf-drawer .wf-modal .wf-modal-content .wf-option-select-option .wfselect2-selection__rendered,.wf-drawer .wf-modal .wf-modal-content .wfselect2-container--default .wfselect2-selection__rendered,.wf-drawer .wf-modal .wf-modal-content .wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__rendered{color:#333;line-height:40px}.wf-drawer .wf-modal .wf-modal-content .wf-option-select-option .wfselect2-selection__arrow,.wf-drawer .wf-modal .wf-modal-content .wfselect2-container--default .wfselect2-selection__arrow,.wf-drawer .wf-modal .wf-modal-content .wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__arrow{height:38px}.wf-drawer .wf-modal .wf-modal-content .wf-option-select-option.wfselect2-container--disabled .wfselect2-selection__rendered,.wf-drawer .wf-modal .wf-modal-content .wfselect2-container--default.wfselect2-container--disabled .wfselect2-selection__rendered,.wf-drawer .wf-modal .wf-modal-content .wfselect2-container--default .wfselect2-selection--single.wfselect2-container--disabled .wfselect2-selection__rendered{color:#aaa}.wf-drawer .wf-modal .wf-modal-content .wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__arrow b{border-color:#333 transparent transparent}.wf-drawer .wf-modal .wf-modal-content .wfselect2-container--default.wfselect2-container--open .wfselect2-selection--single .wfselect2-selection__arrow b{border-color:transparent transparent #333}.wf-drawer .wf-modal .wf-modal-footer{-webkit-flex-shrink:0;flex-shrink:0;min-height:44px;padding:1rem;width:100%;box-sizing:border-box;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between;position:relative;background-color:#f1f1f1;border-top:1px solid #d9d9d9}.wf-mobile-menu-overlay{position:fixed;top:0px;right:0px;bottom:0px;left:0px;background-color:rgba(0,0,0,0.5);z-index:100000}.wf-mobile-menu-overlay>.wf-mobile-menu-tap-hint{position:absolute;top:25%;left:50%;transform:translateX(-50%);color:#ffffff;font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:1.3125rem;font-weight:300;line-height:1.5}.wf-mobile-menu{position:fixed;left:50%;transform:translateX(-50%);z-index:100001}.wf-mobile-menu>.wf-mobile-menu-items{margin:0;padding:0 0 0.25rem 0;list-style:none}.wf-mobile-menu>.wf-mobile-menu-items>li{margin:0;padding:0.25rem 0}.wf-mobile-menu>.wf-mobile-menu-items>li>a{box-sizing:border-box}.wf-circle-tooltip.ui-tooltip{padding:0;font-size:0.7rem;max-width:400px;border:1px solid #9f9fa0;position:absolute !important;z-index:3000;-moz-border-radius:6px;-webkit-border-radius:6px;border-radius:6px}.wf-circle-tooltip.ui-tooltip h4{margin:0 0 10px}.wf-circle-tooltip.ui-tooltip ul{margin:10px 0}.wf-circle-tooltip.ui-tooltip p{font-size:0.7rem;margin:10px 0 0}.wf-circle-tooltip.ui-tooltip a{color:#00709e;text-decoration:none}.wf-circle-tooltip.ui-tooltip a:hover{text-decoration:underline}.wf-circle-tooltip.ui-tooltip .wf-circle-tooltip-header,.wf-circle-tooltip.ui-tooltip .wf-circle-tooltip-body{padding:12px}.wf-circle-tooltip.ui-tooltip .wf-circle-tooltip-header{-moz-border-radius:6px 6px 0px 0px;-webkit-border-radius:6px;border-radius:6px 6px 0px 0px;background-color:#f1f1f1}.wf-circle-tooltip.ui-tooltip .wf-circle-tooltip-header h4{margin:0;font-size:0.8rem}.wf-circle-tooltip.ui-tooltip .wf-circle-tooltip-body .wf-tooltip-status-circle{position:relative;padding:0 10px 0 0}.wf-circle-tooltip.ui-tooltip .wf-circle-tooltip-body .wf-tooltip-status-circle .wf-status-overlay-text{display:none}.wf-circle-tooltip.ui-tooltip .wf-circle-tooltip-body ul li strong{width:20%}.wf-circle-tooltip.ui-tooltip .wf-circle-tooltip-body ul li span{width:80%}.wf-circle-tooltip.ui-tooltip .wf-circle-tooltip-block{position:relative;background-color:#fff;z-index:3001;-moz-border-radius:6px;-webkit-border-radius:6px;border-radius:6px}.wf-circle-tooltip.ui-tooltip .wf-circle-tooltip-block:after{content:'';position:absolute;bottom:-20px;left:20px;width:0;height:0;border-left:20px solid transparent;border-right:20px solid transparent;border-top:20px solid #fff}.wf-circle-tooltip.ui-tooltip:after{content:'';position:absolute;bottom:-22px;left:18px;width:0;height:0;border-left:22px solid transparent;border-right:22px solid transparent;border-top:22px solid rgba(0,0,0,0.5);filter:blur(2px)}.wf-circle-tooltip.ui-tooltip.wf-tooltip-vertical-top:after{top:-22px;bottom:auto;border-left:22px solid transparent;border-right:22px solid transparent;border-bottom:22px solid rgba(0,0,0,0.5);border-top-width:0}.wf-circle-tooltip.ui-tooltip.wf-tooltip-vertical-top .wf-circle-tooltip-block:after{top:-20px;bottom:auto;border-left:20px solid transparent;border-right:20px solid transparent;border-bottom:20px solid #f1f1f1;border-top-width:0}.wf-circle-tooltip.ui-tooltip.wf-tooltip-vertical-top.wf-tooltip-horizontal-right:after{left:auto;right:18px}.wf-circle-tooltip.ui-tooltip.wf-tooltip-vertical-top.wf-tooltip-horizontal-right .wf-circle-tooltip-block:after{left:auto;right:20px}.wf-circle-tooltip.ui-tooltip.wf-tooltip-vertical-bottom.wf-tooltip-horizontal-right:after{left:auto;right:18px}.wf-circle-tooltip.ui-tooltip.wf-tooltip-vertical-bottom.wf-tooltip-horizontal-right .wf-circle-tooltip-block:after{left:auto;right:20px}#wf-mobile-controls{white-space:nowrap;font-size:1.2rem}.wf-callout-warning{background-color:#feecc4;padding:0.8rem 1.25rem}.wf-tip-light-bulb{color:#fcb214;font-size:1.5rem;font-weight:bold}.wf-tip-info-message{padding-left:0.5rem !important;font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:.875rem;color:#2d2d2d;line-height:1.3125;font-weight:normal}.wf-block{position:relative;margin:0 auto 0.5rem;padding:0 1rem;box-sizing:border-box;background-color:#fff;box-shadow:0 0 0 1px rgba(200,215,225,0.25),0 1px 2px #e9eff3}@media (min-width: 768px){.wf-block{padding:0 1.5rem}}.wf-block.wf-block-no-padding{padding:0}.wf-block.wf-block-transparent{background-color:transparent;box-shadow:none}.wf-block .wf-block-banner{min-height:44px;margin:0 -1rem;padding:0;box-sizing:border-box;position:relative;background-color:#fcb214;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between;-webkit-flex-direction:row;flex-direction:row}.wf-block .wf-block-banner>li{margin:0;padding:0.75rem 1rem}@media (min-width: 768px){.wf-block .wf-block-banner{margin:0 -1.5rem}.wf-block .wf-block-banner>li{padding:0.75rem 1.5rem}}.wf-block .wf-block-header{min-height:44px;padding:1rem 0;width:100%;box-sizing:border-box;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between;position:relative}.wf-block .wf-block-header .wf-block-header-content{max-width:75%}.wf-block .wf-block-header .wf-block-header-content .wf-block-title{font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:0.9rem;width:100%;transition:color 0.2s ease-in}.wf-block .wf-block-header .wf-block-header-content .wf-block-subtitle{margin-top:.125rem;margin-bottom:.125rem;font-size:0.775rem}.wf-block .wf-block-header .wf-block-header-action{position:absolute;top:0;right:0;height:100%;background:none;border:0;outline:0;width:48px;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-end;justify-content:flex-end;vertical-align:middle;transition:transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275),color 0.2s ease-in}.wf-block .wf-block-header .wf-block-header-action.wf-block-header-action-text{width:auto}.wf-block .wf-block-header .wf-block-header-action.wf-block-header-action-text.wf-block-header-action-text-success{color:#11967a}.wf-block .wf-block-header .wf-block-header-action.wf-block-header-action-text.wf-block-header-action-text-warning{color:#930000}.wf-block .wf-block-header .wf-block-header-action.wf-block-header-action-text.wf-block-header-action-text-warning a{color:#930000}.wf-block .wf-block-header .wf-block-header-action .wf-block-header-action-chevron{background:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJjaGV2cm9uLW9iamVjdCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiCgkgd2lkdGg9IjI0cHgiIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAyNCAyNCIKCSB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHBhdGggaWQ9ImNoZXZyb24iIGQ9Ik0yMCA5bC04IDgtOC04IDEuNDE0LTEuNDE0TDEyIDE0LjE3Mmw2LjU4Ni02LjU4NiIvPgo8L3N2Zz4K");background-repeat:no-repeat;background-position:center center;width:24px;height:24px}.wf-block .wf-block-header .wf-block-header-action .wf-block-header-action-disclosure{background:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJkaXNjbG9zdXJlLWNsb3NlZC1vYmplY3QiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHdpZHRoPSIxMnB4IiBoZWlnaHQ9IjEycHgiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMTIgMTIiCgkgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxwYXRoIGlkPSJkaXNjbG9zdXJlLWNsb3NlZCIgZD0iTSA2IDAgbCA2IDYgLTYgNiAwIC0xMiIgZmlsbD0iIzc3NyIvPgo8L3N2Zz4=");background-repeat:no-repeat;background-position:center center;width:12px;height:12px;transition:transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275),background 0.2s ease-in}.wf-block .wf-block-header .wf-block-header-action .wf-block-header-action-checkbox{background-image:url(../images/checkbox.png);background-repeat:no-repeat;background-position:left center;width:29px;height:29px}.wf-block .wf-block-header .wf-block-header-action .wf-block-header-action-checkbox.wf-checked{background-position:right center}.wf-block .wf-block-content{display:none;margin:0 -1rem;padding:0 1rem}@media (min-width: 768px){.wf-block .wf-block-content{margin:0 -1.5rem;padding:0 1.5rem}}.wf-block .wf-block-content .wf-block-list{margin:0 -1rem;padding:0;list-style:none}@media (min-width: 768px){.wf-block .wf-block-content .wf-block-list{margin:0 -1.5rem}}.wf-block .wf-block-content .wf-block-list.wf-block-list-striped>li:nth-of-type(odd){background-color:#f9f9f9}.wf-block .wf-block-content .wf-block-list.wf-block-list-striped>li:nth-of-type(even){background-color:#ffffff}.wf-block .wf-block-content .wf-block-list>li{display:block;min-height:44px;padding:0 1rem;margin:0;border-top:1px solid #e2e2e2;box-sizing:border-box;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between}@media (min-width: 768px){.wf-block .wf-block-content .wf-block-list>li{padding:0 1.5rem}}.wf-block .wf-block-content .wf-block-list>li>*:first-child{-webkit-flex-grow:1;flex-grow:1;min-width:0}.wf-block .wf-block-content .wf-block-list.wf-block-list-horizontal{box-sizing:border-box;margin-top:-1px;display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-align-content:flex-start;align-content:flex-start;-webkit-justify-content:space-between;justify-content:space-between;-webkit-flex-wrap:wrap;flex-wrap:wrap}.wf-block .wf-block-content .wf-block-list.wf-block-list-horizontal>li{-webkit-flex-grow:1;flex-grow:1;-webkit-flex-basis:100%;flex-basis:100%;border-left:1px solid #e2e2e2}@media (min-width: 768px){.wf-block .wf-block-content .wf-block-list.wf-block-list-horizontal>li{-webkit-flex-basis:50%;flex-basis:50%}}@media (min-width: 992px){.wf-block .wf-block-content .wf-block-list.wf-block-list-horizontal>li{-webkit-flex-basis:25%;flex-basis:25%}}.wf-block .wf-block-content .wf-block-list.wf-block-list-horizontal.wf-block-list-nowrap{overflow-y:auto;-webkit-flex-wrap:nowrap;flex-wrap:nowrap}.wf-block .wf-block-content .wf-block-list.wf-block-list-horizontal.wf-block-list-nowrap>li{-webkit-flex-shrink:0;flex-shrink:0}.wf-block .wf-block-content .wf-block-list.wf-block-list-horizontal.wf-block-list-horizontal-5>li{-webkit-flex-grow:1;flex-grow:1;-webkit-flex-basis:20%;flex-basis:20%}.wf-block .wf-block-content .wf-block-list.wf-block-list-horizontal>*:first-child{border-left:0}@media (min-width: 768px){.wf-block .wf-block-content .wf-block-list.wf-block-list-horizontal.wf-block-list-equal>li{max-width:50%}}@media (min-width: 992px){.wf-block .wf-block-content .wf-block-list.wf-block-list-horizontal.wf-block-list-equal>li{max-width:25%}}.wf-block .wf-block-content .wf-block-list.wf-block-list-horizontal.wf-block-list-horizontal-5.wf-block-list-equal>li{max-width:20%}.wf-block .wf-block-content .wf-block-list .wf-block-list-state{text-align:center}@media (min-width: 1200px){.wf-block .wf-block-content .wf-block-list .wf-block-list-state{text-align:left}}.wf-block .wf-block-content .wf-block-list .wf-block-list-state-enabled .wf-fa{color:#11967a}.wf-block .wf-block-content .wf-block-list .wf-block-list-state-disabled .wf-fa{color:#525355}.wf-block .wf-block-content .wf-block-list .wf-block-list-state-premium{color:#9f9fa0}.wf-block .wf-block-content .wf-block-list .wf-block-list-dismiss{padding-left:2rem;font-size:1.25rem}.wf-block .wf-block-content .wf-block-list .wf-block-list-dismiss a{color:#525355}.wf-block .wf-block-content:first-child>.wf-block-list>li:first-child{border-top:none}.wf-block .wf-block-content .wf-block-left-right{margin:0 -1rem;padding:0;list-style:none;display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-align-content:flex-start;align-content:flex-start;-webkit-justify-content:space-between;justify-content:space-between;-webkit-flex-wrap:wrap;flex-wrap:wrap}@media (min-width: 768px){.wf-block .wf-block-content .wf-block-left-right{margin:0 -1.5rem}}.wf-block .wf-block-content .wf-block-left-right.wf-block-left-right-nowrap{-webkit-flex-wrap:nowrap;flex-wrap:nowrap}.wf-block .wf-block-content .wf-block-left-right>li{display:block;min-height:44px;padding:0;margin:0;box-sizing:border-box;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between}.wf-block .wf-block-content .wf-block-left-right>li>*:first-child{-webkit-flex-grow:1;flex-grow:1;min-width:0}.wf-block .wf-block-content .wf-block-left-right>li.wf-left{text-align:left}.wf-block .wf-block-content .wf-block-left-right>li.wf-right{text-align:right}.wf-block .wf-block-content .wf-block-left-center-right{margin:0 -1rem;padding:0;list-style:none;display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-align-content:center;align-content:center;-webkit-justify-content:space-between;justify-content:space-between;-webkit-flex-direction:row;flex-direction:row;-webkit-flex-wrap:nowrap;flex-wrap:nowrap}.wf-block .wf-block-content .wf-block-left-center-right>li{display:block;min-height:44px;padding:0;margin:0;box-sizing:border-box;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-grow:1;flex-grow:1;-webkit-flex-basis:33.3333%;flex-basis:33.3333%;max-width:33.3333%}.wf-block .wf-block-content .wf-block-left-center-right>li a{text-decoration:none;font-size:.875rem}.wf-block .wf-block-content .wf-block-left-center-right>li.wf-left{text-align:left}.wf-block .wf-block-content .wf-block-left-center-right>li.wf-center{text-align:center;-webkit-justify-content:center;justify-content:center}.wf-block .wf-block-content .wf-block-left-center-right>li.wf-center .wordfence-icon32{margin:0}.wf-block .wf-block-content .wf-block-left-center-right>li.wf-right{text-align:right;-webkit-justify-content:flex-end;justify-content:flex-end}.wf-block .wf-block-content .wf-block-labeled-value{box-sizing:border-box;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between;-webkit-flex-direction:column;flex-direction:column;margin:0 -1rem;padding:1rem}@media (min-width: 768px){.wf-block .wf-block-content .wf-block-labeled-value{margin:0 -1.5rem;padding:1.5rem}}.wf-block .wf-block-content .wf-block-labeled-value-value{font-size:3rem;line-height:3rem;color:#9f9fa0;padding:1rem}.wf-block .wf-block-content .wf-block-labeled-value-label{font-size:0.75rem;color:#9f9fa0;padding:0 1rem 1rem 1rem}.wf-block.wf-block-no-header .wf-block-content .wf-block-list>li{border-top:none}.wf-block.wf-active .wf-block-content,.wf-block.wf-always-active .wf-block-content{display:block}.wf-block.wf-active>.wf-block-header>.wf-block-header-content>.wf-block-title{color:#00709e}.wf-block.wf-active>.wf-block-header>.wf-block-header-content>.wf-block-header-action>.wf-block-header-action-disclosure{background:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJkaXNjbG9zdXJlLWNsb3NlZC1vYmplY3QiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHdpZHRoPSIxMnB4IiBoZWlnaHQ9IjEycHgiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMTIgMTIiCgkgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxwYXRoIGlkPSJkaXNjbG9zdXJlLWNsb3NlZCIgZD0iTSA2IDAgbCA2IDYgLTYgNiAwIC0xMiIgZmlsbD0iIzAwNzA5ZSIvPgo8L3N2Zz4=") !important;transform:rotate(90deg)}.wf-block.wf-disabled>.wf-block-header>.wf-block-header-content>.wf-block-title,.wf-block.wf-disabled>.wf-block-header>.wf-block-header-content>.wf-block-subtitle{color:#bfbfbf !important}.wf-block.wf-disabled>.wf-block-header>.wf-block-header-content>.wf-block-header-action>.wf-block-header-action-disclosure{background:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJkaXNjbG9zdXJlLWNsb3NlZC1vYmplY3QiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHdpZHRoPSIxMnB4IiBoZWlnaHQ9IjEycHgiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMTIgMTIiCgkgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxwYXRoIGlkPSJkaXNjbG9zdXJlLWNsb3NlZCIgZD0iTSA2IDAgbCA2IDYgLTYgNiAwIC0xMiIgZmlsbD0iI2JkYmRiZCIvPgo8L3N2Zz4=") !important;transform:rotate(0deg)}.wf-block.wf-disabled>.wf-block-content{display:none !important}.wf-block.wf-block-header-left .wf-block-header-content{margin-left:48px}.wf-block.wf-block-header-left .wf-block-header-action{right:auto;left:0px}.wf-block.wf-disabled .wf-dashboard-item-content .wf-block-title{color:#aaaaaa}.wf-block.wf-disabled .wf-dashboard-item-content .wf-block-subtitle{color:#8ea6be}.wf-section-title{margin-bottom:1rem}.wf-status-detail{box-sizing:border-box;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between;-webkit-flex-direction:column;flex-direction:column;margin:0 -1rem;padding:1rem}.wf-status-detail p{margin:0 0 0.45rem 0}.wf-status-detail .wf-status-circular{margin-bottom:1rem}.wf-status-detail .wf-status-detail-title{font-weight:700 !important;font-size:1rem !important;line-height:1.3125 !important}.wf-status-detail .wf-status-detail-subtitle{font-size:.875rem !important;line-height:1.3125 !important;font-weight:normal !important;text-align:center}.wf-status-detail .wf-status-detail-link>a{font-weight:600 !important;font-size:0.85rem !important}.wf-block-navigation-option{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-align-content:flex-start;align-content:flex-start;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-wrap:nowrap;flex-wrap:nowrap}.wf-block-navigation-option svg.wf-block-navigation-option-icon{width:50px;min-width:50px;fill:#9f9fa0}.wf-block-navigation-option:hover{cursor:pointer}.wf-block-navigation-option:hover a{text-decoration:underline}.wf-block-navigation-option:hover svg.wf-block-navigation-option-icon{fill:#00709e}.wf-select-group{display:-webkit-flex !important;display:flex !important;-webkit-align-items:center !important;align-items:center !important;-webkit-justify-content:flex-start !important;justify-content:flex-start !important;-webkit-flex-direction:row !important;flex-direction:row !important;-webkit-flex-grow:0 !important;flex-grow:0 !important}.wf-select-group .wfselect2-container{min-width:200px}@media (max-width: 767px){.wf-select-group .wfselect2-container{max-width:100px}}.wf-select-group .wfselect2-container--default .wfselect2-selection--single{display:block;width:100%;height:38px;padding:.5rem 1.25rem;font-size:14px;line-height:1.42857;color:#2b2b2b;background-color:#fff;background-image:none;border:1px solid #ddd;border-radius:4px;border-top-right-radius:0;border-bottom-right-radius:0;border-right:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-transition:border-color ease-in-out 0.15s,box-shadow ease-in-out 0.15s;-o-transition:border-color ease-in-out 0.15s,box-shadow ease-in-out 0.15s;transition:border-color ease-in-out 0.15s,box-shadow ease-in-out 0.15s}.wf-select-group .wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__rendered{color:#2b2b2b;line-height:inherit}.wf-select-group .wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__arrow{height:38px}.wf-select-group .wf-form-control{display:inline-block;width:auto;border-top-left-radius:0;border-bottom-left-radius:0;margin-left:0}.wf-flex-horizontal{display:-webkit-flex !important;display:flex !important;-webkit-align-items:center !important;align-items:center !important;-webkit-justify-content:flex-start !important;justify-content:flex-start !important;-webkit-flex-direction:row !important;flex-direction:row !important}.wf-flex-horizontal>*:first-child{-webkit-flex-grow:0 !important;flex-grow:0 !important}.wf-flex-horizontal.wf-flex-align-left{-webkit-align-items:flex-start !important;align-items:flex-start !important}.wf-flex-horizontal.wf-flex-align-right{-webkit-justify-content:flex-end !important;justify-content:flex-end !important}.wf-flex-horizontal.wf-flex-full-width{width:100%}.wf-flex-horizontal.wf-flex-full-width>*:last-child{-webkit-flex-grow:1 !important;flex-grow:1 !important}.wf-flex-horizontal.wf-flex-full-width.wf-flex-grow-first>*:first-child{-webkit-flex-grow:1 !important;flex-grow:1 !important}.wf-flex-horizontal.wf-flex-full-width.wf-flex-grow-first>*:last-child{-webkit-flex-grow:0 !important;flex-grow:0 !important}.wf-flex-horizontal.wf-flex-full-width.wf-flex-grow-all>*:first-child,.wf-flex-horizontal.wf-flex-full-width.wf-flex-grow-all>*{-webkit-flex-grow:1 !important;flex-grow:1 !important}.wf-flex-horizontal>li{padding:0;margin:0}.wf-flex-vertical{display:-webkit-flex !important;display:flex !important;-webkit-align-items:center !important;align-items:center !important;-webkit-justify-content:flex-start !important;justify-content:flex-start !important;-webkit-flex-direction:column !important;flex-direction:column !important}.wf-flex-vertical>*:first-child{-webkit-flex-grow:0 !important;flex-grow:0 !important}.wf-flex-vertical.wf-flex-align-left{-webkit-align-items:flex-start !important;align-items:flex-start !important}.wf-flex-vertical.wf-flex-align-right{-webkit-align-items:flex-end !important;align-items:flex-end !important}.wf-flex-vertical.wf-flex-full-width{-webkit-align-items:stretch !important;align-items:stretch !important}@media (max-width: 767px){.wf-flex-vertical.wf-flex-align-left-xs{-webkit-align-items:flex-start !important;align-items:flex-start !important}}@media (min-width: 768px) and (max-width: 991px){.wf-flex-vertical.wf-flex-align-left-sm{-webkit-align-items:flex-start !important;align-items:flex-start !important}}@media (min-width: 992px) and (max-width: 1199px){.wf-flex-vertical.wf-flex-align-left-md{-webkit-align-items:flex-start !important;align-items:flex-start !important}}@media (min-width: 1200px){.wf-flex-vertical.wf-flex-align-left-lg{-webkit-align-items:flex-start !important;align-items:flex-start !important}}.wf-flex-vertical>li{padding:0;margin:0}@media (max-width: 767px){.wf-flex-vertical-xs{display:-webkit-flex !important;display:flex !important;-webkit-align-items:center !important;align-items:center !important;-webkit-justify-content:flex-start !important;justify-content:flex-start !important;-webkit-flex-direction:column !important;flex-direction:column !important}.wf-flex-vertical-xs>*:first-child{-webkit-flex-grow:0 !important;flex-grow:0 !important}.wf-flex-vertical-xs.wf-flex-align-left{-webkit-align-items:flex-start !important;align-items:flex-start !important}.wf-flex-vertical-xs.wf-flex-align-right{-webkit-align-items:flex-end !important;align-items:flex-end !important}.wf-flex-vertical-xs.wf-flex-full-width{-webkit-align-items:stretch !important;align-items:stretch !important}}ul.wf-option,.wf-form-field{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:row;flex-direction:row;-webkit-flex-wrap:nowrap;flex-wrap:nowrap;padding:1rem 0;position:relative}ul.wf-option li,.wf-form-field li{margin:0;padding:0}ul.wf-option.wf-option-no-spacing,.wf-form-field.wf-option-no-spacing{padding:0;margin:0}ul.wf-option.wf-option-toggled>*:last-child,ul.wf-option.wf-option-footer>*:last-child,.wf-form-field.wf-option-toggled>*:last-child,.wf-form-field.wf-option-footer>*:last-child{margin-right:1rem}@media (max-width: 768px){ul.wf-option.wf-option-footer,.wf-form-field.wf-option-footer{-webkit-flex-direction:column;flex-direction:column}}ul.wf-option>.wf-option-content,.wf-form-field>.wf-option-content{-webkit-flex-grow:1;flex-grow:1}ul.wf-option>.wf-option-content>ul,.wf-form-field>.wf-option-content>ul{display:-webkit-flex;display:flex;-webkit-align-items:flex-start;align-items:flex-start;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:column;flex-direction:column;-webkit-flex-wrap:nowrap;flex-wrap:nowrap;width:100%}ul.wf-option>.wf-option-content>ul>*:first-child,.wf-form-field>.wf-option-content>ul>*:first-child{-webkit-flex-grow:1;flex-grow:1}@media (min-width: 768px){ul.wf-option>.wf-option-content>ul,.wf-form-field>.wf-option-content>ul{-webkit-flex-direction:row;flex-direction:row;-webkit-align-items:center;align-items:center}}ul.wf-option.wf-option-toggled-segmented *,.wf-form-field.wf-option-toggled-segmented *{-webkit-flex-grow:0;flex-grow:0}ul.wf-option.wf-option-toggled-segmented *:first-child,.wf-form-field.wf-option-toggled-segmented *:first-child{-webkit-flex-grow:1;flex-grow:1}ul.wf-option.wf-option-toggled-segmented>*:last-child,.wf-form-field.wf-option-toggled-segmented>*:last-child{margin-left:1rem}ul.wf-option.wf-option-toggled-segmented .wf-option-title,.wf-form-field.wf-option-toggled-segmented .wf-option-title{font-size:.8rem}ul.wf-option.wf-option-toggled-segmented .wf-option-segments,.wf-form-field.wf-option-toggled-segmented .wf-option-segments{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-align-content:stretch;align-content:stretch;-webkit-flex-wrap:nowrap;flex-wrap:nowrap}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label{-webkit-flex-grow:1;flex-grow:1;-webkit-flex-basis:50%;flex-basis:50%;display:block;margin-bottom:0;font-weight:normal;text-align:center;vertical-align:middle;touch-action:manipulation;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;text-transform:uppercase;padding:.5rem 1.25rem;font-size:14px;line-height:1.42857;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:#00709e;background-color:#fff;border-color:#00709e;border-radius:0}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.focus{color:#00709e;background-color:#e6e6e6;border-color:#00161f}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label:hover{color:#00709e;background-color:#e6e6e6;border-color:#004561}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label:active,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.active,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label:active,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.active,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle{color:#00709e;background-color:#e6e6e6;border-color:#004561}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label:active:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label:active:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label:active.focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.active:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.active:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.active.focus,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle:hover,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle:focus,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle.focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label:active:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label:active:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label:active.focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.active:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.active:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.active.focus,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle:hover,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle:focus,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle.focus{color:#00709e;background-color:#d4d4d4;border-color:#00161f}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label:active,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-active,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label:active,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-active,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle{background-image:none}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-disabled,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label[disabled],ul.wf-option.wf-option-toggled-segmented .wf-option-segments label[readonly],fieldset[disabled] ul.wf-option.wf-option-toggled-segmented .wf-option-segments label,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-disabled,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label[disabled],.wf-form-field.wf-option-toggled-segmented .wf-option-segments label[readonly],fieldset[disabled] .wf-form-field.wf-option-toggled-segmented .wf-option-segments label{color:#777;background-color:#fff;border-color:#e2e2e2;cursor:not-allowed}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-disabled:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-disabled:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-disabled.wf-focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label[disabled]:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label[disabled]:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label[disabled].wf-focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label[readonly]:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label[readonly]:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label[readonly].wf-focus,fieldset[disabled] ul.wf-option.wf-option-toggled-segmented .wf-option-segments label:hover,fieldset[disabled] ul.wf-option.wf-option-toggled-segmented .wf-option-segments label:focus,fieldset[disabled] ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-disabled:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-disabled:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-disabled.wf-focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label[disabled]:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label[disabled]:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label[disabled].wf-focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label[readonly]:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label[readonly]:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label[readonly].wf-focus,fieldset[disabled] .wf-form-field.wf-option-toggled-segmented .wf-option-segments label:hover,fieldset[disabled] .wf-form-field.wf-option-toggled-segmented .wf-option-segments label:focus,fieldset[disabled] .wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-focus{background-color:#fff;border-color:#00709e}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label .wf-badge,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label .wf-badge{color:#fff;background-color:#00709e}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-segment-first,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-segment-first{border-radius:4px 0 0 4px}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-segment-last,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-segment-last{border-radius:0 4px 4px 0}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio],.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]{position:absolute;left:-9999px}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label{color:#fff;background-color:#00709e;border-color:#005e85}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.focus{color:#fff;background-color:#004c6b;border-color:#000405}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:hover{color:#fff;background-color:#004c6b;border-color:#003347}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.active,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.active,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle{color:#fff;background-color:#004c6b;border-color:#003347}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active.focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.active:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.active:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.active.focus,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle:hover,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle:focus,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle.focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active.focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.active:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.active:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.active.focus,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle:hover,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle:focus,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle.focus{color:#fff;background-color:#003347;border-color:#000405}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-active,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-active,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle{background-image:none}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-disabled,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[disabled],ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[readonly],fieldset[disabled] ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-disabled,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[disabled],.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[readonly],fieldset[disabled] .wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label{color:#fff;background-color:#59a2c0;border-color:#5996b0;cursor:not-allowed}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-disabled:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-disabled:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-disabled.wf-focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[disabled]:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[disabled]:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[disabled].wf-focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[readonly]:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[readonly]:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[readonly].wf-focus,fieldset[disabled] ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:hover,fieldset[disabled] ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:focus,fieldset[disabled] ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-disabled:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-disabled:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-disabled.wf-focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[disabled]:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[disabled]:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[disabled].wf-focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[readonly]:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[readonly]:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[readonly].wf-focus,fieldset[disabled] .wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:hover,fieldset[disabled] .wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:focus,fieldset[disabled] .wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-focus{background-color:#00709e;border-color:#005e85}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label .wf-badge,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label .wf-badge{color:#00709e;background-color:#fff}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:disabled+label,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:disabled+label{cursor:not-allowed;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=65);opacity:.65}ul.wf-option.wf-option-toggled-multiple>.wf-option-content>ul,.wf-form-field.wf-option-toggled-multiple>.wf-option-content>ul{-webkit-flex-direction:column;flex-direction:column;-webkit-align-items:flex-start;align-items:flex-start}ul.wf-option>.wf-option-spacer,.wf-form-field>.wf-option-spacer{-webkit-flex-grow:0;flex-grow:0;-webkit-flex-shrink:0;flex-shrink:0;margin:0 1rem 0 0;width:30px;height:30px}@media (min-width: 768px){ul.wf-option>.wf-option-spacer,.wf-form-field>.wf-option-spacer{margin:0 2rem 0 1rem;width:20px;height:20px}}ul.wf-option>.wf-option-premium-lock,.wf-form-field>.wf-option-premium-lock{-webkit-flex-grow:0;flex-grow:0;-webkit-flex-shrink:0;flex-shrink:0;background:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB3aWR0aD0iMjRweCIgaGVpZ2h0PSIzMHB4IiB2aWV3Qm94PSIwIDAgMjQgMzAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KCTxwYXRoIGQ9Ik0yMy45NDksMTQuMjMzYy0wLjM3OSwtMC4zOSAtMC45MDQsLTAuNjA2IC0xLjQ0OCwtMC41OTVsLTAuNjgzLDBsMCwtNC4wOTJjMC4wMzIsLTIuNTM1IC0wLjk4NiwtNC45NzMgLTIuODEyLC02LjczMWMtMS43NTksLTEuODI4IC00LjE5OCwtMi44NDcgLTYuNzM0LC0yLjgxNWMtMi41MzYsLTAuMDMyIC00Ljk3NiwwLjk4NyAtNi43MzQsMi44MTVjLTEuODI2LDEuNzU4IC0yLjg0NCw0LjE5NiAtMi44MTIsNi43MzFsMCw0LjA4OWwtMC42OCwwYy0wLjU0NCwtMC4wMTEgLTEuMDY5LDAuMjA1IC0xLjQ0OCwwLjU5NWMtMC4zOTUsMC4zODIgLTAuNjEyLDAuOTEyIC0wLjU5OCwxLjQ2MWwwLDEyLjI2NmMtMC4wMTEsMC41NDQgMC4yMDQsMS4wNjkgMC41OTUsMS40NDhjMC4zNzksMC4zOTEgMC45MDQsMC42MDYgMS40NDgsMC41OTVsMjAuNDU4LDBjMC4wMDMsMCAwLjAwNiwwIDAuMDEsMGMxLjExNywwIDIuMDM2LC0wLjkxOSAyLjAzNiwtMi4wMzdjMCwtMC4wMDMgMCwtMC4wMDYgMCwtMC4wMDlsMCwtMTIuMjYzYzAuMDExLC0wLjU0NCAtMC4yMDYsLTEuMDY5IC0wLjU5OCwtMS40NDhsMCwtMC4wMVptLTYuMjExLC0wLjU5NWwtMTAuOTE5LDBsMCwtNC4wOTJjLTAuMDIyLC0xLjQ1MSAwLjU1NywtMi44NDggMS41OTksLTMuODU4YzEuMDA5LC0xLjA0MiAyLjQwNywtMS42MjEgMy44NTcsLTEuNTk4YzEuNDUxLC0wLjAyMyAyLjg0OCwwLjU1NiAzLjg1OCwxLjU5OGMxLjA0MiwxLjAwOSAxLjYyMSwyLjQwNyAxLjU5OCwzLjg1OGwwLjAwNyw0LjA5MloiIGZpbGw9IiNkMWQxZDEiLz4KPC9zdmc+");background-repeat:no-repeat;background-position:center center;background-size:contain;margin:0 1rem 0 0;width:30px;height:30px}@media (min-width: 768px){ul.wf-option>.wf-option-premium-lock,.wf-form-field>.wf-option-premium-lock{margin:0 2rem 0 1rem;width:20px;height:20px}}ul.wf-option>.wf-option-checkbox,.wf-form-field>.wf-option-checkbox{-webkit-flex-grow:0;flex-grow:0;-webkit-flex-shrink:0;flex-shrink:0;margin:0 1rem 0 0}@media (min-width: 768px){ul.wf-option>.wf-option-checkbox,.wf-form-field>.wf-option-checkbox{margin:0 2rem 0 1rem}}ul.wf-option>.wf-boolean-switch,.wf-form-field>.wf-boolean-switch{-webkit-flex-grow:0;flex-grow:0;-webkit-flex-shrink:0;flex-shrink:0;margin:0 1rem 0 0}@media (min-width: 768px){ul.wf-option>.wf-boolean-switch,.wf-form-field>.wf-boolean-switch{margin:0 1rem 0 1rem}}ul.wf-option.wf-option-no-spacing>.wf-boolean-switch,.wf-form-field.wf-option-no-spacing>.wf-boolean-switch{margin:0}ul.wf-option>.wf-option-radio-container,.wf-form-field>.wf-option-radio-container{-webkit-flex-grow:0;flex-grow:0;-webkit-flex-shrink:0;flex-shrink:0;margin:0 1rem 0 0}@media (min-width: 768px){ul.wf-option>.wf-option-radio-container,.wf-form-field>.wf-option-radio-container{margin:0 2rem 0 1rem}}ul.wf-option>.wf-option-radio-container [type=radio].wf-option-radio+label:before,.wf-form-field>.wf-option-radio-container [type=radio].wf-option-radio+label:before{margin:0}ul.wf-option>li>.wf-option-title,ul.wf-option>.wf-option-title,ul.wf-option>.wf-option-content>ul>.wf-option-title,.wf-form-field>li>.wf-option-title,.wf-form-field>.wf-option-title,.wf-form-field>.wf-option-content>ul>.wf-option-title{font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:0.9rem;color:#2b2b2b;padding-right:0.5rem}ul.wf-option>li>.wf-option-title.wf-option-title-top,ul.wf-option>.wf-option-title.wf-option-title-top,ul.wf-option>.wf-option-content>ul>.wf-option-title.wf-option-title-top,.wf-form-field>li>.wf-option-title.wf-option-title-top,.wf-form-field>.wf-option-title.wf-option-title-top,.wf-form-field>.wf-option-content>ul>.wf-option-title.wf-option-title-top{-webkit-align-self:flex-start;align-self:flex-start}ul.wf-option>li>.wf-option-title.wf-option-title-bottom,ul.wf-option>.wf-option-title.wf-option-title-bottom,ul.wf-option>.wf-option-content>ul>.wf-option-title.wf-option-title-bottom,.wf-form-field>li>.wf-option-title.wf-option-title-bottom,.wf-form-field>.wf-option-title.wf-option-title-bottom,.wf-form-field>.wf-option-content>ul>.wf-option-title.wf-option-title-bottom{-webkit-align-self:flex-end;align-self:flex-end}ul.wf-option .wf-option-subtitle,.wf-form-field .wf-option-subtitle{padding-top:0.25rem;font-size:0.75rem}ul.wf-option .wf-flex-vertical .wf-option-title,.wf-form-field .wf-flex-vertical .wf-option-title{padding-bottom:0.75rem}ul.wf-option.wf-flex-vertical>.wf-option-subtitle,.wf-form-field.wf-flex-vertical>.wf-option-subtitle{padding-top:0.25rem !important;font-size:0.75rem !important}ul.wf-option .wf-option-checkboxes,ul.wf-option .wf-option-checkboxes>ul,.wf-form-field .wf-option-checkboxes,.wf-form-field .wf-option-checkboxes>ul{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:row;flex-direction:row;-webkit-flex-wrap:nowrap;flex-wrap:nowrap}ul.wf-option .wf-option-checkboxes,.wf-form-field .wf-option-checkboxes{margin-top:1rem}ul.wf-option .wf-option-checkboxes>ul,.wf-form-field .wf-option-checkboxes>ul{margin-left:1rem}@media (min-width: 768px){ul.wf-option .wf-option-checkboxes>ul,.wf-form-field .wf-option-checkboxes>ul{margin-left:1.5rem}}ul.wf-option .wf-option-checkboxes>ul:first-of-type,.wf-form-field .wf-option-checkboxes>ul:first-of-type{margin-left:0}ul.wf-option .wf-option-checkboxes>ul>.wf-option-checkbox,.wf-form-field .wf-option-checkboxes>ul>.wf-option-checkbox{margin:0 1rem 0 0}ul.wf-option li.wf-option-text,ul.wf-option li.wf-option-textarea,ul.wf-option td.wf-option-text,.wf-form-field li.wf-option-text,.wf-form-field li.wf-option-textarea,.wf-form-field td.wf-option-text{padding-top:0.5rem}@media (min-width: 768px){ul.wf-option li.wf-option-text,ul.wf-option li.wf-option-textarea,ul.wf-option td.wf-option-text,.wf-form-field li.wf-option-text,.wf-form-field li.wf-option-textarea,.wf-form-field td.wf-option-text{-webkit-flex-grow:1;flex-grow:1;text-align:right;padding-left:1rem;padding-top:0}}ul.wf-option li.wf-option-text>input[type="text"],.wf-form-field li.wf-option-text>input[type="text"]{max-width:240px}@media (min-width: 768px){ul.wf-option li.wf-option-text>input[type="text"],.wf-form-field li.wf-option-text>input[type="text"]{max-width:280px}}@media (min-width: 992px){ul.wf-option li.wf-option-text>input[type="text"],.wf-form-field li.wf-option-text>input[type="text"]{max-width:340px}}ul.wf-option li.wf-option-text.wf-option-full-width>input[type="text"],.wf-form-field li.wf-option-text.wf-option-full-width>input[type="text"]{max-width:100%;width:100%}ul.wf-option li.wf-option-textarea,.wf-form-field li.wf-option-textarea{min-width:150px;max-width:240px}@media (min-width: 768px){ul.wf-option li.wf-option-textarea,.wf-form-field li.wf-option-textarea{min-width:200px;max-width:400px}}@media (min-width: 992px){ul.wf-option li.wf-option-textarea,.wf-form-field li.wf-option-textarea{min-width:250px;max-width:500px}}ul.wf-option li.wf-option-textarea>textarea,.wf-form-field li.wf-option-textarea>textarea{width:100%;height:80px;min-width:150px;max-width:240px}@media (min-width: 768px){ul.wf-option li.wf-option-textarea>textarea,.wf-form-field li.wf-option-textarea>textarea{min-width:200px;max-width:280px}}@media (min-width: 992px){ul.wf-option li.wf-option-textarea>textarea,.wf-form-field li.wf-option-textarea>textarea{min-width:250px;max-width:340px}}ul.wf-option li.wf-option-textarea>.wf-flex-vertical>li>textarea,.wf-form-field li.wf-option-textarea>.wf-flex-vertical>li>textarea{width:100%;height:80px;box-sizing:border-box}ul.wf-option li.wf-option-textarea>.wf-flex-vertical>li.wf-option-subtitle,.wf-form-field li.wf-option-textarea>.wf-flex-vertical>li.wf-option-subtitle{width:100%;text-align:left}ul.wf-option li.wf-option-switch,.wf-form-field li.wf-option-switch{-webkit-flex-grow:1;flex-grow:1}ul.wf-option li.wf-option-switch.wf-right .wf-switch,.wf-form-field li.wf-option-switch.wf-right .wf-switch{justify-content:flex-end !important}ul.wf-option li.wf-option-select,.wf-form-field li.wf-option-select{-webkit-flex-grow:1;flex-grow:1;text-align:right}ul.wf-option li.wf-option-select select,ul.wf-option li.wf-option-select select option,ul.wf-option li.wf-option-select .wfselect2-container--default,.wf-form-field li.wf-option-select select,.wf-form-field li.wf-option-select select option,.wf-form-field li.wf-option-select .wfselect2-container--default{font-size:0.7rem;font-weight:bold}@media (min-width: 768px){ul.wf-option li.wf-option-select select,ul.wf-option li.wf-option-select select option,ul.wf-option li.wf-option-select .wfselect2-container--default,.wf-form-field li.wf-option-select select,.wf-form-field li.wf-option-select select option,.wf-form-field li.wf-option-select .wfselect2-container--default{font-size:0.8rem}}@media (min-width: 992px){ul.wf-option li.wf-option-select select,ul.wf-option li.wf-option-select select option,ul.wf-option li.wf-option-select .wfselect2-container--default,.wf-form-field li.wf-option-select select,.wf-form-field li.wf-option-select select option,.wf-form-field li.wf-option-select .wfselect2-container--default{font-size:0.9rem}}ul.wf-option li.wf-option-select .wf-option-select-option,ul.wf-option li.wf-option-select .wfselect2-container--default,ul.wf-option li.wf-option-select .wfselect2-container--default .wfselect2-selection--single,.wf-form-field li.wf-option-select .wf-option-select-option,.wf-form-field li.wf-option-select .wfselect2-container--default,.wf-form-field li.wf-option-select .wfselect2-container--default .wfselect2-selection--single{text-align:left;height:40px;border-radius:0;border:0;background-color:#fff;box-shadow:1px 1px 1px 2px rgba(215,215,215,0.35)}ul.wf-option li.wf-option-select .wf-option-select-option .wfselect2-selection__rendered,ul.wf-option li.wf-option-select .wfselect2-container--default .wfselect2-selection__rendered,ul.wf-option li.wf-option-select .wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__rendered,.wf-form-field li.wf-option-select .wf-option-select-option .wfselect2-selection__rendered,.wf-form-field li.wf-option-select .wfselect2-container--default .wfselect2-selection__rendered,.wf-form-field li.wf-option-select .wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__rendered{color:#333;line-height:40px}ul.wf-option li.wf-option-select .wf-option-select-option .wfselect2-selection__arrow,ul.wf-option li.wf-option-select .wfselect2-container--default .wfselect2-selection__arrow,ul.wf-option li.wf-option-select .wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__arrow,.wf-form-field li.wf-option-select .wf-option-select-option .wfselect2-selection__arrow,.wf-form-field li.wf-option-select .wfselect2-container--default .wfselect2-selection__arrow,.wf-form-field li.wf-option-select .wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__arrow{height:38px}ul.wf-option li.wf-option-select .wf-option-select-option.wfselect2-container--disabled .wfselect2-selection__rendered,ul.wf-option li.wf-option-select .wfselect2-container--default.wfselect2-container--disabled .wfselect2-selection__rendered,ul.wf-option li.wf-option-select .wfselect2-container--default .wfselect2-selection--single.wfselect2-container--disabled .wfselect2-selection__rendered,.wf-form-field li.wf-option-select .wf-option-select-option.wfselect2-container--disabled .wfselect2-selection__rendered,.wf-form-field li.wf-option-select .wfselect2-container--default.wfselect2-container--disabled .wfselect2-selection__rendered,.wf-form-field li.wf-option-select .wfselect2-container--default .wfselect2-selection--single.wfselect2-container--disabled .wfselect2-selection__rendered{color:#aaa}ul.wf-option li.wf-option-select .wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__arrow b,.wf-form-field li.wf-option-select .wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__arrow b{border-color:#333 transparent transparent}ul.wf-option li.wf-option-select .wfselect2-container--default.wfselect2-container--open .wfselect2-selection--single .wfselect2-selection__arrow b,.wf-form-field li.wf-option-select .wfselect2-container--default.wfselect2-container--open .wfselect2-selection--single .wfselect2-selection__arrow b{border-color:transparent transparent #333}ul.wf-option.wf-option-token select,.wf-form-field.wf-option-token select{width:240px}@media (min-width: 768px){ul.wf-option.wf-option-token select,.wf-form-field.wf-option-token select{width:280px}}@media (min-width: 992px){ul.wf-option.wf-option-token select,.wf-form-field.wf-option-token select{width:320px}}ul.wf-option.wf-option-token .wfselect2-container--default,ul.wf-option.wf-option-token .wfselect2-container--default .wfselect2-selection--multiple,.wf-form-field.wf-option-token .wfselect2-container--default,.wf-form-field.wf-option-token .wfselect2-container--default .wfselect2-selection--multiple{border-color:#e2e2e2}ul.wf-option.wf-option-token .wfselect2-container--default .wfselect2-selection__choice,ul.wf-option.wf-option-token .wfselect2-container--default .wfselect2-selection--multiple .wfselect2-selection__choice,.wf-form-field.wf-option-token .wfselect2-container--default .wfselect2-selection__choice,.wf-form-field.wf-option-token .wfselect2-container--default .wfselect2-selection--multiple .wfselect2-selection__choice{background-color:#fff;border-color:#e2e2e2;padding:0.5rem}ul.wf-option.wf-option-token .wfselect2-container--default .wfselect2-search__field,ul.wf-option.wf-option-token .wfselect2-container--default .wfselect2-selection--multiple .wfselect2-search__field,.wf-form-field.wf-option-token .wfselect2-container--default .wfselect2-search__field,.wf-form-field.wf-option-token .wfselect2-container--default .wfselect2-selection--multiple .wfselect2-search__field{margin-right:5px;margin-top:5px;padding:0.5rem 0}.wf-option-sub{padding-left:2rem !important;margin-left:30px !important}.wf-select2-suppress-dropdown .wfselect2-results,.wf-select2-suppress-dropdown .wfselect2-dropdown{display:none}.wf-options-controls{direction:ltr;background:#ffffff;border-bottom:1px solid #e2e2e2;position:absolute;left:160px;right:0px;top:46px;z-index:900;padding-left:15px;padding-right:15px}@media (min-width: 616px){.wf-options-controls{position:fixed}}.wf-options-controls .wf-block{margin:0}@media (min-width: 782px){.wf-options-controls .wf-block{margin:0.5rem 0}}.wf-options-controls,.sticky-menu .wf-options-controls{top:32px}.folded .wf-options-controls{left:36px}@media only screen and (max-width: 960px){.auto-fold .wf-options-controls{left:36px}}.rtl .wf-options-controls{right:160px;left:0px}.rtl .folded .wf-options-controls{right:36px}@media only screen and (max-width: 960px){.rtl .auto-fold .wf-options-controls{right:36px}}@media screen and (max-width: 782px){.wf-options-controls,.folded .wf-options-controls,.auto-fold .wf-options-controls,.rtl .wf-options-controls,.rtl .folded .wf-options-controls,.rtl .auto-fold .wf-options-controls{left:-10px;right:0px}}.wf-options-controls-spacer{height:45px}@media (min-width: 782px){.wf-options-controls-spacer{height:75px}}.wf-options-controls-spacer,.sticky-menu .wf-options-controls-spacer{top:61px}.wordfence .wfselect2-container .wfselect2-selection--single{border:1px solid #dadada;font-weight:normal;font-size:0.8rem}#wf-notices{margin-top:15px}#wf-notices .wf-admin-notice{margin-left:0px;margin-right:0px}.wf-success-text,.wf-notice-text{display:inline-block;vertical-align:middle;line-height:1.3;font-size:16px;font-weight:bold;font-style:italic}.wf-notice{margin:12px 0;padding:8px;background-color:#ffffe0;border:1px solid #ffd975;border-width:1px 1px 1px 10px}.wf-notice-text{color:#6d798c}.wf-success{margin:12px 0;padding:8px;background-color:#ffffff;border:1px solid #16bc9b;border-width:1px 1px 1px 10px}.wf-success-text{color:#11967a}.wf-premium-callout{border:1px solid #dfdfdf;background-color:#ffffff;padding:16px;margin:20px 0 0;text-align:center}.wf-premium-callout ul{margin:8px 0;padding:0 0 0 15px}.wf-premium-callout ul li{list-style-type:disc;margin:0;padding:0}.wf-premium-callout .center{text-align:center;margin:0}.wf-premium-callout .button-primary{text-align:center;text-transform:uppercase;font-weight:bold;background-color:#00709e}#wfLiveTrafficOverlayAnchor::after{position:absolute;z-index:3002;top:0;right:0;width:0;height:0;background:rgba(241,241,241,0.6);content:'';opacity:0;-webkit-transition:opacity 0.5s,width 0.1s 0.5s,height 0.1s 0.5s;-o-transition:opacity 0.5s,width 0.1s 0.5s,height 0.1s 0.5s;transition:opacity 0.5s,width 0.1s 0.5s,height 0.1s 0.5s}.wordfenceLiveActivityPaused #wfLiveTrafficOverlayAnchor::after{width:100%;height:100%;opacity:1;-webkit-transition:opacity 0.5s;-o-transition:opacity 0.5s;transition:opacity 0.5s}#wordfenceLiveActivitySecurityOnly,#wordfenceLiveActivityAll{background:#fff;border-left:4px solid #00709e;-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);margin-bottom:0.5rem;padding:1px 13px}#wfLiveTrafficDisabledMessage{display:none;position:fixed;z-index:3003;left:0;width:100%;top:50%;transform:translateY(-50%);text-align:center;color:#666666;opacity:0;-webkit-transition:opacity 0.5s,width 0.1s 0.5s,height 0.1s 0.5s;-o-transition:opacity 0.5s,width 0.1s 0.5s,height 0.1s 0.5s;transition:opacity 0.5s,width 0.1s 0.5s,height 0.1s 0.5s}#wfLiveTrafficDisabledMessage h2{background-color:#00709e;color:#fff;overflow:hidden;max-width:350px;margin:0 auto;padding:20px;font-size:2.0em}#wfLiveTrafficDisabledMessage h2 small{font-size:0.5em;font-weight:normal;margin-top:12px;display:block}.wordfenceLiveActivityPaused #wfLiveTrafficDisabledMessage{display:block;opacity:1;-webkit-transition:opacity 0.5s;transition:opacity 0.5s}.wf-live-activity{position:relative;margin:20px 0 10px 0;padding:0.75rem;box-sizing:border-box;background:#FFFCEF;box-shadow:0 0 0 1px rgba(153,155,135,0.5),0 1px 2px #e8f3e0}.wf-live-activity .wf-live-activity-inner{width:100%;box-sizing:border-box;position:relative}.wf-live-activity .wf-live-activity-inner .wf-live-activity-content{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:flex-start}.wf-live-activity .wf-live-activity-inner .wf-live-activity-content .wf-live-activity-title{color:#888888;font-size:0.85rem;font-weight:bold;padding-right:0.5rem}.wf-live-activity .wf-live-activity-inner .wf-live-activity-content .wf-live-activity-message{font-size:0.80rem;color:#000000}.wf-live-activity .wf-live-activity-inner .wf-live-activity-state{position:absolute;top:0px;right:0px;bottom:0px;left:0px;background:rgba(255,252,239,0.9);display:none;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:center;z-index:3001;-webkit-transition:opacity 0.5s,width 0.1s 0.5s,height 0.1s 0.5s;-o-transition:opacity 0.5s,width 0.1s 0.5s,height 0.1s 0.5s;transition:opacity 0.5s,width 0.1s 0.5s,height 0.1s 0.5s}.wordfenceLiveActivityPaused .wf-live-activity .wf-live-activity-inner .wf-live-activity-state{display:-ms-flexbox;display:flex;opacity:1;-webkit-transition:opacity 0.5s;-webkit-transition:opacity 0.5s;-o-transition:opacity 0.5s;transition:opacity 0.5s}.wordfence .wordfenceScanButton{margin:20px 0 20px 0}.wordfence .wordfenceScanButton input.button-wf-grey{background:#EFEFEF url(../images/button-grad-grey.png) repeat-x scroll left top;border-color:#EFEFEF}.wordfence .wordfenceScanButton table td{vertical-align:top}.wordfence .wordfenceScanButton .button-primary{text-align:center;text-transform:uppercase;font-weight:bold;background-color:#00709E;height:44px;line-height:44px;padding:0px 20px}table.wfSummaryParent{font-family:sans-serif;font-size:14px;color:#000;z-index:9}table.wfSummaryParent td{vertical-align:top;padding:0;margin:0}table.wfSummaryParent table.wfSummaryChild th{font-weight:bold;text-align:right;font-family:Georgia,Times New Roman,Times,serif;color:#000;padding:5px 10px 5px 0;border-top:1px solid #CCC}table.wfSummaryParent table.wfSummaryChild td{font-weight:normal;text-align:left;padding:5px 0 5px 0;border-top:1px solid #CCC}table.wfSummaryParent table.wfSC1 td{width:300px;padding:0 25px 10px 0}table.wfSummaryParent table.wfSC2 th{width:80px}table.wfSummaryParent table.wfSC2 td{width:100px}table.wfSummaryParent table.wfSC3 th{width:80px}table.wfSummaryParent table.wfSC3 td{width:250px}table.wfSummaryParent th.wfHead{font-size:22px;font-family:Georgia,Times New Roman,Times,serif;font-style:italic;color:#555;font-weight:bold;text-align:left;padding:20px 0 20px 0;-webkit-font-smoothing:antialiased}.wf-issues-table{table-layout:fixed;width:100%}div.wfIssue{width:100%}div.wfIssue table.wfIssue td{padding:2px;margin:0;border-width:0;text-align:left;width:100%}div.wfIssue table.wfIssue th{padding:2px;margin:0;font-weight:bold;text-align:left;color:#777;white-space:nowrap}div.wfIssue table.wfIssueLinks td{border-width:0;text-align:left;padding-right:10px}div.wfIssue h2{margin:0 0 5px 0;padding:0;font-size:0.9rem}@media (min-width: 768px){div.wfIssue h2{font-size:1.05rem}}.wfIssueOptions{border-top:1px solid #CCC;padding:10px}.wfIssueOptions h3{font-size:0.8rem;margin:0}@media (min-width: 768px){.wfIssueOptions h3{display:inline-block}}.wfIssueOptions ul{margin-bottom:0;padding-left:0;list-style:none;display:-webkit-flex;display:flex;-webkit-align-items:flex-start;align-items:flex-start;-webkit-align-content:flex-start;align-content:flex-start;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-flex-direction:column;flex-direction:column}@media (min-width: 768px){.wfIssueOptions ul{-webkit-flex-direction:row;flex-direction:row;-webkit-align-items:center;align-items:center}}.wfIssueOptions ul>li>a{position:relative;display:block;padding:8px 12px/2}.wfIssueOptions ul>li>a:hover,.wfIssueOptions ul>li>a:focus{text-decoration:none;background-color:#e2e2e2}.wfIssueOptions a{margin-left:10px}.wfIssueOptions strong{float:left;display:block;width:60px}.wfIssueOptions p{margin:6px 0px 0px}.wfProbSev1,.wfProbSev2,.wfAjaxLight128,.wfResolved{width:128px;height:128px;border:0;margin:0 auto;background-repeat:no-repeat;background-position:0 0;text-decoration:none;display:block}.wfProbSev1{background-image:url(../images/icons/error128.png)}.wfProbSev2{background-image:url(../images/icons/warning128.png)}.wfResolved{background-image:url(../images/icons/tick128.png)}.wfIssuesContainer{width:100%;display:none}.wfIssuesContainer p{max-width:550px}.wfALogTime{color:#999}.wfALogMailLink,.wfALogViewLink{display:block;position:absolute;padding:0 0 0 18px;margin:0;right:10px;top:0;background-repeat:no-repeat;font-weight:normal}.wfALogMailLink{background-image:url(../images/icons/email_go.png)}.wfALogViewLink{background-image:url(../images/icons/magnifier.png)}#wfActivity{position:relative}.consoleHead{position:relative;padding:0 0 0 3px;font-weight:bold;width:100%}.consoleHeadText{margin-bottom:4px;font-size:18px;font-family:Georgia,Times New Roman,Times,serif;color:#555;font-weight:bold;-webkit-font-smoothing:antialiased}.consoleFooter{position:relative}.consoleOuter{width:100%}.consoleInner{height:116px;overflow:auto;z-index:1}.bevelDiv1{border:1px solid #EFEFEF}.bevelDiv2{border:1px solid #AAA}.bevelDiv3{background-color:#ffffed;padding:5px;font-family:Roboto,Helvetica Neue,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased}.wfSecure{color:#0A0;font-weight:bold}.wfSummaryLine{display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-align-content:flex-start;align-content:flex-start;-webkit-justify-content:space-between;justify-content:space-between;-webkit-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-flex-direction:column;flex-direction:column}@media (min-width: 768px){.wfSummaryLine{-webkit-flex-direction:row;flex-direction:row}}.wfSummaryLine .wfSummaryDate{padding-left:3px}.wfSummaryLine .wfSummaryMsg{padding-left:3px;-webkit-flex-grow:1;flex-grow:1;min-width:0}.wfSummaryLoading{width:16px;height:11px;background-image:url("../images/icons/ajaxScan.gif")}.wfSummaryBad,.wfSummaryErr{color:#930000}.wfSummaryOK{color:#11967a}.wfSummaryIgnored{color:#a87302}.wfClear{content:".";display:block;height:0;width:0;line-height:0;clear:both;visibility:hidden}.wfSummaryFinal{-webkit-font-smoothing:antialiased;font-weight:bold;color:#555}.wfStartScanButton{text-align:center}.wordfenceScanHelp{border:1px solid #CCC;padding:4px}.wf-scan-no-issues{font-size:1.25rem;color:#11967a}.wf-scan-severity{position:relative;width:10px}@media (min-width: 768px){.wf-scan-severity{width:144px}}.wf-scan-severity-1,.wf-scan-severity-2{position:absolute;top:0px;right:0px;bottom:0px;left:0px}.wf-scan-severity-1{background-color:#c10000}.wf-scan-severity-2{background-color:#ffd10a}.scan-schedule{border-collapse:collapse;border-spacing:0}.scan-schedule tr:first-of-type th{padding-top:0}.scan-schedule td{padding:0}.scan-schedule th{padding:1.5rem 0.5rem 0.75rem 0;font-size:1rem;text-align:left}@media (min-width: 768px){.scan-schedule th{padding:0 0.5rem 0 0;font-size:0.8125rem;text-align:center}}.next-scan{font-size:1em;display:block;position:relative;width:7em;height:7em;background-color:#fff;border-radius:0.6em;box-shadow:0 1px 0 rgba(189,189,189,0.6);overflow:hidden}.next-scan *{display:block;width:100%;font-size:1em;font-weight:bold;font-style:normal;text-align:center}.next-scan strong{position:absolute;top:0;padding:0.4em 0;color:#fff;background-color:#00709E;box-shadow:0 2px 0 #00709E}.next-scan em{position:absolute;bottom:0.3em;color:#00709E}.next-scan span{width:100%;font-size:2.8em;padding-top:1.15em;color:#2f2f2f}#wf-lt-listings .wfActEvent{padding-left:15px;border-left:5px solid #cccccc}#wf-lt-listings .wfActEvent.wfHuman{border-left:5px solid #16bc9b}#wf-lt-listings .wfActEvent.wfActionBlocked{border-left:5px solid #d03935}#wf-lt-listings .wfActEvent.wfNotice{border-left:5px solid #c10000}#wf-lt-listings .wfActEvent.wfWarning,#wf-lt-listings .wfActEvent.wf404,#wf-lt-listings .wfActEvent.wfFailedLogin{border-left:5px solid #ffd10a}#wf-lt-listings .wfActEvent:hover{background-color:#fff9e9 !important}.wf-live-traffic-controls{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:column;flex-direction:column;width:100%;margin-bottom:0}.wf-live-traffic-controls>*:first-child{-webkit-flex-grow:1;flex-grow:1}.wf-live-traffic-controls>*:last-child{-webkit-flex-grow:0;flex-grow:0}@media (min-width: 768px){.wf-live-traffic-controls{-webkit-flex-direction:row;flex-direction:row}}.wf-live-traffic-filter{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-align-content:flex-start;align-content:flex-start;-webkit-justify-content:flex-start;justify-content:flex-start}@media (min-width: 768px){.wf-live-traffic-filter{-webkit-flex-direction:row;flex-direction:row}}.wf-live-traffic-filter>*{padding:0.5rem}.wf-live-traffic-filter h2{margin:0;padding-bottom:0.5rem}@media (min-width: 768px){.wf-live-traffic-filter h2{padding-bottom:0;padding-right:0.5rem}}.wf-live-traffic-show-expanded{text-align:right;padding:0.5rem}@media (max-width: 1330px){.wf-live-traffic-show-expanded{display:none}}#wf-lt-advanced-filters{padding-left:0;padding-right:0;overflow:hidden}.wf-live-traffic-filter-detail{display:-webkit-flex;display:flex;-webkit-align-items:flex-start;align-items:flex-start;-webkit-align-content:flex-start;align-content:flex-start;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:column;flex-direction:column}@media (min-width: 768px){.wf-live-traffic-filter-detail{-webkit-flex-direction:row;flex-direction:row}.wf-live-traffic-filter-detail *{-webkit-flex-grow:1;flex-grow:1}}.wf-live-traffic-filter-detail .wf-live-traffic-filter-item{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-align-content:flex-start;align-content:flex-start;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:row;flex-direction:row}.wf-live-traffic-filter-detail .wf-live-traffic-filter-item .wf-live-traffic-filter-remove{margin-left:0.5rem;font-size:1.5rem;color:#333}.wf-live-traffic-filter-detail .wf-live-traffic-filter-item .wf-live-traffic-filter-item-parameters{display:-webkit-flex;display:flex;-webkit-align-items:flex-start;align-items:flex-start;-webkit-align-content:flex-start;align-content:flex-start;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:column;flex-direction:column}.wf-live-traffic-filter-detail .wf-live-traffic-filter-item .wf-live-traffic-filter-item-parameters div{padding:0.25rem 0}.wf-live-traffic-filter-detail .wf-live-traffic-filter-item .wf-live-traffic-filter-item-parameters select{font-size:0.75rem !important}@media (min-width: 768px){.wf-live-traffic-filter-detail .wf-live-traffic-filter-item .wf-live-traffic-filter-item-parameters{-webkit-flex-direction:row;flex-direction:row;-webkit-align-items:center;align-items:center}.wf-live-traffic-filter-detail .wf-live-traffic-filter-item .wf-live-traffic-filter-item-parameters div{padding:0}.wf-live-traffic-filter-detail .wf-live-traffic-filter-item .wf-live-traffic-filter-item-parameters select{font-size:1rem !important}}.wf-filtered-traffic .wf-filtered-traffic-hits{font-size:1.75rem;color:#999999;margin-top:10px}#wf-live-traffic{position:relative;overflow:visible}#wf-live-traffic-legend{white-space:nowrap;background-color:#fff;padding:0.75rem 0px;position:fixed;width:320px;height:17px;top:auto;bottom:0px;right:auto;left:10px;z-index:2000;box-shadow:0px 0px 5px rgba(0,0,0,0.5);padding-left:1rem}@media (min-width: 768px){#wf-live-traffic-legend{left:182px}}@media (max-width: 1330px){#wf-live-traffic-legend{display:none}}#wf-live-traffic-legend-placeholder{display:none;padding:12px}#wf-live-traffic-legend-placeholder.sticky{display:block}#wf-live-traffic-legend ul{margin:0;padding:0}#wf-live-traffic-legend ul:before,#wf-live-traffic-legend ul:after{content:" ";display:table}#wf-live-traffic-legend ul:after{clear:both}#wf-live-traffic-legend ul li{margin:0 1rem 0 0;padding:0;position:relative;float:left;font-size:0.7185rem}@media (min-width: 768px){#wf-live-traffic-legend ul li{font-size:0.8125rem}}#wf-live-traffic-legend ul li+li{margin-left:0.5rem}#wf-live-traffic-legend ul li:before,.wf-live-traffic-hit-type:before{content:'';display:inline-block;margin:3px 6px 0 0;width:12px;height:12px;background-color:#CCCCCC;border-radius:10px;vertical-align:-2px}#wf-live-traffic-legend ul li.wfHuman:before,.wf-live-traffic-hit-type.wfHuman:before{background-color:#16bc9b}#wf-live-traffic-legend ul li.wfNotice:before,.wf-live-traffic-hit-type.wfNotice:before,#wf-live-traffic-legend ul li.wf404:before,.wf-live-traffic-hit-type.wf404:before,#wf-live-traffic-legend ul li.wfFailedLogin:before,.wf-live-traffic-hit-type.wfFailedLogin:before{background-color:#ffd10a}#wf-live-traffic-legend ul li.wfBlocked:before,.wf-live-traffic-hit-type.wfBlocked:before,#wf-live-traffic-legend ul li.wfActionBlocked:before,.wf-live-traffic-hit-type.wfActionBlocked:before{background-color:#d03935}.wfTimeAgo{font-family:Georgia,Times New Roman,Times,serif;color:#999;font-weight:bold;font-style:italic}.wfActEvent{border-bottom:1px solid #CCC;padding:10px 20px;overflow:auto}.wf-pad-small{margin:8px 0}#wf-lt-listings{margin:0 0 0}#wf-lt-listings a{cursor:pointer;text-decoration:none}#wf-lt-listings a:hover{text-decoration:underline}#wf-lt-listings a.button,#wf-lt-listings a.wf-btn{text-decoration:none}[class*="span"]{float:left;min-height:1px;margin-left:30px}.highlighted,.highlighted td,#wf-live-traffic .wf-striped-table .highlighted td{-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}@-moz-keyframes highlighted{0%{opacity:0;background-color:#ffeaa0}100%{opacity:1;background-color:#ffffff}}@-webkit-keyframes highlighted{0%{opacity:0;background-color:#ffeaa0}100%{opacity:1;background-color:#ffffff}}@keyframes highlighted{0%{opacity:0;background-color:#ffeaa0}100%{opacity:1;background-color:#ffffff}}@-moz-keyframes highlightedBlocked{0%{opacity:0;background-color:#ffeaa0}100%{opacity:1;background-color:#fff6f6}}@-webkit-keyframes highlightedBlocked{0%{opacity:0;background-color:#ffeaa0}100%{opacity:1;background-color:#fff6f6}}@keyframes highlightedBlocked{0%{opacity:0;background-color:#ffeaa0}100%{opacity:1;background-color:#fff6f6}}.highlighted,.highlighted td,#wf-live-traffic .wf-striped-table .highlighted td{-webkit-animation-name:highlighted;animation-name:highlighted}.highlighted.wfActionBlocked,.highlighted td.wfActionBlocked,#wf-live-traffic .wf-striped-table .highlighted td.wfActionBlocked{-webkit-animation-name:highlightedBlocked;animation-name:highlightedBlocked}#wf-lt-preset-filters{min-width:250px}#wf-lt-advanced-filters>table{width:100%}#wf-lt-advanced-filters>table>tr>td{vertical-align:top}.wf-lt-url{white-space:nowrap}.wf-live-traffic-filter label{font-weight:normal}#wf-live-traffic .wf-striped-table th,#wf-live-traffic .wf-striped-table td{padding:.5rem .6rem}#wf-live-traffic .wf-striped-table th{white-space:nowrap}#wf-live-traffic .wf-striped-table tbody tr:hover>td{background-color:#e7f5ff}#wf-live-traffic .wf-live-traffic-show-details{font-size:1.5rem;color:#9a9a9a;text-align:center;cursor:hand}#wf-live-traffic .wf-live-traffic-show-details .wf-ion-eye-disabled{display:none}#wf-live-traffic .wf-details-open .wf-live-traffic-show-details .wf-ion-eye-disabled{display:inline-block}#wf-live-traffic .wf-details-open .wf-live-traffic-show-details .wf-ion-eye{display:none}#wf-live-traffic.wf-live-traffic-display-expanded .wf-summary-row{display:none}#wf-live-traffic.wf-live-traffic-display-expanded .wf-live-traffic-activity-detail h2{display:none}#wf-live-traffic.wf-live-traffic-display-expanded .wf-striped-table thead{display:none}#wf-live-traffic .wf-details-hidden .wf-live-traffic-details,#wf-live-traffic .wf-details-visible .wf-live-traffic-details{transition:padding 200ms}#wf-live-traffic .wf-details-hidden .wf-live-traffic-details{padding:0 .6rem}#wf-live-traffic .wf-details-visible .wf-live-traffic-details,#wf-live-traffic.wf-live-traffic-display-expanded .wf-details-hidden .wf-live-traffic-details{padding:.8rem .6rem}#wf-live-traffic.wf-live-traffic-display-expanded .wf-details-hidden .wf-live-traffic-details{border-top:1px solid #e2e2e2}#wf-live-traffic .wf-details-hidden .wf-live-traffic-activity-detail-wrapper,#wf-live-traffic .wf-details-visible .wf-live-traffic-activity-detail-wrapper{transition:opacity 200ms, max-height 200ms ease-out;overflow:hidden}#wf-live-traffic .wf-details-hidden .wf-live-traffic-activity-detail-wrapper{opacity:0;max-height:0px}#wf-live-traffic .wf-details-visible .wf-live-traffic-activity-detail-wrapper,#wf-live-traffic.wf-live-traffic-display-expanded .wf-details-hidden .wf-live-traffic-activity-detail-wrapper{opacity:1;max-height:800px}#wf-live-traffic .wf-block-ip-btn{display:none}#wf-live-traffic-group-by{width:100%}#wf-live-traffic-no-group-by{overflow-x:auto}@media (max-width: 1330px){#wf-live-traffic .wf-summary-row{display:none}#wf-live-traffic .wf-live-traffic-activity-detail h2{display:none}#wf-live-traffic .wf-striped-table thead{display:none}#wf-live-traffic .wf-details-hidden .wf-live-traffic-details{padding:0.8rem 0.6rem}#wf-live-traffic .wf-details-hidden .wf-live-traffic-details{border-top:1px solid #e2e2e2}#wf-live-traffic .wf-details-hidden .wf-live-traffic-activity-detail-wrapper{opacity:1;max-height:300px}#wf-live-traffic-no-group-by .wf-striped-table{table-layout:fixed}}.wf-live-traffic-activity-type{text-align:center;float:left;width:65px}@media (min-width: 768px){.wf-live-traffic-activity-type{width:85px}}@media (min-width: 992px){.wf-live-traffic-activity-type{width:105px}}@media (min-width: 1200px){.wf-live-traffic-activity-type{width:125px}}.wf-live-traffic-activity-type .wf-live-traffic-type-icon{font-size:3rem;color:#CCCCCC}@media (min-width: 768px){.wf-live-traffic-activity-type .wf-live-traffic-type-icon{font-size:4rem}}@media (min-width: 992px){.wf-live-traffic-activity-type .wf-live-traffic-type-icon{font-size:5rem}}@media (min-width: 1200px){.wf-live-traffic-activity-type .wf-live-traffic-type-icon{font-size:6rem}}.wf-live-traffic-activity-type .wf-live-traffic-type-icon.wf-icon-human{color:#16bc9b}.wf-live-traffic-activity-type .wf-live-traffic-type-icon.wf-icon-warning{color:#ffd10a}.wf-live-traffic-activity-type .wf-live-traffic-type-icon.wf-icon-blocked{color:#d03935}.wf-live-traffic-activity-detail{margin:0;margin-left:90px}@media (min-width: 768px){.wf-live-traffic-activity-detail{margin-left:110px}}@media (min-width: 992px){.wf-live-traffic-activity-detail{margin-left:130px}}@media (min-width: 1200px){.wf-live-traffic-activity-detail{margin-left:150px}}.wf-live-traffic-activity-detail h2{margin:0px 0px .5rem}.wf-live-traffic-actions{margin:.5rem 0px 0px}#wf-live-traffic-util-overlay-wrapper{position:fixed;top:32px;right:0px;bottom:0px;left:0px;background-color:rgba(0,0,0,0.5);z-index:3000}#wf-live-traffic-util-overlay-wrapper .wf-live-traffic-util-overlay{position:fixed;top:32px;right:0px;bottom:0px;left:auto;max-width:800px;background-color:#ffffff;overflow:auto}#wf-live-traffic-util-overlay-wrapper .wf-live-traffic-util-overlay-header,#wf-live-traffic-util-overlay-wrapper .wf-live-traffic-util-overlay-body{padding:1rem 1.5rem}#wf-live-traffic-util-overlay-wrapper .wf-live-traffic-util-overlay-body{padding:1rem 1.5rem 1rem 3rem}#wf-live-traffic-util-overlay-wrapper .wf-live-traffic-util-overlay-header{background-color:#e9e9e9;border:1px solid #ffd10a;border-width:10px 0px}#wf-live-traffic-util-overlay-wrapper .wf-live-traffic-util-overlay-body .wf-flex-row{margin:0.6rem 0}#wf-live-traffic-util-overlay-wrapper .wf-live-traffic-actions{display:none}#wf-live-traffic-util-overlay-wrapper .wf-live-traffic-util-overlay-close{position:absolute;top:20px;right:16px;font-size:20px;cursor:pointer}#wf-live-traffic-util-overlay-wrapper .wf-live-traffic-activity-detail div{margin:0px 0px 0.6rem}#wf-live-traffic-util-overlay-wrapper .wf-block-ip-btn{display:inline-block}#wf-live-traffic-options .wf-block-list .wf-option-text .wf-option-title{width:30%}.wf-recent-traffic-table{font-size:.7rem}.wf-recent-traffic-table th,.wf-recent-traffic-table td{vertical-align:top}.wf-recent-traffic-table th{text-align:left;white-space:nowrap}.wf-recent-traffic-table td{word-wrap:break-word;word-break:break-all}.wf-recent-traffic-table .wf-recent-traffic-table-row-border td div{border-top:1px solid #e2e2e2;margin:10px 0}.wf-live-traffic-none{padding:0.5rem 0.6rem}.wf-flag.wf-flag-unspecified{width:16px;height:16px;background:none}.wf-flag.wf-flag-unspecified path{fill:#9f9fa0}table.block-ranges-table{border-collapse:collapse;margin:10px 0 0}table.block-ranges-table tr td{border:1px solid #CCC;border-width:1px 0;padding:10px 0 12px 0}#input-wafStatus,#input-wafStatus option,.wfselect2-container--default{font-size:0.7rem;font-weight:bold}@media (min-width: 768px){#input-wafStatus,#input-wafStatus option,.wfselect2-container--default{font-size:0.8rem}}@media (min-width: 992px){#input-wafStatus,#input-wafStatus option,.wfselect2-container--default{font-size:0.9rem}}.wfselect2-results__options{border-top:1px solid #e2e2e2}.wafStatus-enabled,.wafStatus-learning-mode,.wafStatus-disabled,.wafStatus-enabled.wfselect2-container--default .wfselect2-selection--single,.wafStatus-learning-mode.wfselect2-container--default .wfselect2-selection--single,.wafStatus-disabled.wfselect2-container--default .wfselect2-selection--single{height:40px;border-radius:0;border:0;background-color:#fff;box-shadow:1px 1px 1px 2px rgba(215,215,215,0.35)}.wafStatus-enabled .wfselect2-selection__rendered,.wafStatus-learning-mode .wfselect2-selection__rendered,.wafStatus-disabled .wfselect2-selection__rendered,.wafStatus-enabled.wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__rendered,.wafStatus-learning-mode.wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__rendered,.wafStatus-disabled.wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__rendered{color:#333;line-height:40px}.wafStatus-enabled .wfselect2-selection__arrow,.wafStatus-learning-mode .wfselect2-selection__arrow,.wafStatus-disabled .wfselect2-selection__arrow,.wafStatus-enabled.wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__arrow,.wafStatus-learning-mode.wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__arrow,.wafStatus-disabled.wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__arrow{height:38px}#waf-config-form .waf-config-label{font-size:1.3em}#waf-config-form .wfselect2-container--default .wfselect2-selection--single{padding:0.4rem;text-shadow:0 0 3px #000000;font-weight:bold}#waf-config-form .wfselect2-container .wfselect2-selection--single{height:auto}#waf-config-form .wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__arrow{height:100%;top:0}.wafStatus-enabled.wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__arrow b,.wafStatus-learning-mode.wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__arrow b,.wafStatus-disabled.wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__arrow b{border-color:#333 transparent transparent}.wafStatus-enabled.wfselect2-container--default.wfselect2-container--open .wfselect2-selection--single .wfselect2-selection__arrow b,.wafStatus-learning-mode.wfselect2-container--default.wfselect2-container--open .wfselect2-selection--single .wfselect2-selection__arrow b,.wafStatus-disabled.wfselect2-container--default.wfselect2-container--open .wfselect2-selection--single .wfselect2-selection__arrow b{border-color:transparent transparent #333}#waf-learning-mode-grace-period{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:row;flex-direction:row}#waf-learning-mode-grace-period span{padding:0 0.5rem 0 1rem}#waf-learning-mode-grace-period input{width:auto}#whitelist-form{padding-top:0.5rem}#whitelist-form .wfselect2-container--default .wfselect2-selection--single{display:block;width:100%;height:38px;padding:.5rem 1.25rem;font-size:14px;line-height:1.42857;color:#2b2b2b;background-color:#fff;background-image:none;border:1px solid #ddd;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-transition:border-color ease-in-out 0.15s,box-shadow ease-in-out 0.15s;-o-transition:border-color ease-in-out 0.15s,box-shadow ease-in-out 0.15s;transition:border-color ease-in-out 0.15s,box-shadow ease-in-out 0.15s}#whitelist-form .wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__rendered{color:#2b2b2b;line-height:inherit}#whitelist-form .wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__arrow{height:38px}#whitelist-form-separator{margin:1rem 0}#whitelist-table-controls{margin-bottom:0.5rem}#whitelist-table-controls .wfselect2-container--default{text-align:left !important}#whitelist-table-controls .wf-select-group{-webkit-justify-content:flex-end !important;justify-content:flex-end !important}.whitelist-table-container{overflow-x:auto}table.whitelist-table .whitelist-edit{display:none}table.whitelist-table .edit-mode .whitelist-display{display:none}table.whitelist-table .edit-mode .whitelist-edit{display:block}table.whitelist-table .edit-mode span.whitelist-edit,table.whitelist-table .edit-mode input.whitelist-edit{display:inline}.wf-bulk-action{margin:12px 0}tr.wf-table-filters input{max-width:120px}.wf-waf-status-disabled{padding:2rem 0}.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status .wf-block-labeled-value-value{padding-top:0}.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status .wf-block-labeled-value-value .wf-fa{font-size:8rem}.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status .wf-block-labeled-value-value svg{width:160px}.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status .wf-block-labeled-value-label{font-size:1.3125rem;font-weight:300;line-height:1.5;padding-bottom:0}.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status-full-enabled{background-color:#00709e}.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status-full-enabled .wf-block-labeled-value-value{color:#ffffff}.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status-full-enabled .wf-block-labeled-value-label{color:#ffffff;padding:0}.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status-enabled .wf-block-labeled-value-value{color:#00709e}.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status-enabled .wf-block-labeled-value-value svg{fill:#00709e}.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status-enabled .wf-block-labeled-value-label{color:#00709e}.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status-learning-mode .wf-block-labeled-value-value,.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status-disabled .wf-block-labeled-value-value{color:#9f9fa0}.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status-learning-mode .wf-block-labeled-value-value svg,.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status-disabled .wf-block-labeled-value-value svg{fill:#9f9fa0}.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status-learning-mode .wf-block-labeled-value-label,.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status-disabled .wf-block-labeled-value-label{color:#9f9fa0}.wf-waf-coverage li{-webkit-align-items:flex-start !important;align-items:flex-start !important}.wf-waf-navigation .wf-block-navigation-option-content,.wf-blocking-status .wf-block-navigation-option-content{padding:1.5rem 0 1.5rem 1.0rem}.wf-waf-navigation .wf-block-navigation-option-content h4,.wf-blocking-status .wf-block-navigation-option-content h4{margin:0 0 0.25rem 0}.wf-waf-navigation .wf-block-navigation-option-content p,.wf-blocking-status .wf-block-navigation-option-content p{margin:0 0 0.45rem 0}.wf-blocking-status>li{-webkit-flex-grow:0 !important;flex-grow:0 !important;-webkit-flex-basis:66.66667% !important;flex-basis:66.66667% !important}.wf-blocking-status>li:first-of-type{-webkit-flex-basis:33.33333% !important;flex-basis:33.33333% !important}.wf-blocking-status-premium>li{-webkit-flex-grow:0 !important;flex-grow:0 !important;-webkit-flex-basis:33.33333% !important;flex-basis:33.33333% !important}ul.wf-option.wf-option-rate-limit *{-webkit-flex-grow:1;flex-grow:1}ul.wf-option.wf-option-rate-limit *:first-child{-webkit-flex-grow:0;flex-grow:0}ul.wf-option.wf-option-rate-limit .wfselect2-container{min-width:100px}@media (min-width: 768px){ul.wf-option.wf-option-rate-limit .wfselect2-container{min-width:140px}}@media (min-width: 992px){ul.wf-option.wf-option-rate-limit .wfselect2-container{min-width:140px}}#waf-rules-wrapper tbody tr:nth-of-type(n+10){display:none}#waf-rules-wrapper.wf-show-all tbody tr:nth-of-type(n+10){display:table-row}#waf-rules-wrapper.wf-show-all #waf-show-all-rules{display:none}.wf-waf-backup-file-list{display:-webkit-flex;display:flex;-webkit-align-items:flex-start;align-items:flex-start;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:row;flex-direction:row}.wf-waf-backup-file-list>*{margin-left:0.5rem !important}.wf-waf-backup-file-list>*:first-child{margin-left:0 !important}#wf-option-loginSecurityEnabled .wf-option-subtitle{font-size:.875rem}.wf-scan-status-disabled{padding:2rem 0}.wf-block .wf-block-content .wf-block-labeled-value.wf-scan-status .wf-block-labeled-value-value{padding-top:0}.wf-block .wf-block-content .wf-block-labeled-value.wf-scan-status .wf-block-labeled-value-value .wf-fa{font-size:8rem}.wf-block .wf-block-content .wf-block-labeled-value.wf-scan-status .wf-block-labeled-value-value svg{width:160px}.wf-block .wf-block-content .wf-block-labeled-value.wf-scan-status .wf-block-labeled-value-label{font-size:1.3125rem;font-weight:300;line-height:1.5;padding-bottom:0}.wf-block .wf-block-content .wf-block-labeled-value.wf-scan-status-full-enabled{background-color:#00709e}.wf-block .wf-block-content .wf-block-labeled-value.wf-scan-status-full-enabled .wf-block-labeled-value-value{color:#ffffff}.wf-block .wf-block-content .wf-block-labeled-value.wf-scan-status-full-enabled .wf-block-labeled-value-label{color:#ffffff;padding:0}.wf-block .wf-block-content .wf-block-labeled-value.wf-scan-status-enabled .wf-block-labeled-value-value{color:#00709e}.wf-block .wf-block-content .wf-block-labeled-value.wf-scan-status-enabled .wf-block-labeled-value-value svg{fill:#00709e}.wf-block .wf-block-content .wf-block-labeled-value.wf-scan-status-enabled .wf-block-labeled-value-label{color:#00709e}.wf-block .wf-block-content .wf-block-labeled-value.wf-scan-status-disabled .wf-block-labeled-value-value{color:#9f9fa0}.wf-block .wf-block-content .wf-block-labeled-value.wf-scan-status-disabled .wf-block-labeled-value-value svg{fill:#9f9fa0}.wf-block .wf-block-content .wf-block-labeled-value.wf-scan-status-disabled .wf-block-labeled-value-label{color:#9f9fa0}.wf-scan-navigation .wf-block-navigation-option-content{padding:1.5rem 0 1.5rem 1.0rem}.wf-scan-navigation .wf-block-navigation-option-content h4{margin:0 0 0.25rem 0}.wf-scan-navigation .wf-block-navigation-option-content p{margin:0 0 0.45rem 0}#wf-scan-starter{-webkit-justify-content:center;justify-content:center}#wf-scan-starter:hover{cursor:unset}#wf-scan-starter:hover a{text-decoration:none}.wf-scanner-progress{display:-webkit-flex;display:flex;-webkit-align-items:flex-start;align-items:flex-start;-webkit-justify-content:space-between;justify-content:space-between;-webkit-flex-direction:row;flex-direction:row;-webkit-flex-wrap:nowrap;flex-wrap:nowrap;margin-top:0.5rem;margin-bottom:0.5rem;background:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB3aWR0aD0iMXB4IiBoZWlnaHQ9IjZweCIgdmlld0JveD0iMCAwIDEgNiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3BhY2U9InByZXNlcnZlIj4KCTxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIGZpbGw9IiNkMWQxZDEiLz48cmVjdCB4PSIwIiB5PSI1IiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBmaWxsPSIjZDFkMWQxIi8+Cjwvc3ZnPg==");background-repeat:repeat-x;background-position:center 24px;overflow-x:auto;overflow-y:hidden}.wf-scanner-progress>.wf-scan-step{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;-webkit-flex-direction:column;flex-direction:column;padding-left:0.5rem;padding-right:0.5rem}.wf-scanner-progress>.wf-scan-step:first-of-type{padding-left:0;background-image:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuMCIgeTE9IjAuNSIgeDI9IjEuMCIgeTI9IjAuNSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIvPjxzdG9wIG9mZnNldD0iNTAlIiBzdG9wLWNvbG9yPSIjZmZmZmZmIi8+PHN0b3Agb2Zmc2V0PSI1MSUiIHN0b3AtY29sb3I9IiNmZmZmZmYiIHN0b3Atb3BhY2l0eT0iMC4wIi8+PHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSIjZmZmZmZmIiBzdG9wLW9wYWNpdHk9IjAuMCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');background-size:100%;background-image:-webkit-gradient(linear, 0% 50%, 100% 50%, color-stop(0%, #ffffff),color-stop(50%, #ffffff),color-stop(51%, rgba(255,255,255,0)),color-stop(100%, rgba(255,255,255,0)));background-image:-moz-linear-gradient(left, #ffffff 0%,#ffffff 50%,rgba(255,255,255,0) 51%,rgba(255,255,255,0) 100%);background-image:-webkit-linear-gradient(left, #ffffff 0%,#ffffff 50%,rgba(255,255,255,0) 51%,rgba(255,255,255,0) 100%);background-image:linear-gradient(to right, #ffffff 0%,#ffffff 50%,rgba(255,255,255,0) 51%,rgba(255,255,255,0) 100%);background-repeat:no-repeat;background-position:left center}.wf-scanner-progress>.wf-scan-step:last-of-type{padding-right:0;background-image:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuMCIgeTE9IjAuNSIgeDI9IjEuMCIgeTI9IjAuNSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIgc3RvcC1vcGFjaXR5PSIwLjAiLz48c3RvcCBvZmZzZXQ9IjQ5JSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIgc3RvcC1vcGFjaXR5PSIwLjAiLz48c3RvcCBvZmZzZXQ9IjUwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');background-size:100%;background-image:-webkit-gradient(linear, 0% 50%, 100% 50%, color-stop(0%, rgba(255,255,255,0)),color-stop(49%, rgba(255,255,255,0)),color-stop(50%, #ffffff),color-stop(100%, #ffffff));background-image:-moz-linear-gradient(left, rgba(255,255,255,0) 0%,rgba(255,255,255,0) 49%,#ffffff 50%,#ffffff 100%);background-image:-webkit-linear-gradient(left, rgba(255,255,255,0) 0%,rgba(255,255,255,0) 49%,#ffffff 50%,#ffffff 100%);background-image:linear-gradient(to right, rgba(255,255,255,0) 0%,rgba(255,255,255,0) 49%,#ffffff 50%,#ffffff 100%);background-repeat:no-repeat;background-position:right center}.wf-scanner-progress>.wf-scan-step>.wf-scan-step-icon>.wf-scan-step-pending{width:50px;height:54px;background:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB3aWR0aD0iMTRweCIgaGVpZ2h0PSIxNHB4IiB2aWV3Qm94PSIwIDAgMTQgMTQiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+Cgk8Y2lyY2xlIGN4PSI3IiBjeT0iNyIgcj0iNyIgZmlsbD0iI2QxZDFkMSIvPgo8L3N2Zz4=");background-repeat:no-repeat;background-position:center center}.wf-scanner-progress>.wf-scan-step>.wf-scan-step-icon>.wf-scan-step-running{display:none;background-color:#ffffff !important}.wf-scanner-progress>.wf-scan-step>.wf-scan-step-icon>.wf-scan-step-complete-success{display:none;width:50px;height:54px;background:#fff url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj48c3ZnIHdpZHRoPSI1MHB4IiBoZWlnaHQ9IjUwcHgiIHZpZXdCb3g9IjAgMCAxMDAgMTAwIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTk4LjI4NywyMS4wMjVsLTcuODIzLC03LjgxMmMtMS4wNjYsLTEuMDkyIC0yLjUyOCwtMS43MDggLTQuMDU0LC0xLjcwOGMtMS41MjUsMCAtMi45ODgsMC42MTYgLTQuMDUzLDEuNzA4bC00Ni4wMTIsNDYuMDEybC0xOC43MTMsLTE4LjcxMmMtMS4wNjYsLTEuMDkgLTIuNTI5LC0xLjcwNCAtNC4wNTMsLTEuNzA0Yy0xLjUyNSwwIC0yLjk4NywwLjYxNCAtNC4wNTQsMS43MDRsLTcuODEyLDcuODM0Yy0xLjA5MiwxLjA2NSAtMS43MDgsMi41MjggLTEuNzA4LDQuMDUzYzAsMS41MjYgMC42MTYsMi45ODggMS43MDgsNC4wNTRsMzAuNTUxLDMwLjU1MWMxLjA2NywxLjA4OSAyLjUyOSwxLjcwMyA0LjA1NCwxLjcwM2MxLjUyNCwwIDIuOTg2LC0wLjYxNCA0LjA1MywtMS43MDNsNTcuOTE2LC01Ny44NjJjMS4wOTIsLTEuMDY1IDEuNzA4LC0yLjUyOCAxLjcwOCwtNC4wNTNjMCwtMS41MjYgLTAuNjE2LC0yLjk4OCAtMS43MDgsLTQuMDU0bDAsLTAuMDExbDAsMFoiIGZpbGw9IiMwMDcwOWUiLz48L3N2Zz4=");background-repeat:no-repeat;background-position:center center;background-size:80%}.wf-scanner-progress>.wf-scan-step>.wf-scan-step-icon>.wf-scan-step-complete-warning{display:none;width:50px;height:54px;background:#fff url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj48c3ZnIHdpZHRoPSI1MHB4IiBoZWlnaHQ9IjUwcHgiIHZpZXdCb3g9IjAgMCAxMDAgMTAwIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTk5LjA1MSw4Mi44NDJsLTQyLjgxMiwtNzguNDgzYy0wLjYxLC0xLjEzMSAtMS41MTQsLTIuMDc3IC0yLjYxNywtMi43MzdjLTIuMjI3LC0xLjMzNCAtNS4wMTcsLTEuMzM0IC03LjI0NCwwYy0xLjEwNiwwLjY1OSAtMi4wMTMsMS42MDUgLTIuNjI1LDIuNzM3bC00Mi44MDQsNzguNDgzYy0xLjI5OSwyLjE2OCAtMS4yNTYsNC44OTYgMC4xMTEsNy4wMjFjMC42MTQsMS4wNjcgMS41LDEuOTUyIDIuNTY2LDIuNTY2YzEuMDc0LDAuNjI3IDIuMjk3LDAuOTU1IDMuNTQxLDAuOTQ5bDg1LjY0MSwwYzIuNTE3LC0wLjAwOSA0Ljg1MiwtMS4zNDcgNi4xMzIsLTMuNTE1YzEuMzY3LC0yLjEyNSAxLjQxLC00Ljg1MyAwLjExMSwtNy4wMjFsMCwwWm0tNDEuOTA2LC01LjU3NmMwLjAxMSwwLjQ5IC0wLjE4MSwwLjk2NCAtMC41MywxLjMwOGMtMC4zMjUsMC4zNDIgLTAuNzc3LDAuNTM0IC0xLjI0OSwwLjUzMWwtMTAuNzE1LDBjLTAuNDcyLDAuMDAzIC0wLjkyNCwtMC4xODkgLTEuMjQ5LC0wLjUzMWMtMC4zNDksLTAuMzQ0IC0wLjU0MiwtMC44MTggLTAuNTMsLTEuMzA4bDAsLTEwLjU4OGMtMC4wMTIsLTAuNDkgMC4xODEsLTAuOTY0IDAuNTMsLTEuMzA4YzAuMzI1LC0wLjM0MSAwLjc3NywtMC41MzMgMS4yNDksLTAuNTNsMTAuNjk4LDBjMC40NzUsLTAuMDA2IDAuOTMsMC4xODcgMS4yNTgsMC41M2MwLjM0OCwwLjM0NSAwLjU0LDAuODE4IDAuNTMsMS4zMDhsMCwxMC41ODhsMC4wMDgsMFptLTAuMTExLC0yMC44NDJjLTAuMDQ1LDAuMzggLTAuMjYzLDAuNzE4IC0wLjU5LDAuOTE2Yy0wLjM4OSwwLjI1IC0wLjg0NiwwLjM3NSAtMS4zMDgsMC4zNTlsLTEwLjMyMywwYy0wLjQ3LDAuMDEzIC0wLjkzNCwtMC4xMTIgLTEuMzM0LC0wLjM1OWMtMC4zMzgsLTAuMTg1IC0wLjU1MSwtMC41MzkgLTAuNTU2LC0wLjkyNGwtMC45NDksLTI1LjQ2OGMtMC4wMywtMC40NiAwLjE4MSwtMC45MDQgMC41NTYsLTEuMTcyYzAuMzU4LC0wLjM1NSAwLjgzMSwtMC41NzMgMS4zMzQsLTAuNjE2bDEyLjI3MiwwYzAuNTA2LDAuMDQgMC45ODIsMC4yNTggMS4zNDMsMC42MTZjMC4zNTcsMC4yMzIgMC41NjgsMC42MzUgMC41NTYsMS4wNmwtMS4wMDEsMjUuNTg4WiIgZmlsbD0iI2ZjYjIxNCIvPjwvc3ZnPg==");background-repeat:no-repeat;background-position:center center;background-size:80%}.wf-scanner-progress>.wf-scan-step>.wf-scan-step-icon>.wf-scan-step-disabled{display:none;width:50px;height:54px;background:#fff url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj48c3ZnIHdpZHRoPSI1MHB4IiBoZWlnaHQ9IjUwcHgiIHZpZXdCb3g9IjAgMCAxMDAgMTAwIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTk1Ljg5LDMwLjUyOGMtMi40OTYsLTUuOTQxIC02LjEwOCwtMTEuMzUxIC0xMC42NDIsLTE1LjkzOGMtNC41NzUsLTQuNTM4IC05Ljk5LC04LjE0OCAtMTUuOTQyLC0xMC42M2MtMTIuNDAxLC01LjI4IC0yNi40NDEsLTUuMjggLTM4Ljg0MiwwYy01Ljk2NSwyLjQ4NSAtMTEuMzg5LDYuMTAxIC0xNS45NzIsMTAuNjVjLTQuNTEsNC41ODYgLTguMTAxLDkuOTg5IC0xMC41ODIsMTUuOTE4Yy01LjI4NywxMi40MzIgLTUuMjg3LDI2LjQ5IDAsMzguOTIxYzIuNDk1LDUuOTQyIDYuMTA3LDExLjM1MyAxMC42NDIsMTUuOTM5YzQuNTgzLDQuNTQ4IDEwLjAwNyw4LjE2NSAxNS45NzIsMTAuNjQ5YzEyLjQsNS4yODQgMjYuNDQyLDUuMjg0IDM4Ljg0MiwwYzUuOTY1LC0yLjQ4NCAxMS4zODksLTYuMTAxIDE1Ljk3MiwtMTAuNjQ5YzQuNTM2LC00LjU4NSA4LjE0OSwtOS45OTYgMTAuNjQyLC0xNS45MzljNS4yODcsLTEyLjQzMSA1LjI4NywtMjYuNDg5IDAsLTM4LjkyMWwtMC4wOSwwWm0tNzUuNjA4LDM4Ljg1MWMtNy4zMDIsLTExLjIxMiAtNy42ODksLTI1LjYyIC0wLjk5OCwtMzcuMjA3YzMuMDc1LC01LjM3NSA3LjUyMiwtOS44NDQgMTIuODg3LC0xMi45NWM1LjM3NSwtMy4xMjkgMTEuNDk3LC00Ljc1NCAxNy43MTksLTQuNzAyYzYuOTU1LC0wLjA2IDEzLjc2NiwyLjAwMiAxOS41MTYsNS45MDdsLTQ5LjEyNCw0OC45NTJabTYyLjIwMSwtNS42NDhjLTEuNzU1LDQuMjI4IC00LjMxOCw4LjA3NiAtNy41NDcsMTEuMzI2Yy0zLjI0MywzLjIyOSAtNy4wNzYsNS44MDkgLTExLjI5LDcuNjAxYy00LjM0MywxLjg4MyAtOS4wMzEsMi44NDYgLTEzLjc2NiwyLjgyOWMtNi44NzIsMC4wMDggLTEzLjU5NSwtMi4wMTcgLTE5LjMxNiwtNS44MTdsNDkuMDU0LC00OC44MTNjMy43NDEsNS42ODcgNS43MTEsMTIuMzU0IDUuNjYsMTkuMTU3YzAuMDAzLDQuNzEzIC0wLjk0OCw5LjM3OSAtMi43OTUsMTMuNzE3bDAsMFoiIGZpbGw9IiNkMWQxZDEiLz48L3N2Zz4=");background-repeat:no-repeat;background-position:center center;background-size:80%}.wf-scanner-progress>.wf-scan-step>.wf-scan-step-icon>.wf-scan-step-premium{width:50px;height:54px;background:#fff url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB3aWR0aD0iMjRweCIgaGVpZ2h0PSIzMHB4IiB2aWV3Qm94PSIwIDAgMjQgMzAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KCTxwYXRoIGQ9Ik0yMy45NDksMTQuMjMzYy0wLjM3OSwtMC4zOSAtMC45MDQsLTAuNjA2IC0xLjQ0OCwtMC41OTVsLTAuNjgzLDBsMCwtNC4wOTJjMC4wMzIsLTIuNTM1IC0wLjk4NiwtNC45NzMgLTIuODEyLC02LjczMWMtMS43NTksLTEuODI4IC00LjE5OCwtMi44NDcgLTYuNzM0LC0yLjgxNWMtMi41MzYsLTAuMDMyIC00Ljk3NiwwLjk4NyAtNi43MzQsMi44MTVjLTEuODI2LDEuNzU4IC0yLjg0NCw0LjE5NiAtMi44MTIsNi43MzFsMCw0LjA4OWwtMC42OCwwYy0wLjU0NCwtMC4wMTEgLTEuMDY5LDAuMjA1IC0xLjQ0OCwwLjU5NWMtMC4zOTUsMC4zODIgLTAuNjEyLDAuOTEyIC0wLjU5OCwxLjQ2MWwwLDEyLjI2NmMtMC4wMTEsMC41NDQgMC4yMDQsMS4wNjkgMC41OTUsMS40NDhjMC4zNzksMC4zOTEgMC45MDQsMC42MDYgMS40NDgsMC41OTVsMjAuNDU4LDBjMC4wMDMsMCAwLjAwNiwwIDAuMDEsMGMxLjExNywwIDIuMDM2LC0wLjkxOSAyLjAzNiwtMi4wMzdjMCwtMC4wMDMgMCwtMC4wMDYgMCwtMC4wMDlsMCwtMTIuMjYzYzAuMDExLC0wLjU0NCAtMC4yMDYsLTEuMDY5IC0wLjU5OCwtMS40NDhsMCwtMC4wMVptLTYuMjExLC0wLjU5NWwtMTAuOTE5LDBsMCwtNC4wOTJjLTAuMDIyLC0xLjQ1MSAwLjU1NywtMi44NDggMS41OTksLTMuODU4YzEuMDA5LC0xLjA0MiAyLjQwNywtMS42MjEgMy44NTcsLTEuNTk4YzEuNDUxLC0wLjAyMyAyLjg0OCwwLjU1NiAzLjg1OCwxLjU5OGMxLjA0MiwxLjAwOSAxLjYyMSwyLjQwNyAxLjU5OCwzLjg1OGwwLjAwNyw0LjA5MloiIGZpbGw9IiNkMWQxZDEiLz4KPC9zdmc+");background-repeat:no-repeat;background-position:center center;background-size:40%}.wf-scanner-progress>.wf-scan-step.wf-scan-step-premium>.wf-scan-step-icon>.wf-scan-step-pending{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-premium>.wf-scan-step-icon>.wf-scan-step-running{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-premium>.wf-scan-step-icon>.wf-scan-step-complete-success{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-premium>.wf-scan-step-icon>.wf-scan-step-complete-warning{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-premium>.wf-scan-step-icon>.wf-scan-step-disabled{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-running>.wf-scan-step-icon>.wf-scan-step-pending{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-running>.wf-scan-step-icon>.wf-scan-step-running{display:block}.wf-scanner-progress>.wf-scan-step.wf-scan-step-running>.wf-scan-step-icon>.wf-scan-step-complete-success{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-running>.wf-scan-step-icon>.wf-scan-step-complete-warning{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-running>.wf-scan-step-icon>.wf-scan-step-disabled{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-complete-success>.wf-scan-step-icon>.wf-scan-step-pending{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-complete-success>.wf-scan-step-icon>.wf-scan-step-running{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-complete-success>.wf-scan-step-icon>.wf-scan-step-complete-success{display:block}.wf-scanner-progress>.wf-scan-step.wf-scan-step-complete-success>.wf-scan-step-icon>.wf-scan-step-complete-warning{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-complete-success>.wf-scan-step-icon>.wf-scan-step-disabled{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-complete-warning>.wf-scan-step-icon>.wf-scan-step-pending{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-complete-warning>.wf-scan-step-icon>.wf-scan-step-running{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-complete-warning>.wf-scan-step-icon>.wf-scan-step-complete-success{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-complete-warning>.wf-scan-step-icon>.wf-scan-step-complete-warning{display:block}.wf-scanner-progress>.wf-scan-step.wf-scan-step-complete-warning>.wf-scan-step-icon>.wf-scan-step-disabled{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-disabled>.wf-scan-step-icon>.wf-scan-step-pending{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-disabled>.wf-scan-step-icon>.wf-scan-step-running{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-disabled>.wf-scan-step-icon>.wf-scan-step-complete-success{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-disabled>.wf-scan-step-icon>.wf-scan-step-complete-warning{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-disabled>.wf-scan-step-icon>.wf-scan-step-disabled{display:block}.wf-scanner-progress>.wf-scan-step>.wf-scan-step-title{font-size:0.7rem;padding-top:0.5rem;white-space:nowrap}.wf-scanner-progress>.wf-scan-step>.wf-scan-step-subtitle{font-size:0.7rem}#wf-scan-last-status{font-size:0.75rem;text-align:center}@media (min-width: 768px){#wf-scan-last-status{text-align:left}}#wf-scan-activity-log-controls{-webkit-flex-shrink:0;flex-shrink:0;text-align:center;white-space:nowrap}@media (min-width: 768px){#wf-scan-activity-log-controls{text-align:right}}#wf-scan-activity-log-controls a{text-transform:uppercase;font-size:0.75rem;white-space:nowrap}#wf-scan-toggle-activity-log .wf-scan-activity-log-visible{display:none}#wf-scan-toggle-activity-log .wf-scan-activity-log-hidden{display:inline}#wf-scan-toggle-activity-log.wf-active .wf-scan-activity-log-visible{display:inline}#wf-scan-toggle-activity-log.wf-active .wf-scan-activity-log-hidden{display:none}#wf-scan-running-bar{height:4px;border:1px solid #e2e2e2;background-color:#ffffff;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px}#wf-scan-running-bar-pill{height:4px;background-color:#00709e;width:33.3333%;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;-webkit-animation:wf-scan-running-bar-pill-keyframes 1s linear infinite alternate both;-o-animation:wf-scan-running-bar-pill-keyframes 1s linear infinite alternate both;animation:wf-scan-running-bar-pill-keyframes 1s linear infinite alternate both}@-moz-keyframes wf-scan-running-bar-pill-keyframes{from{margin-left:0%}to{margin-left:66.6667%}}@-webkit-keyframes wf-scan-running-bar-pill-keyframes{from{margin-left:0%}to{margin-left:66.6667%}}@keyframes wf-scan-running-bar-pill-keyframes{from{margin-left:0%}to{margin-left:66.6667%}}#wf-scan-activity-log{display:none;overflow-x:hidden;overflow-y:auto;background-color:#ffffff;box-shadow:0 0 0 1px rgba(200,215,225,0.25),0 1px 2px #e9eff3;padding:0.5rem;height:7rem}#wf-scan-activity-log>li{margin:0;padding:0}#wf-scan-activity-log.wf-active{display:block}.wf-scan-tabs{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;box-shadow:inset 0px 0px 0px 1px #f1f1f1,inset 0px -1px 0px 1px #e2e2e2;margin:0.5rem 0 0 0}.wf-scan-tabs>*{-webkit-flex-grow:0;flex-grow:0;min-width:0}.wf-scan-tabs .wf-tab{border:1px solid #d0d0d0;border-top-right-radius:0.5rem;border-top-left-radius:0.5rem;border-bottom:none;margin:0;margin-left:0.5rem;background:#e6e6e6;color:#333}.wf-scan-tabs .wf-tab:first-of-type{margin-left:0}.wf-scan-tabs .wf-tab a{display:block;padding:0.5rem 1rem;font-size:14px;line-height:24px;text-decoration:none;font-weight:bold;color:#333}.wf-scan-tabs .wf-tab.wf-active,.wf-scan-tabs .wf-tab:hover{border-bottom:1px solid #ffffff;background:#ffffff;color:#00709e;margin-bottom:-1px;-webkit-box-shadow:none;box-shadow:none}.wf-scan-tabs .wf-tab.wf-active a,.wf-scan-tabs .wf-tab:hover a{color:#00709e}.wf-scan-tabs #wf-scan-bulk-buttons{-webkit-flex-grow:1 !important;flex-grow:1 !important;text-align:right}.wf-scan-tab-content{display:none;margin-top:15px}.wf-scan-tab-content.wf-active{display:block}.wf-scan-results{margin:0;margin-top:-1px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;border-left:1px solid #e2e2e2;border-right:1px solid #e2e2e2;border-bottom:1px solid #e2e2e2}.wf-scan-results>.wf-scan-results-stats{margin:0}.wf-scan-results>.wf-scan-results-stats>.wf-block{box-shadow:none;margin:0}.wf-scan-results>.wf-scan-results-stats>.wf-block>.wf-block-content>.wf-block-list>li{border-top:0px;padding:0 1rem}.wf-scan-results>.wf-scan-results-stats>.wf-block>.wf-block-content>.wf-block-list .wf-flex-horizontal>li{font-size:0.75rem;white-space:nowrap;margin:0}.wf-scan-results>.wf-scan-results-stats>.wf-block>.wf-block-content>.wf-block-list .wf-flex-horizontal>li:last-of-type{text-align:right}.wf-scan-results-issues{padding:0;margin:0;display:none}.wf-scan-results-issues.wf-active{display:block}.wf-issue,.wf-issue-site-cleaning{display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:column;flex-direction:column;border-top:1px solid #e2e2e2}.wf-issue:nth-of-type(2n),.wf-issue-site-cleaning:nth-of-type(2n){background-color:#fff}.wf-issue>li,.wf-issue-site-cleaning>li{margin:0}.wf-issue.wf-issue-severity-critical,.wf-issue-site-cleaning.wf-issue-severity-critical{border-left:4px solid #930000}.wf-issue.wf-issue-severity-warning,.wf-issue-site-cleaning.wf-issue-severity-warning{border-left:4px solid #fcb214}.wf-issue.wf-issue-severity-good,.wf-issue-site-cleaning.wf-issue-severity-good{border-left:4px solid #16bc9b}.wf-issue>.wf-issue-summary>ul,.wf-issue-site-cleaning>.wf-issue-summary>ul{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:row;flex-direction:row;padding:1.5rem}.wf-issue>.wf-issue-summary>ul>li,.wf-issue-site-cleaning>.wf-issue-summary>ul>li{margin:0;padding:0;padding-left:1.5rem}@media (max-width: 767px){.wf-issue>.wf-issue-summary>ul>li,.wf-issue-site-cleaning>.wf-issue-summary>ul>li{padding-left:0.5rem}}.wf-issue>.wf-issue-summary>ul>li:first-of-type,.wf-issue-site-cleaning>.wf-issue-summary>ul>li:first-of-type{padding-left:0}.wf-issue>.wf-issue-summary>ul>.wf-issue-icon,.wf-issue>.wf-issue-summary>ul>.wf-issue-icon-colored,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-icon,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-icon-colored{text-align:left;-webkit-flex-basis:50px;flex-basis:50px;-webkit-flex-shrink:0;flex-shrink:0}.wf-issue>.wf-issue-summary>ul>.wf-issue-icon>*,.wf-issue>.wf-issue-summary>ul>.wf-issue-icon-colored>*,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-icon>*,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-icon-colored>*{height:40px}.wf-issue>.wf-issue-summary>ul>.wf-issue-icon svg path,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-icon svg path{fill:#9e9e9e}.wf-issue>.wf-issue-summary>ul>.wf-issue-short,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short{-webkit-flex-basis:40%;flex-basis:40%}.wf-issue>.wf-issue-summary>ul>.wf-issue-stats,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-stats{-webkit-flex-basis:25%;flex-basis:25%}.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats{-webkit-flex-grow:1;flex-grow:1}.wf-issue>.wf-issue-summary>ul .wf-issue-severity-critical,.wf-issue>.wf-issue-summary>ul .wf-issue-severity-warning,.wf-issue-site-cleaning>.wf-issue-summary>ul .wf-issue-severity-critical,.wf-issue-site-cleaning>.wf-issue-summary>ul .wf-issue-severity-warning{background-repeat:no-repeat;background-position:left center;padding-left:18px}.wf-issue>.wf-issue-summary>ul .wf-issue-severity-critical,.wf-issue-site-cleaning>.wf-issue-summary>ul .wf-issue-severity-critical{background-image:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB3aWR0aD0iMTBweCIgaGVpZ2h0PSIxMHB4IiB2aWV3Qm94PSIwIDAgMTAgMTAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KCTxjaXJjbGUgY3g9IjUiIGN5PSI1IiByPSI1IiBmaWxsPSIjOTMwMDAwIi8+Cjwvc3ZnPg==")}.wf-issue>.wf-issue-summary>ul .wf-issue-severity-warning,.wf-issue-site-cleaning>.wf-issue-summary>ul .wf-issue-severity-warning{background-image:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB3aWR0aD0iMTBweCIgaGVpZ2h0PSIxMHB4IiB2aWV3Qm94PSIwIDAgMTAgMTAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KCTxjaXJjbGUgY3g9IjUiIGN5PSI1IiByPSI1IiBmaWxsPSIjZmNiMjE0Ii8+Cjwvc3ZnPg==")}.wf-issue>.wf-issue-summary>ul>.wf-issue-controls,.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-controls,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls{-webkit-flex-grow:1;flex-grow:1;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-end;justify-content:flex-end;-webkit-flex-direction:row;flex-direction:row}.wf-issue>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control,.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;-webkit-flex-direction:column;flex-direction:column;padding-left:2rem;text-decoration:none}.wf-issue>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control:first-of-type,.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control:first-of-type,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control:first-of-type,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control:first-of-type{padding-left:0}.wf-issue>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control>.wf-issue-control-icon,.wf-issue>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control .wf-issue-control-icon-inactive,.wf-issue>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control .wf-issue-control-icon-active,.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control>.wf-issue-control-icon,.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control .wf-issue-control-icon-inactive,.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control .wf-issue-control-icon-active,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control>.wf-issue-control-icon,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control .wf-issue-control-icon-inactive,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control .wf-issue-control-icon-active,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control>.wf-issue-control-icon,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control .wf-issue-control-icon-inactive,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control .wf-issue-control-icon-active{height:20px}.wf-issue>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control>.wf-issue-control-icon path,.wf-issue>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control .wf-issue-control-icon-inactive path,.wf-issue>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control .wf-issue-control-icon-active path,.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control>.wf-issue-control-icon path,.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control .wf-issue-control-icon-inactive path,.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control .wf-issue-control-icon-active path,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control>.wf-issue-control-icon path,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control .wf-issue-control-icon-inactive path,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control .wf-issue-control-icon-active path,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control>.wf-issue-control-icon path,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control .wf-issue-control-icon-inactive path,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control .wf-issue-control-icon-active path{fill:#9e9e9e;fill-rule:nonzero}.wf-issue>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control>.wf-issue-control-label,.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control>.wf-issue-control-label,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control>.wf-issue-control-label,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control>.wf-issue-control-label{padding-top:0.65rem;font-size:0.7rem;font-weight:500;text-transform:uppercase;color:#9e9e9e}.wf-issue>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control:hover>.wf-issue-control-icon path,.wf-issue>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control:hover .wf-issue-control-icon-inactive path,.wf-issue>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control:hover .wf-issue-control-icon-active path,.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control:hover>.wf-issue-control-icon path,.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control:hover .wf-issue-control-icon-inactive path,.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control:hover .wf-issue-control-icon-active path,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control:hover>.wf-issue-control-icon path,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control:hover .wf-issue-control-icon-inactive path,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control:hover .wf-issue-control-icon-active path,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control:hover>.wf-issue-control-icon path,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control:hover .wf-issue-control-icon-inactive path,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control:hover .wf-issue-control-icon-active path{fill:#00709e}.wf-issue>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control:hover>.wf-issue-control-label,.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control:hover>.wf-issue-control-label,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control:hover>.wf-issue-control-label,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control:hover>.wf-issue-control-label{color:#00709e}.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls{margin-top:1rem;-webkit-justify-content:flex-start;justify-content:flex-start}.wf-issue .wf-issue-control-icon-active,.wf-issue-site-cleaning .wf-issue-control-icon-active{display:none}.wf-issue .wf-issue-control-icon-inactive,.wf-issue-site-cleaning .wf-issue-control-icon-inactive{display:block}.wf-issue>.wf-issue-detail,.wf-issue-site-cleaning>.wf-issue-detail{display:none;padding:1.5rem;border-top:1px solid #e2e2e2}.wf-issue>.wf-issue-detail .wf-issue-detail-spacer,.wf-issue-site-cleaning>.wf-issue-detail .wf-issue-detail-spacer{height:1rem;margin:0;padding:0}.wf-issue>.wf-issue-detail .wf-issue-detail-controls,.wf-issue-site-cleaning>.wf-issue-detail .wf-issue-detail-controls{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:row;flex-direction:row;margin:0;margin-top:1rem}.wf-issue>.wf-issue-detail .wf-issue-detail-controls>*,.wf-issue-site-cleaning>.wf-issue-detail .wf-issue-detail-controls>*{margin-left:1rem}.wf-issue>.wf-issue-detail .wf-issue-detail-controls>*:first-of-type,.wf-issue-site-cleaning>.wf-issue-detail .wf-issue-detail-controls>*:first-of-type{margin-left:0}@media (max-width: 767px){.wf-issue>.wf-issue-detail .wf-issue-detail-controls,.wf-issue-site-cleaning>.wf-issue-detail .wf-issue-detail-controls{-webkit-align-items:flex-start;align-items:flex-start;-webkit-flex-direction:column;flex-direction:column}.wf-issue>.wf-issue-detail .wf-issue-detail-controls>*,.wf-issue-site-cleaning>.wf-issue-detail .wf-issue-detail-controls>*{margin-left:0;margin-top:0.5rem}.wf-issue>.wf-issue-detail .wf-issue-detail-controls>*:first-of-type,.wf-issue-site-cleaning>.wf-issue-detail .wf-issue-detail-controls>*:first-of-type{margin-top:0}}.wf-issue.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-show-details>.wf-issue-control-icon path,.wf-issue.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-show-details .wf-issue-control-icon-inactive path,.wf-issue.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-show-details .wf-issue-control-icon-active path,.wf-issue-site-cleaning.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-show-details>.wf-issue-control-icon path,.wf-issue-site-cleaning.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-show-details .wf-issue-control-icon-inactive path,.wf-issue-site-cleaning.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-show-details .wf-issue-control-icon-active path{fill:#00709e}.wf-issue.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-show-details>.wf-issue-control-label,.wf-issue-site-cleaning.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-show-details>.wf-issue-control-label{color:#00709e}.wf-issue.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-icon-inactive,.wf-issue-site-cleaning.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-icon-inactive{display:none}.wf-issue.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-icon-active,.wf-issue-site-cleaning.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-icon-active{display:block}.wf-issue.wf-active>.wf-issue-detail,.wf-issue-site-cleaning.wf-active>.wf-issue-detail{display:block}.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short{-webkit-flex-basis:auto;flex-basis:auto}.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short p{padding:0;margin:0}.wf-option-scan-signatures>.wf-option-disclosure{-webkit-flex-grow:1;flex-grow:1;text-align:right}.wf-option-scan-signatures>.wf-option-disclosure>svg{transition:transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275)}#wf-scan-additional-signatures{display:none;margin-left:3rem;padding-left:30px;padding-bottom:1rem}#wf-scan-additional-signatures>h4{margin:0 0 0.5rem 0}#wf-scan-additional-signatures>textarea{width:300px;height:80px}.wf-scan-type-enabled{padding:1rem 0.5rem}.wf-scan-type-enabled>li:first-of-type{padding-right:1.5rem}.wf-scan-type-controls{display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:column;flex-direction:column;margin:0 -0.5rem}.wf-scan-type{display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-justify-content:center;justify-content:center;-webkit-flex-direction:row;flex-direction:row;min-width:700px}@media (max-width: 767px){.wf-scan-type{-webkit-justify-content:flex-start;justify-content:flex-start}}.wf-scan-type>li{-webkit-flex-grow:1;flex-grow:1;-webkit-flex-shrink:0;flex-shrink:0;-webkit-flex-basis:25%;flex-basis:25%;display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-justify-content:center;justify-content:center;max-width:25%;padding:0.5rem}@media (min-width: 768px){.wf-scan-type>li{-webkit-flex-shrink:1;flex-shrink:1}}.wf-scan-type>li>ul.wf-scan-type-option{-webkit-flex-grow:1;flex-grow:1;margin:0;padding:0;border:1px solid #d9d9d9;min-height:100%;cursor:pointer}.wf-scan-type>li>ul.wf-scan-type-option.wf-scan-type-option-custom{cursor:inherit}.wf-scan-type>li>ul.wf-scan-type-option>.wf-scan-type-option-name{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;-webkit-flex-direction:row;flex-direction:row;border-bottom:2px solid #d9d9d9;padding:0.5rem 1rem}.wf-scan-type>li>ul.wf-scan-type-option>.wf-scan-type-option-name .wf-option-checkbox{margin-right:0.5rem;width:20px;height:20px;min-width:20px;min-height:20px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;line-height:20px !important;background-color:#ffffff;box-shadow:0px 0px 0px 1px rgba(185,185,185,0.75);color:#ffffff !important;font-size:25px !important}.wf-scan-type>li>ul.wf-scan-type-option>.wf-scan-type-option-name span{font-weight:400;font-size:0.95rem}.wf-scan-type>li>ul.wf-scan-type-option>.wf-scan-type-option-description{padding:1rem}.wf-scan-type>li>ul.wf-scan-type-option.wf-active>.wf-scan-type-option-name{background-color:#00709e}.wf-scan-type>li>ul.wf-scan-type-option.wf-active>.wf-scan-type-option-name .wf-option-checkbox{color:#00709e !important}.wf-scan-type>li>ul.wf-scan-type-option.wf-active>.wf-scan-type-option-name span{color:#ffffff}.wf-scan-scheduling-manual{display:none;margin-left:3rem;padding-left:30px}.wf-scan-scheduling-manual.wf-active{display:block}.wf-scan-scheduling-manual>li{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:row;flex-direction:row}.wf-scan-scheduling-manual .wf-scan-scheduling-manual-presets-label{padding-right:1rem}.wf-scan-scheduling-manual .wf-scan-scheduling-manual-presets{display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:row;flex-direction:row;margin:0;padding:0}.wf-scan-scheduling-manual .wf-scan-scheduling-manual-presets>li{margin:0;padding:0.5rem 0.7rem;text-transform:uppercase;cursor:pointer;color:#aaa;font-weight:400;border-top:1px solid #bfbfbf;border-bottom:1px solid #bfbfbf;border-right:1px solid #bfbfbf}.wf-scan-scheduling-manual .wf-scan-scheduling-manual-presets>li:first-of-type{border-left:1px solid #bfbfbf;-moz-border-radius-topleft:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px}.wf-scan-scheduling-manual .wf-scan-scheduling-manual-presets>li:last-of-type{-moz-border-radius-topright:6px;-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-moz-border-radius-bottomright:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px}.wf-scan-scheduling-manual .wf-scan-scheduling-manual-presets>li.wf-active{color:#ffffff;background-color:#00709e}.wf-scan-scheduling-manual-preset-options .wfselect2-container{min-width:100px}.wf-scan-scheduling-manual-preset-options:not(.wf-active),.wf-scan-scheduling-manual-custom-options:not(.wf-active){display:none !important}.wf-scan-scheduling-manual-custom-options{padding-bottom:1rem}.wf-schedule-times-wrapper{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between;-webkit-flex-direction:row;flex-direction:row;margin-top:1rem}@media (min-width: 768px){.wf-schedule-times-wrapper{margin-top:0.25rem}}.wf-schedule-times-wrapper:first-of-type{margin-top:0}@media (min-width: 768px){.wf-schedule-times-wrapper:first-of-type{margin-top:1rem}}.wf-schedule-times-wrapper>*{-webkit-flex-grow:1;flex-grow:1;min-width:0}.wf-schedule-times-wrapper>*:first-child{-webkit-flex-grow:0;flex-grow:0;min-width:initial;padding-right:0.25rem}.wf-schedule-times-wrapper .wf-schedule-period{font-weight:500;padding:0.5rem 0.7rem}.wf-schedule-times{display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:row;flex-direction:row}.wf-schedule-times>li{margin:0;padding:0.5rem 0.7rem;text-transform:uppercase;cursor:pointer;color:#aaa;font-weight:400;border-top:1px solid #bfbfbf;border-bottom:1px solid #bfbfbf;border-right:1px solid #bfbfbf}.wf-schedule-times>li:first-of-type{border-left:1px solid #bfbfbf;-moz-border-radius-topleft:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px}.wf-schedule-times>li:last-of-type{-moz-border-radius-topright:6px;-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-moz-border-radius-bottomright:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px}.wf-schedule-times>li.wf-active{color:#ffffff;background-color:#00709e}.wf-issue-control-ignore-menu{position:absolute;z-index:9999;background-color:#ffffff;border:1px solid #bfbfbf}.wf-issue-control-ignore-menu>li{padding:0.5rem 1rem;margin:0;border-top:1px solid #bfbfbf;cursor:pointer}.wf-issue-control-ignore-menu>li:hover{color:#ffffff;background-color:#00709e}.wf-issue-control-ignore-menu>li:first-of-type{border-top:0}#wf-scan-failed.wf-alert.wf-alert-danger{background-color:#ffe470;border-color:#ffd10a;border-radius:0}#wf-scan-failed.wf-alert.wf-alert-danger pre{white-space:normal}#wf-scan-failed.wf-alert.wf-alert-danger svg{width:50px;height:50px;margin-right:1rem}#wf-scan-failed.wf-alert.wf-alert-danger svg path{fill:#da9603}#wf-scan-failed.wf-alert.wf-alert-danger h4{margin:0}#wf-scan-failed.wf-alert.wf-alert-danger p{margin-top:0.25rem;margin-bottom:0}#wf-scan-failed.wf-alert.wf-alert-danger .wf-btn.wf-btn-default{border-color:#ffffff;background-color:#ffffff;color:#000000}#wf-site-cleaning-bottom h3{color:#00709e;font-weight:300;font-size:1.5rem;margin:1rem 0}#wf-site-cleaning-bottom p{max-width:750px}#wordfenceRightRail img{max-width:100%}#wordfenceRightRail ul{list-style-type:none;margin:0;margin-top:15px}#wordfenceRightRail .center{text-align:center}#wordfenceRightRail .button-primary{text-align:center;text-transform:uppercase;font-weight:bold;background-color:#00709e}.wordfenceRightRail img{width:100%}.wordfenceRightRailLiveTraffic,.wordfenceRightRailOptions,.wordfenceRightRailDiagnostics{margin-left:1055px}.wordfenceRightRailBlockedIPs,.wordfenceRightRailWAF,.wordfenceRightRailCountryBlocking,.wordfenceRightRailScanSchedule{margin-left:950px}.wordfenceRightRail ul{list-style-type:none;margin:0}.wordfenceRightRail .center{text-align:center}.wordfenceRightRail .button-primary{text-align:center;text-transform:uppercase;font-weight:bold;background-color:#00709e}.wordfenceWrap.wordfence-community{min-height:760px}#wfTwoFactorQRCodeTable{width:175px;height:175px;margin:0 auto}@media (min-width: 500px){#wfTwoFactorQRCodeTable{width:256px;height:256px}}#wfTwoFactorRecoveryCodes{list-style-type:none}#wfTwoFactorRecoveryCodes li{font-family:monospace;text-align:center}#wfTwoFactorDownload .dashicons{line-height:26px}.wf-twofactor-delete{font-size:1.5rem}.wf-twofactor-delete a{text-decoration:none;color:#333}.wf-twofactor-delete a i{font-size:1.5rem}.wf-table.wf-table-twofactor>tbody>tr>td{vertical-align:middle}.wf-form-twofactor{max-width:400px}.wf-form-twofactor .wf-radio label{padding-left:0}#twofactor .wf-block-list>li{padding:.8rem 1.5rem;min-height:0px}#twofactor .wf-block-list .wf-form-control{margin:0px 0px}.wf-block-list .wf-block-list-title{font-weight:bold;font-size:0.9rem}.wf-block-list .wf-block-list-subtitle{font-weight:bold;font-size:0.85rem;color:#008cc1}#wfTwoFacUsers{margin:0 auto 1.5rem}#wf-tools-two-factor #wf-two-factor-img1,#wf-tools-two-factor #wf-two-factor-img2,#wf-all-options #wf-two-factor-img1,#wf-all-options #wf-two-factor-img2{display:inline}#wf-tools-two-factor #wf-two-factor-img1,#wf-all-options #wf-two-factor-img1{max-width:316px}#wf-tools-two-factor #wf-two-factor-img2,#wf-all-options #wf-two-factor-img2{max-width:270px}#wfUsername{max-width:568px}@media screen and (max-width: 782px){#wf-tools-two-factor #wf-two-factor-img1,#wf-tools-two-factor #wf-two-factor-img2,#wf-all-options #wf-two-factor-img1,#wf-all-options #wf-two-factor-img2{display:block;margin:0px auto 20px}}fieldset{padding:0;margin:0;border:0;min-width:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:bold}label.wf-plain{font-weight:normal}label.wf-control-label.wf-disabled{pointer-events:none}input[type="search"]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type="radio"],input[type="checkbox"]{margin-top:1px \9;line-height:normal}input[type="file"]{display:block}input[type="range"]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:1.5rem;font-size:14px;line-height:1.42857;color:#555}.wf-form-control{display:block;width:100%;height:38px;padding:.5rem 1.25rem;font-size:14px;line-height:1.42857;color:#555;background-color:#fff;background-image:none;border:1px solid #ddd;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-transition:border-color ease-in-out 0.15s,box-shadow ease-in-out 0.15s;-o-transition:border-color ease-in-out 0.15s,box-shadow ease-in-out 0.15s;transition:border-color ease-in-out 0.15s,box-shadow ease-in-out 0.15s}.wf-form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6)}.wf-form-control::-moz-placeholder{color:#bfbfbf;opacity:1}.wf-form-control:-ms-input-placeholder{color:#bfbfbf}.wf-form-control::-webkit-input-placeholder{color:#bfbfbf}.wf-form-control::-ms-expand{border:0;background-color:transparent}.wf-form-control[disabled],.wf-form-control[readonly],fieldset[disabled] .wf-form-control{background-color:#e2e2e2;opacity:1}.wf-form-control[disabled],.wf-form-control[readonly],fieldset[disabled] .wf-form-control{cursor:not-allowed;pointer-events:none}textarea.wf-form-control{height:auto}input[type="search"]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio: 0){input[type="date"].wf-form-control,input[type="time"].wf-form-control,input[type="datetime-local"].wf-form-control,input[type="month"].wf-form-control{line-height:38px}input[type="date"].wf-input-sm,.wf-input-group-sm input[type="date"],input[type="time"].wf-input-sm,.wf-input-group-sm input[type="time"],input[type="datetime-local"].wf-input-sm,.wf-input-group-sm input[type="datetime-local"],input[type="month"].wf-input-sm,.wf-input-group-sm input[type="month"]{line-height:30px}input[type="date"].wf-input-lg,.wf-input-group-lg input[type="date"],input[type="time"].wf-input-lg,.wf-input-group-lg input[type="time"],input[type="datetime-local"].wf-input-lg,.wf-input-group-lg input[type="datetime-local"],input[type="month"].wf-input-lg,.wf-input-group-lg input[type="month"]{line-height:46px}}.wf-form-group{margin-bottom:8px}.wf-form-group.wf-sub-group label{color:#666666;font-weight:normal;padding-left:20px}.wf-form-group.wf-focus{border-left:4px solid #11967a;padding-bottom:8px;background-color:#e5e5e5}.wf-form-group.wf-focus label{margin-left:-4px}.wf-radio,.wf-checkbox{position:relative;display:block;margin-top:10px;margin-bottom:10px}.wf-radio label,.wf-checkbox label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:normal;cursor:pointer}.wf-radio input[type="radio"],.wf-radio-inline input[type="radio"],.wf-checkbox input[type="checkbox"],.wf-checkbox-inline input[type="checkbox"]{margin-top:4px \9}.wf-radio-offset{padding-left:29px}@media (min-width: 768px){.wf-radio-offset{padding-left:20px}}.wf-radio+.wf-radio,.wf-checkbox+.wf-checkbox{margin-top:-5px}.wf-radio-inline,.wf-checkbox-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;vertical-align:middle;font-weight:normal;cursor:pointer}.wf-radio-inline+.wf-radio-inline,.wf-checkbox-inline+.wf-checkbox-inline{margin-top:0;margin-left:10px}input[type="radio"][disabled],input[type="radio"][readonly],input[type="radio"].wf-disabled,fieldset[disabled] input[type="radio"],input[type="checkbox"][disabled],input[type="checkbox"][readonly],input[type="checkbox"].wf-disabled,fieldset[disabled] input[type="checkbox"]{cursor:not-allowed;pointer-events:none}.wf-radio-inline.wf-disabled,fieldset[disabled] .wf-radio-inline,.wf-checkbox-inline.wf-disabled,fieldset[disabled] .wf-checkbox-inline{cursor:not-allowed}.wf-radio.wf-disabled label,fieldset[disabled] .wf-radio label,.wf-checkbox.wf-disabled label,fieldset[disabled] .wf-checkbox label{cursor:not-allowed;pointer-events:none}.wf-form-control-static{padding-top:1.5rem;padding-bottom:1.5rem;margin:0;line-height:1}.wf-form-control-static.wf-input-lg,.wf-form-control-static.wf-input-sm{padding-left:0;padding-right:0}.wf-input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.wf-input-sm{height:30px;line-height:30px}textarea.wf-input-sm,select[multiple].wf-input-sm{height:auto}.wf-form-group-sm .wf-form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.wf-form-group-sm select.wf-form-control{height:30px;line-height:30px}.wf-form-group-sm textarea.wf-form-control,.wf-form-group-sm select[multiple].wf-form-control{height:auto}.wf-form-group-sm .wf-form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.wf-input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.33333;border-radius:6px}select.wf-input-lg{height:46px;line-height:46px}textarea.wf-input-lg,select[multiple].wf-input-lg{height:auto}.wf-form-group-lg .wf-form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.33333;border-radius:6px}.wf-form-group-lg select.wf-form-control{height:46px;line-height:46px}.wf-form-group-lg textarea.wf-form-control,.wf-form-group-lg select[multiple].wf-form-control{height:auto}.wf-form-group-lg .wf-form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.33333}.wf-has-feedback{position:relative}.wf-has-feedback .wf-form-control{padding-right:47.5px}.wf-form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:38px;height:38px;line-height:38px;text-align:center;pointer-events:none}.wf-input-lg+.wf-form-control-feedback,.wf-input-group-lg+.wf-form-control-feedback,.wf-form-group-lg .wf-form-control+.wf-form-control-feedback{width:46px;height:46px;line-height:46px}.wf-input-sm+.wf-form-control-feedback,.wf-input-group-sm+.wf-form-control-feedback,.wf-form-group-sm .wf-form-control+.wf-form-control-feedback{width:30px;height:30px;line-height:30px}.wf-has-success .wf-help-block,.wf-has-success .wf-control-label,.wf-has-success .wf-radio,.wf-has-success .wf-checkbox,.wf-has-success .wf-radio-inline,.wf-has-success .wf-checkbox-inline,.wf-has-success.wf-radio label,.wf-has-success.wf-checkbox label,.wf-has-success.wf-radio-inline label,.wf-has-success.wf-checkbox-inline label{color:#3c763d}.wf-has-success .wf-form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.wf-has-success .wf-form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #67b168}.wf-has-success .wf-input-group-addon{color:#3c763d;border-color:#3c763d;background-color:#dff0d8}.wf-has-success .wf-form-control-feedback{color:#3c763d}.wf-has-warning .wf-help-block,.wf-has-warning .wf-control-label,.wf-has-warning .wf-radio,.wf-has-warning .wf-checkbox,.wf-has-warning .wf-radio-inline,.wf-has-warning .wf-checkbox-inline,.wf-has-warning.wf-radio label,.wf-has-warning.wf-checkbox label,.wf-has-warning.wf-radio-inline label,.wf-has-warning.wf-checkbox-inline label{color:#8a6d3b}.wf-has-warning .wf-form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.wf-has-warning .wf-form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #c0a16b}.wf-has-warning .wf-input-group-addon{color:#8a6d3b;border-color:#8a6d3b;background-color:#fcf8e3}.wf-has-warning .wf-form-control-feedback{color:#8a6d3b}.wf-has-error .wf-help-block,.wf-has-error .wf-control-label,.wf-has-error .wf-radio,.wf-has-error .wf-checkbox,.wf-has-error .wf-radio-inline,.wf-has-error .wf-checkbox-inline,.wf-has-error.wf-radio label,.wf-has-error.wf-checkbox label,.wf-has-error.wf-radio-inline label,.wf-has-error.wf-checkbox-inline label{color:#a94442}.wf-has-error .wf-form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.wf-has-error .wf-form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #ce8483}.wf-has-error .wf-input-group-addon{color:#a94442;border-color:#a94442;background-color:#f2dede}.wf-has-error .wf-form-control-feedback{color:#a94442}.wf-has-feedback label ~ .wf-form-control-feedback{top:25px}.wf-has-feedback label.wf-sr-only ~ .wf-form-control-feedback{top:0}.wf-help-block{display:block;margin-top:5px;color:#737373}@media (min-width: 768px){.wf-form-inline .wf-form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.wf-form-inline .wf-form-control{display:inline-block;width:auto;vertical-align:middle}.wf-form-inline .wf-form-control-static{display:inline-block}.wf-form-inline .wf-input-group{display:inline-table;vertical-align:middle}.wf-form-inline .wf-input-group .wf-input-group-addon,.wf-form-inline .wf-input-group .wf-input-group-btn,.wf-form-inline .wf-input-group .wf-form-control{width:auto}.wf-form-inline .wf-input-group>.wf-form-control{width:100%}.wf-form-inline .wf-control-label{margin-bottom:0;vertical-align:middle}.wf-form-inline .wf-radio,.wf-form-inline .wf-checkbox{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.wf-form-inline .wf-radio label,.wf-form-inline .wf-checkbox label{padding-left:0}.wf-form-inline .wf-radio input[type="radio"],.wf-form-inline .wf-checkbox input[type="checkbox"]{position:relative;margin-left:0}.wf-form-inline .wf-has-feedback .wf-form-control-feedback{top:0}}.wf-form-horizontal .wf-radio,.wf-form-horizontal .wf-checkbox,.wf-form-horizontal .wf-radio-inline,.wf-form-horizontal .wf-checkbox-inline{margin-top:0;margin-bottom:0;padding-top:1.5rem}.wf-form-horizontal .wf-radio,.wf-form-horizontal .wf-checkbox{min-height:29px}.wf-form-horizontal .wf-form-group{margin-left:-15px;margin-right:-15px}.wf-form-horizontal .wf-form-group:before,.wf-form-horizontal .wf-form-group:after{content:" ";display:table}.wf-form-horizontal .wf-form-group:after{clear:both}@media (min-width: 768px){.wf-form-horizontal .wf-control-label{text-align:right;margin-bottom:0;padding-top:1.5rem}}.wf-form-horizontal .wf-has-feedback .wf-form-control-feedback{right:15px}@media (min-width: 768px){.wf-form-horizontal .wf-form-group-lg .wf-control-label{padding-top:11px;font-size:18px}}@media (min-width: 768px){.wf-form-horizontal .wf-form-group-sm .wf-control-label{padding-top:6px;font-size:12px}}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status .wf-block-labeled-value-value,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status .wf-block-labeled-value-value{padding-top:0}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status .wf-block-labeled-value-value .wf-fa,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status .wf-block-labeled-value-value .wf-fa{font-size:8rem}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status .wf-block-labeled-value-value svg,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status .wf-block-labeled-value-value svg{width:140px}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status .wf-block-labeled-value-label,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status .wf-block-labeled-value-label{font-size:1.3125rem;font-weight:300;line-height:1.5;padding-bottom:0}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-full-enabled,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-full-enabled{background-color:#00709e}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-full-enabled .wf-block-labeled-value-value,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-full-enabled .wf-block-labeled-value-value{color:#ffffff}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-full-enabled .wf-block-labeled-value-label,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-full-enabled .wf-block-labeled-value-label{color:#ffffff;padding:0}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-enabled .wf-block-labeled-value-value,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-enabled .wf-block-labeled-value-value{color:#11967a}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-enabled .wf-block-labeled-value-value svg,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-enabled .wf-block-labeled-value-value svg{fill:#11967a}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-enabled .wf-block-labeled-value-label,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-enabled .wf-block-labeled-value-label{color:#11967a}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-learning-mode .wf-block-labeled-value-value,#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-disabled .wf-block-labeled-value-value,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-learning-mode .wf-block-labeled-value-value,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-disabled .wf-block-labeled-value-value{color:#9f9fa0}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-learning-mode .wf-block-labeled-value-value svg,#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-disabled .wf-block-labeled-value-value svg,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-learning-mode .wf-block-labeled-value-value svg,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-disabled .wf-block-labeled-value-value svg{fill:#9f9fa0}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-learning-mode .wf-block-labeled-value-label,#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-disabled .wf-block-labeled-value-label,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-learning-mode .wf-block-labeled-value-label,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-disabled .wf-block-labeled-value-label{color:#9f9fa0}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status .wf-block-labeled-value-value .wf-fa,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status .wf-block-labeled-value-value .wf-fa{font-size:7rem}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status .wf-block-labeled-value-value svg,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status .wf-block-labeled-value-value svg{width:120px}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status .wf-block-labeled-value-label,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status .wf-block-labeled-value-label{font-size:1.15rem;font-weight:300}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status-premium .wf-block-labeled-value-value,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status-premium .wf-block-labeled-value-value{color:#00709e}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status-premium .wf-block-labeled-value-value svg,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status-premium .wf-block-labeled-value-value svg{fill:#00709e}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status-premium .wf-block-labeled-value-label,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status-premium .wf-block-labeled-value-label{color:#00709e}.wf-dashboard-item{position:relative;margin:0 auto 1rem;padding:0 1rem;box-sizing:border-box;background:#fff;box-shadow:0 0 0 1px rgba(200,215,225,0.5),0 1px 2px #e9eff3}.wf-dashboard-item .wf-dashboard-item-inner{min-height:44px;padding:1rem 0;width:100%;box-sizing:border-box;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between;position:relative}.wf-dashboard-item .wf-dashboard-item-inner .wf-dashboard-item-content{max-width:75%}.wf-dashboard-item .wf-dashboard-item-inner .wf-dashboard-item-content .wf-dashboard-item-title{font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:0.875rem;width:100%}.wf-dashboard-item .wf-dashboard-item-inner .wf-dashboard-item-content .wf-dashboard-item-subtitle{margin-top:.125rem;margin-bottom:.125rem;font-size:.575rem;color:#4f748e}.wf-dashboard-item .wf-dashboard-item-inner .wf-dashboard-item-action{position:absolute;top:0;right:0;height:100%;background:none;border:0;outline:0;width:48px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;vertical-align:middle;transition:transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275),color 0.2s ease-in}.wf-dashboard-item .wf-dashboard-item-inner .wf-dashboard-item-action.wf-dashboard-item-action-text{width:auto}.wf-dashboard-item .wf-dashboard-item-inner .wf-dashboard-item-action.wf-dashboard-item-action-text.wf-dashboard-item-action-text-success{color:#11967a}.wf-dashboard-item .wf-dashboard-item-inner .wf-dashboard-item-action.wf-dashboard-item-action-text.wf-dashboard-item-action-text-warning{color:#930000}.wf-dashboard-item .wf-dashboard-item-inner .wf-dashboard-item-action.wf-dashboard-item-action-text.wf-dashboard-item-action-text-warning a{color:#930000}.wf-dashboard-item .wf-dashboard-item-inner .wf-dashboard-item-action .wf-dashboard-item-action-chevron{background:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJjaGV2cm9uLW9iamVjdCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiCgkgd2lkdGg9IjI0cHgiIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAyNCAyNCIKCSB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHBhdGggaWQ9ImNoZXZyb24iIGQ9Ik0yMCA5bC04IDgtOC04IDEuNDE0LTEuNDE0TDEyIDE0LjE3Mmw2LjU4Ni02LjU4NiIvPgo8L3N2Zz4K");background-repeat:no-repeat;background-position:center center;width:24px;height:24px;fill:#87a6bc}.wf-dashboard-item .wf-dashboard-item-inner .wf-dashboard-item-action .wf-dashboard-item-action-checkbox{background-image:url(../images/checkbox.png);background-repeat:no-repeat;background-position:left center;width:29px;height:29px}.wf-dashboard-item .wf-dashboard-item-inner .wf-dashboard-item-action .wf-dashboard-item-action-checkbox.checked{background-position:right center}.wf-dashboard-item .wf-dashboard-item-extra{display:none;margin:0 -1rem;padding:0 1rem}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list{margin:0 -1rem;padding:0;list-style:none}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list.wf-dashboard-item-list-striped>li:nth-of-type(odd){background-color:#f9f9f9}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list.wf-dashboard-item-list-striped>li:nth-of-type(odd).wf-notification{border-left:4px solid #f9f9f9}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list.wf-dashboard-item-list-striped>li:nth-of-type(odd).wf-notification.wf-notification-warning{border-left:4px solid #fcb214}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list.wf-dashboard-item-list-striped>li:nth-of-type(odd).wf-notification.wf-notification-critical{border-left:4px solid #930000}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list.wf-dashboard-item-list-striped>li:nth-of-type(even){background-color:#ffffff}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list.wf-dashboard-item-list-striped>li:nth-of-type(even).wf-notification{border-left:4px solid #ffffff}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list.wf-dashboard-item-list-striped>li:nth-of-type(even).wf-notification.wf-notification-warning{border-left:4px solid #fcb214}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list.wf-dashboard-item-list-striped>li:nth-of-type(even).wf-notification.wf-notification-critical{border-left:4px solid #930000}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list>li{display:block;min-height:44px;padding:0 1rem;margin:0;border-top:1px solid #eeeeee;box-sizing:border-box;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list>li>*:first-child{-webkit-flex-grow:1;flex-grow:1;min-width:0}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list.wf-dashboard-item-list-horizontal{box-sizing:border-box;margin-top:-1px;display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-align-content:flex-start;align-content:flex-start;-webkit-justify-content:space-between;justify-content:space-between;-webkit-flex-wrap:wrap;flex-wrap:wrap}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list.wf-dashboard-item-list-horizontal>li{-webkit-flex-grow:1;flex-grow:1;-webkit-flex-basis:100%;flex-basis:100%;border-left:1px solid #eeeeee}@media (min-width: 768px){.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list.wf-dashboard-item-list-horizontal>li{-webkit-flex-basis:50%;flex-basis:50%}}@media (min-width: 992px){.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list.wf-dashboard-item-list-horizontal>li{-webkit-flex-basis:25%;flex-basis:25%}}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list.wf-dashboard-item-list-horizontal>*:first-child{border-left:0}@media (min-width: 768px){.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list.wf-dashboard-item-list-horizontal.wf-dashboard-item-list-equal>li{max-width:50%}}@media (min-width: 992px){.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list.wf-dashboard-item-list-horizontal.wf-dashboard-item-list-equal>li{max-width:25%}}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list .wf-dashboard-item-list-state{text-align:center}@media (min-width: 1200px){.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list .wf-dashboard-item-list-state{text-align:left}}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list .wf-dashboard-item-list-state-enabled .fa{color:#11967a}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list .wf-dashboard-item-list-state-disabled .fa{color:#525355}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list .wf-dashboard-item-list-state-premium{color:#9f9fa0}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list .wf-dashboard-item-list-dismiss{padding-left:2rem;font-size:1.25rem}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list .wf-dashboard-item-list-dismiss a{color:#525355}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-labeled-count{box-sizing:border-box;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between;-webkit-flex-direction:column;flex-direction:column}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-labeled-count-count{font-size:3rem;line-height:3rem;color:#9f9fa0;padding:1rem}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-labeled-count-label{font-size:0.75rem;color:#9f9fa0;padding:0 1rem 1rem 1rem}.wf-dashboard-item.active .wf-dashboard-item-extra{display:block}.wf-dashboard-item.wf-dashboard-item-left .wf-dashboard-item-content{margin-left:48px}.wf-dashboard-item.wf-dashboard-item-left .wf-dashboard-item-action{right:auto;left:0px}.wf-dashboard-item.disabled .wf-dashboard-item-content .wf-dashboard-item-title{color:#aaaaaa}.wf-dashboard-item.disabled .wf-dashboard-item-content .wf-dashboard-item-subtitle{color:#8ea6be}.wf-notifications-empty{font-size:0.9rem;color:#9f9fa0}.wf-dashboard-graph-wrapper{width:100%}.wf-dashboard-badge{display:inline-block;min-width:10px;padding:3px 7px;margin-left:0.5rem;font-size:12px;font-weight:bold;color:#fff;line-height:1;vertical-align:middle;white-space:nowrap;text-align:center;background-color:#fcb214;border-radius:10px}.wf-dashboard-badge:empty{display:none}.wf-btn .wf-dashboard-badge{position:relative;top:-1px}.wf-btn-xs .wf-dashboard-badge,.wf-btn-group-xs>.wf-btn .wf-dashboard-badge,.wf-btn-group-xs>.wf-btn .wf-dashboard-badge{top:0;padding:1px 5px}.wf-list-group-item.active>.wf-dashboard-badge,.wf-nav-pills>.active>a>.wf-dashboard-badge{color:#00709e;background-color:#fff}.wf-list-group-item>.wf-dashboard-badge{float:right}.wf-list-group-item>.wf-dashboard-badge+.wf-dashboard-badge{margin-right:5px}.wf-nav-pills>li>a>.wf-dashboard-badge{margin-left:3px}.wf-dashboard-toggle-btns{text-align:center}.wf-dashboard-toggle-btns .wf-pagination{margin:1rem 1rem 0.5rem 1rem}.wf-dashboard-show-more{position:relative;font-size:14px;color:#959595;text-align:center;line-height:1rem;background:#ffffff;width:60%;margin:20px auto 0 auto}.wf-dashboard-show-more:before{display:inline-block;content:"";position:absolute;height:1px;background:#dddddd;top:50%;width:100%;left:0;right:0}.wf-dashboard-show-more a{display:inline-block;position:relative;padding:0 10px;background-color:#ffffff}.wf-ips,.wf-recent-logins,.wf-countries{max-height:30rem;overflow-y:hidden;margin-bottom:20px}.wf-ips .wf-table,.wf-recent-logins .wf-table,.wf-countries .wf-table{margin-bottom:0}.wf-dashboard-last-updated{font-style:italic;font-size:0.6rem;text-align:center;padding-bottom:1rem;margin:0}.wf-dashboard-navigation .wf-block-navigation-option-content{padding:1rem 0 1rem 1rem}@media (min-width: 768px){.wf-dashboard-navigation .wf-block-navigation-option-content{padding:1.5rem 0 1.5rem 1rem}}.wf-dashboard-navigation .wf-block-navigation-option-content h4{margin:0 0 0.25rem 0}.wf-dashboard-navigation .wf-block-navigation-option-content p{margin:0 0 0.45rem 0}.wf-blocks-summary{width:100%;margin:1rem 0;border-spacing:0}.wf-blocks-summary>thead>tr>th,.wf-blocks-summary>tbody>tr>th,.wf-blocks-summary>tr>th{font-weight:600;padding:0.25rem 0.25rem;white-space:nowrap}@media (min-width: 768px){.wf-blocks-summary>thead>tr>th,.wf-blocks-summary>tbody>tr>th,.wf-blocks-summary>tr>th{padding:0.25rem 1rem}}.wf-blocks-summary>thead>tr>th.wf-premium,.wf-blocks-summary>tbody>tr>th.wf-premium,.wf-blocks-summary>tr>th.wf-premium{border-top:2px solid #00709e;border-left:2px solid #00709e;border-right:2px solid #00709e;border-top-left-radius:0.5rem;border-top-right-radius:0.5rem;color:#aaa}.wf-blocks-summary>thead>tr>th,.wf-blocks-summary>tr>th{text-align:center}.wf-blocks-summary>thead>tr>th:first-child,.wf-blocks-summary>tbody>tr>th{text-align:right}.wf-blocks-summary>tbody>tr>td,.wf-blocks-summary>tfoot>tr>td,.wf-blocks-summary>tr>td{text-align:center;padding:0.25rem 0.25rem}@media (min-width: 768px){.wf-blocks-summary>tbody>tr>td,.wf-blocks-summary>tfoot>tr>td,.wf-blocks-summary>tr>td{padding:0.25rem 1rem}}.wf-blocks-summary>tbody>tr>td.wf-premium,.wf-blocks-summary>tfoot>tr>td.wf-premium,.wf-blocks-summary>tr>td.wf-premium{border-left:2px solid #00709e;border-right:2px solid #00709e;color:#aaa}.wf-blocks-summary>tfoot>tr>td.wf-premium,.wf-blocks-summary>tr:last-child>td.wf-premium{border-bottom:2px solid #00709e;border-bottom-left-radius:0.5rem;border-bottom-right-radius:0.5rem;background-color:#00709e;color:#fff}#howGetIPs-trusted-proxies{display:none}ul.wf-option.wf-option-howgetips .wf-option-howgetips-details{display:-webkit-flex;display:flex;-webkit-align-items:flex-start;align-items:flex-start;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:column;flex-direction:column;font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:0.8rem;margin-top:0.5rem}table.wf-table{background-color:transparent;border-collapse:collapse;border-spacing:0}table.wf-table td,table.wf-table th{padding:0}.wf-table caption{padding-top:8px;padding-bottom:8px;color:#777;text-align:left}.wf-table th{text-align:left}.wf-table{width:100%;max-width:100%;margin-bottom:20px}.wf-table>thead>tr>th,.wf-table>thead>tr>td,.wf-table>tbody>tr>th,.wf-table>tbody>tr>td,.wf-table>tfoot>tr>th,.wf-table>tfoot>tr>td{padding:8px;line-height:1.42857;vertical-align:top;border-top:1px solid #ddd}.wf-table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.wf-table>caption+thead>tr:first-child>th,.wf-table>caption+thead>tr:first-child>td,.wf-table>colgroup+thead>tr:first-child>th,.wf-table>colgroup+thead>tr:first-child>td,.wf-table>thead:first-child>tr:first-child>th,.wf-table>thead:first-child>tr:first-child>td{border-top:0}.wf-table>tbody+tbody{border-top:2px solid #ddd}.wf-table .wf-table{background-color:#fff}.wf-table-condensed>thead>tr>th,.wf-table-condensed>thead>tr>td,.wf-table-condensed>tbody>tr>th,.wf-table-condensed>tbody>tr>td,.wf-table-condensed>tfoot>tr>th,.wf-table-condensed>tfoot>tr>td{padding:5px}.wf-table-bordered{border:1px solid #ddd}.wf-table-bordered>thead>tr>th,.wf-table-bordered>thead>tr>td,.wf-table-bordered>tbody>tr>th,.wf-table-bordered>tbody>tr>td,.wf-table-bordered>tfoot>tr>th,.wf-table-bordered>tfoot>tr>td{border:1px solid #ddd}.wf-table-bordered>thead>tr>th,.wf-table-bordered>thead>tr>td{border-bottom-width:2px}.wf-table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.wf-table-hover>tbody>tr:hover{background-color:#f5f5f5}table.wf-table col[class*="col-"]{position:static;float:none;display:table-column}table.wf-table td[class*="col-"],table.wf-table th[class*="col-"]{position:static;float:none;display:table-cell}.wf-table>thead>tr>td.active,.wf-table>thead>tr>th.active,.wf-table>thead>tr.active>td,.wf-table>thead>tr.active>th,.wf-table>tbody>tr>td.active,.wf-table>tbody>tr>th.active,.wf-table>tbody>tr.active>td,.wf-table>tbody>tr.active>th,.wf-table>tfoot>tr>td.active,.wf-table>tfoot>tr>th.active,.wf-table>tfoot>tr.active>td,.wf-table>tfoot>tr.active>th{background-color:#f5f5f5}.wf-table-hover>tbody>tr>td.active:hover,.wf-table-hover>tbody>tr>th.active:hover,.wf-table-hover>tbody>tr.active:hover>td,.wf-table-hover>tbody>tr:hover>.active,.wf-table-hover>tbody>tr.active:hover>th{background-color:#e8e8e8}.wf-table>thead>tr>td.success,.wf-table>thead>tr>th.success,.wf-table>thead>tr.success>td,.wf-table>thead>tr.success>th,.wf-table>tbody>tr>td.success,.wf-table>tbody>tr>th.success,.wf-table>tbody>tr.success>td,.wf-table>tbody>tr.success>th,.wf-table>tfoot>tr>td.success,.wf-table>tfoot>tr>th.success,.wf-table>tfoot>tr.success>td,.wf-table>tfoot>tr.success>th{background-color:#dff0d8}.wf-table-hover>tbody>tr>td.success:hover,.wf-table-hover>tbody>tr>th.success:hover,.wf-table-hover>tbody>tr.success:hover>td,.wf-table-hover>tbody>tr:hover>.success,.wf-table-hover>tbody>tr.success:hover>th{background-color:#d0e9c6}.wf-table>thead>tr>td.info,.wf-table>thead>tr>th.info,.wf-table>thead>tr.info>td,.wf-table>thead>tr.info>th,.wf-table>tbody>tr>td.info,.wf-table>tbody>tr>th.info,.wf-table>tbody>tr.info>td,.wf-table>tbody>tr.info>th,.wf-table>tfoot>tr>td.info,.wf-table>tfoot>tr>th.info,.wf-table>tfoot>tr.info>td,.wf-table>tfoot>tr.info>th{background-color:#d9edf7}.wf-table-hover>tbody>tr>td.info:hover,.wf-table-hover>tbody>tr>th.info:hover,.wf-table-hover>tbody>tr.info:hover>td,.wf-table-hover>tbody>tr:hover>.info,.wf-table-hover>tbody>tr.info:hover>th{background-color:#c4e3f3}.wf-table>thead>tr>td.warning,.wf-table>thead>tr>th.warning,.wf-table>thead>tr.warning>td,.wf-table>thead>tr.warning>th,.wf-table>tbody>tr>td.warning,.wf-table>tbody>tr>th.warning,.wf-table>tbody>tr.warning>td,.wf-table>tbody>tr.warning>th,.wf-table>tfoot>tr>td.warning,.wf-table>tfoot>tr>th.warning,.wf-table>tfoot>tr.warning>td,.wf-table>tfoot>tr.warning>th{background-color:#fcf8e3}.wf-table-hover>tbody>tr>td.warning:hover,.wf-table-hover>tbody>tr>th.warning:hover,.wf-table-hover>tbody>tr.warning:hover>td,.wf-table-hover>tbody>tr:hover>.warning,.wf-table-hover>tbody>tr.warning:hover>th{background-color:#faf2cc}.wf-table>thead>tr>td.danger,.wf-table>thead>tr>th.danger,.wf-table>thead>tr.danger>td,.wf-table>thead>tr.danger>th,.wf-table>tbody>tr>td.danger,.wf-table>tbody>tr>th.danger,.wf-table>tbody>tr.danger>td,.wf-table>tbody>tr.danger>th,.wf-table>tfoot>tr>td.danger,.wf-table>tfoot>tr>th.danger,.wf-table>tfoot>tr.danger>td,.wf-table>tfoot>tr.danger>th{background-color:#f2dede}.wf-table-hover>tbody>tr>td.danger:hover,.wf-table-hover>tbody>tr>th.danger:hover,.wf-table-hover>tbody>tr.danger:hover>td,.wf-table-hover>tbody>tr:hover>.danger,.wf-table-hover>tbody>tr.danger:hover>th{background-color:#ebcccc}.wf-table-responsive{overflow-x:auto;min-height:0.01%}@media screen and (max-width: 767px){.wf-table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.wf-table-responsive>.wf-table{margin-bottom:0}.wf-table-responsive>.wf-table>thead>tr>th,.wf-table-responsive>.wf-table>thead>tr>td,.wf-table-responsive>.wf-table>tbody>tr>th,.wf-table-responsive>.wf-table>tbody>tr>td,.wf-table-responsive>.wf-table>tfoot>tr>th,.wf-table-responsive>.wf-table>tfoot>tr>td{white-space:nowrap}.wf-table-responsive>.wf-table-bordered{border:0}.wf-table-responsive>.wf-table-bordered>thead>tr>th:first-child,.wf-table-responsive>.wf-table-bordered>thead>tr>td:first-child,.wf-table-responsive>.wf-table-bordered>tbody>tr>th:first-child,.wf-table-responsive>.wf-table-bordered>tbody>tr>td:first-child,.wf-table-responsive>.wf-table-bordered>tfoot>tr>th:first-child,.wf-table-responsive>.wf-table-bordered>tfoot>tr>td:first-child{border-left:0}.wf-table-responsive>.wf-table-bordered>thead>tr>th:last-child,.wf-table-responsive>.wf-table-bordered>thead>tr>td:last-child,.wf-table-responsive>.wf-table-bordered>tbody>tr>th:last-child,.wf-table-responsive>.wf-table-bordered>tbody>tr>td:last-child,.wf-table-responsive>.wf-table-bordered>tfoot>tr>th:last-child,.wf-table-responsive>.wf-table-bordered>tfoot>tr>td:last-child{border-right:0}.wf-table-responsive>.wf-table-bordered>tbody>tr:last-child>th,.wf-table-responsive>.wf-table-bordered>tbody>tr:last-child>td,.wf-table-responsive>.wf-table-bordered>tfoot>tr:last-child>th,.wf-table-responsive>.wf-table-bordered>tfoot>tr:last-child>td{border-bottom:0}}.wf-sortable{position:relative;padding-right:2rem !important}.wf-sortable .wf-sorted-ascending,.wf-sortable .wf-sorted-descending{display:none;position:absolute;right:1rem;top:50%;transform:translateY(-50%)}.wf-sortable.wf-unsorted:hover .wf-sorted-ascending{display:block}.wf-sortable.wf-unsorted,.wf-sortable.wf-sorted-ascending,.wf-sortable.wf-sorted-descending{cursor:pointer}.wf-sortable.wf-unsorted:hover,.wf-sortable.wf-sorted-ascending:hover,.wf-sortable.wf-sorted-descending:hover{background-color:#e0e0e0}.wf-sortable.wf-sorted-ascending,.wf-sortable.wf-sorted-descending{background-color:#e0e0e0}.wf-sortable.wf-sorted-ascending .wf-sorted-ascending{display:block}.wf-sortable.wf-sorted-descending .wf-sorted-descending{display:block}.wf-nav{margin-bottom:0;padding-left:0;list-style:none}.wf-nav:before,.wf-nav:after{content:" ";display:table}.wf-nav:after{clear:both}.wf-nav>li{position:relative;display:block}.wf-nav>li>a{position:relative;display:block;padding:8px 12px}.wf-nav>li>a:hover,.wf-nav>li>a:focus{text-decoration:none;background-color:#e2e2e2}.wf-nav>li.wf-disabled>a{color:#777}.wf-nav>li.wf-disabled>a:hover,.wf-nav>li.wf-disabled>a:focus{color:#777;text-decoration:none;background-color:transparent;cursor:not-allowed}.wf-nav .wf-open>a,.wf-nav .wf-open>a:hover,.wf-nav .wf-open>a:focus{background-color:#e2e2e2;border-color:#00709e}.wf-nav>li>a>img{max-width:none}.wf-nav-tabs{border-bottom:1px solid #d0d0d0}.wf-nav-tabs>li{float:left;margin-bottom:-1px}.wf-nav-tabs>li>a{margin-right:2px;line-height:1.42857;border:1px solid transparent;border-radius:4px 4px 0 0}.wf-nav-tabs>li>a:hover{border-color:#e2e2e2 #e2e2e2 #d0d0d0}.wf-nav-tabs>li.wf-active>a,.wf-nav-tabs>li.wf-active>a:hover,.wf-nav-tabs>li.wf-active>a:focus{color:#555;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default}.wf-nav-pills>li{float:left}.wf-nav-pills>li>a{border-radius:4px;text-decoration:none;position:relative;display:block;padding:8px 12px}.wf-nav-pills>li>a:hover,.wf-nav-pills>li>a:focus{text-decoration:none !important;background-color:#e2e2e2}.wf-nav-pills>li+li{margin-left:2px}.wf-nav-pills>li.wf-active>a,.wf-nav-pills>li.wf-active>a:hover,.wf-nav-pills>li.wf-active>a:focus{color:#fff;background-color:#00709e}.wf-nav-pills.wf-nav-pills-bordered>li>a{border:1px solid #e2e2e2}.wf-nav-pills.wf-nav-pills-connected>li>a{border-radius:0;border-right-width:0px}.wf-nav-pills.wf-nav-pills-connected>li+li{margin-left:0}.wf-nav-pills.wf-nav-pills-connected>li.active+li>a{border-left-width:0px}.wf-nav-pills.wf-nav-pills-connected>li:first-of-type>a{-moz-border-radius:4px 0 0 4px;-webkit-border-radius:4px;border-radius:4px 0 0 4px}.wf-nav-pills.wf-nav-pills-connected>li:last-of-type>a{-moz-border-radius:0 4px 4px 0;-webkit-border-radius:0;border-radius:0 4px 4px 0;border-right-width:1px}.wf-nav-stacked>li{float:none}.wf-nav-stacked>li+li{margin-top:2px;margin-left:0}.wf-nav-justified,.wf-nav-tabs.wf-nav-justified{width:100%}.wf-nav-justified>li,.wf-nav-tabs.wf-nav-justified>li{float:none}.wf-nav-justified>li>a,.wf-nav-tabs.wf-nav-justified>li>a{text-align:center;margin-bottom:5px}.wf-nav-justified>.wf-dropdown .wf-dropdown-menu{top:auto;left:auto}@media (min-width: 768px){.wf-nav-justified>li,.wf-nav-tabs.wf-nav-justified>li{display:table-cell;width:1%}.wf-nav-justified>li>a,.wf-nav-tabs.wf-nav-justified>li>a{margin-bottom:0}}.wf-nav-tabs-justified,.wf-nav-tabs.wf-nav-justified{border-bottom:0}.wf-nav-tabs-justified>li>a,.wf-nav-tabs.wf-nav-justified>li>a{margin-right:0;border-radius:4px}.wf-nav-tabs-justified>.wf-active>a,.wf-nav-tabs.wf-nav-justified>.wf-active>a,.wf-nav-tabs-justified>.wf-active>a:hover,.wf-nav-tabs.wf-nav-justified>.wf-active>a:hover,.wf-nav-tabs-justified>.wf-active>a:focus,.wf-nav-tabs.wf-nav-justified>.wf-active>a:focus{border:1px solid #ddd}@media (min-width: 768px){.wf-nav-tabs-justified>li>a,.wf-nav-tabs.wf-nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.wf-nav-tabs-justified>.wf-active>a,.wf-nav-tabs.wf-nav-justified>.wf-active>a,.wf-nav-tabs-justified>.wf-active>a:hover,.wf-nav-tabs.wf-nav-justified>.wf-active>a:hover,.wf-nav-tabs-justified>.wf-active>a:focus,.wf-nav-tabs.wf-nav-justified>.wf-active>a:focus{border-bottom-color:#fff}}.wf-tab-content>.wf-tab-pane{display:none}.wf-tab-content>.wf-active{display:block}.wf-nav-tabs .wf-dropdown-menu{margin-top:-1px;-moz-border-radius-topleft:0;-webkit-border-top-left-radius:0;border-top-left-radius:0;-moz-border-radius-topright:0;-webkit-border-top-right-radius:0;border-top-right-radius:0}.wf-navbar-brand{float:left;padding:12px 8px;font-size:18px;line-height:20px;margin:10px 0 0 0}.wf-navbar-brand:hover,.wf-navbar-brand:focus{text-decoration:none}.wf-navbar-brand>img{display:block}@media (min-width: 768px){.navbar>.container .wf-navbar-brand,.navbar>.container-fluid .wf-navbar-brand{margin-left:-8px}}.wf-caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid \9;border-right:4px solid transparent;border-left:4px solid transparent}.wf-dropup,.wf-dropdown{position:relative}.wf-dropdown-toggle:focus{outline:0}.wf-dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;font-size:14px;text-align:left;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,0.175);box-shadow:0 6px 12px rgba(0,0,0,0.175);background-clip:padding-box}.wf-dropdown-menu .wf-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.wf-dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:normal;line-height:1.42857;color:#333;text-decoration:none;white-space:nowrap}.wf-dropdown-menu>li>a:hover,.wf-dropdown-menu>li>a:focus{text-decoration:none;color:#262626;background-color:#f5f5f5}.wf-dropdown-menu>.wf-active>a,.wf-dropdown-menu>.wf-active>a:hover,.wf-dropdown-menu>.wf-active>a:focus{color:#fff;text-decoration:none;outline:0;background-color:#00709e}.wf-dropdown-menu>.wf-disabled>a,.wf-dropdown-menu>.wf-disabled>a:hover,.wf-dropdown-menu>.wf-disabled>a:focus{color:#777}.wf-dropdown-menu>.wf-disabled>a:hover,.wf-dropdown-menu>.wf-disabled>a:focus{text-decoration:none;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);cursor:not-allowed}.wf-open>.wf-dropdown-menu{display:block}.wf-open>a{outline:0}.wf-dropdown-menu-right{left:auto;right:0}.wf-dropdown-menu-left{left:0;right:auto}.wf-dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857;color:#777;white-space:nowrap}.wf-dropdown-backdrop{position:fixed;left:0;right:0;bottom:0;top:0;z-index:990}.wf-pull-right>.wf-dropdown-menu{right:0;left:auto}.wf-dropup .wf-caret,.wf-navbar-fixed-bottom .wf-dropdown .wf-caret{border-top:0;border-bottom:4px dashed;border-bottom:4px solid \9;content:""}.wf-dropup .wf-dropdown-menu,.wf-navbar-fixed-bottom .wf-dropdown .wf-dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width: 768px){.wf-navbar-right .wf-dropdown-menu{right:0;left:auto}.wf-navbar-right .wf-dropdown-menu-left{left:0;right:auto}}.wf-mobile-dropdown{border:1px solid #ccc;margin-left:.5em;padding:5px 10px;font-size:14px;line-height:24px;margin:10px 10px 0 0;background:#f1f1f1;color:#000;font-weight:600;text-decoration:none}.wf-blocks-table tbody tr.wf-editing,.wf-blocks-table tbody tr.wf-editing td{background-color:#fffbd8}.wf-blocked-countries-section{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-align-content:stretch;align-content:stretch;-webkit-flex-wrap:nowrap;flex-wrap:nowrap}.wf-blocked-countries-section-title{font-size:1.1rem;padding-right:0.5rem}.wf-blocked-countries-section-spacer{-webkit-flex-basis:30px;flex-basis:30px;height:1px;background:#aaa}.wf-blocked-countries-section-options{margin-bottom:0;margin-top:0;padding-left:0.5rem;list-style:none;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-align-content:stretch;align-content:stretch;-webkit-flex-wrap:nowrap;flex-wrap:nowrap}.wf-blocked-countries-section-options li{padding:0;margin:0;color:#777}.wf-blocked-countries-section-options li a{padding:2px 4px;text-decoration:none;color:#777}.wf-blocked-countries-section-options li a.active-section{background-color:#777;color:#e2e2e2}.wf-option-bypass-redirect .wf-option-title,.wf-option-bypass-cookie .wf-option-title{-webkit-align-self:flex-start;align-self:flex-start}.wf-option-bypass-redirect *,.wf-option-bypass-cookie *{-webkit-flex-grow:1;flex-grow:1}.wf-option-bypass-redirect *:first-child,.wf-option-bypass-cookie *:first-child{-webkit-flex-grow:0;flex-grow:0}.wf-country-block-map{width:300px}@media (min-width: 768px){.wf-country-block-map{width:500px}}@media (min-width: 992px){.wf-country-block-map{width:700px}}@media (min-width: 1200px){.wf-country-block-map{width:700px}}#wf-create-block{width:100%}#wf-create-block th{white-space:nowrap}#wf-create-block td{width:100%}#wf-create-block td.wf-block-type{width:auto}@media (min-width: 768px){#wf-create-block{width:500px}}@media (min-width: 992px){#wf-create-block{width:700px}}@media (min-width: 1200px){#wf-create-block{width:700px}}#wf-create-block .wf-block-add-country select{width:240px}@media (min-width: 768px){#wf-create-block .wf-block-add-country select{width:280px}}@media (min-width: 992px){#wf-create-block .wf-block-add-country select{width:320px}}#wf-create-block .wf-block-add-country .wfselect2-container--default,#wf-create-block .wf-block-add-country .wfselect2-container--default .wfselect2-selection--multiple{border-color:#e2e2e2}#wf-create-block .wf-block-add-country .wfselect2-container--default .wfselect2-selection__choice,#wf-create-block .wf-block-add-country .wfselect2-container--default .wfselect2-selection--multiple .wfselect2-selection__choice{background-color:#ffffff;border-color:#e2e2e2;padding:0.5rem}#wf-create-block .wf-block-add-country .wfselect2-container--default .wfselect2-search__field,#wf-create-block .wf-block-add-country .wfselect2-container--default .wfselect2-selection--multiple .wfselect2-search__field{margin-right:5px;margin-top:5px;padding:0.5rem 0}#wfcolorbox .wf-country-selector-controls,.wf-drawer .wf-country-selector-controls{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between;-webkit-align-content:stretch;align-content:stretch;-webkit-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-flex-shrink:0;flex-shrink:0}#wfcolorbox .wf-country-selector-controls .wf-country-selector-section-options,.wf-drawer .wf-country-selector-controls .wf-country-selector-section-options{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between;-webkit-align-content:stretch;align-content:stretch;-webkit-flex-wrap:nowrap;flex-wrap:nowrap}#wfcolorbox .wf-country-selector-controls .wf-country-selector-section-options>li,.wf-drawer .wf-country-selector-controls .wf-country-selector-section-options>li{border:1px solid #ffffff;border-radius:4px;padding:0.25rem;background-color:#ffffff}#wfcolorbox .wf-country-selector-controls .wf-country-selector-section-options>li:hover,#wfcolorbox .wf-country-selector-controls .wf-country-selector-section-options>li:focus,.wf-drawer .wf-country-selector-controls .wf-country-selector-section-options>li:hover,.wf-drawer .wf-country-selector-controls .wf-country-selector-section-options>li:focus{background-color:#00709e;border-color:#00709e}#wfcolorbox .wf-country-selector-controls .wf-country-selector-section-options>li:hover>a,#wfcolorbox .wf-country-selector-controls .wf-country-selector-section-options>li:focus>a,.wf-drawer .wf-country-selector-controls .wf-country-selector-section-options>li:hover>a,.wf-drawer .wf-country-selector-controls .wf-country-selector-section-options>li:focus>a{color:#ffffff}#wfcolorbox .wf-country-selector-controls .wf-country-selector-section-options>li>a,.wf-drawer .wf-country-selector-controls .wf-country-selector-section-options>li>a{text-decoration:none;color:#525355}#wfcolorbox .wf-country-selector-options .wf-blocked-countries,.wf-drawer .wf-country-selector-options .wf-blocked-countries{margin-bottom:0;margin-top:1rem;list-style:none;margin-left:-6px;display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-align-content:stretch;align-content:stretch;-webkit-flex-wrap:wrap;flex-wrap:wrap}#wfcolorbox .wf-country-selector-options .wf-blocked-countries>li,.wf-drawer .wf-country-selector-options .wf-blocked-countries>li{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;margin:0px 0px 2px 6px;text-align:center;border:1px solid #e2e2e2;border-radius:4px;padding:8px 12px;background-color:#ffffff;-webkit-flex-basis:38%;flex-basis:38%}@media (min-width: 768px){#wfcolorbox .wf-country-selector-options .wf-blocked-countries>li,.wf-drawer .wf-country-selector-options .wf-blocked-countries>li{-webkit-flex-basis:20%;flex-basis:20%}}@media (min-width: 992px){#wfcolorbox .wf-country-selector-options .wf-blocked-countries>li,.wf-drawer .wf-country-selector-options .wf-blocked-countries>li{-webkit-flex-basis:15%;flex-basis:15%}}@media (min-width: 1200px){#wfcolorbox .wf-country-selector-options .wf-blocked-countries>li,.wf-drawer .wf-country-selector-options .wf-blocked-countries>li{-webkit-flex-basis:10%;flex-basis:10%}}#wfcolorbox .wf-country-selector-options .wf-blocked-countries>li:hover,#wfcolorbox .wf-country-selector-options .wf-blocked-countries>li:focus,.wf-drawer .wf-country-selector-options .wf-blocked-countries>li:hover,.wf-drawer .wf-country-selector-options .wf-blocked-countries>li:focus{text-decoration:none;background-color:#e2e2e2}#wfcolorbox .wf-country-selector-options .wf-blocked-countries>li.disabled>a,.wf-drawer .wf-country-selector-options .wf-blocked-countries>li.disabled>a{color:#777}#wfcolorbox .wf-country-selector-options .wf-blocked-countries>li.disabled>a:hover,#wfcolorbox .wf-country-selector-options .wf-blocked-countries>li.disabled>a:focus,.wf-drawer .wf-country-selector-options .wf-blocked-countries>li.disabled>a:hover,.wf-drawer .wf-country-selector-options .wf-blocked-countries>li.disabled>a:focus{color:#777;text-decoration:none;background-color:transparent;cursor:not-allowed}#wfcolorbox .wf-country-selector-options .wf-blocked-countries>li>a,.wf-drawer .wf-country-selector-options .wf-blocked-countries>li>a{text-decoration:none;position:relative;display:block}#wfcolorbox .wf-country-selector-options .wf-blocked-countries>li.wf-active,#wfcolorbox .wf-country-selector-options .wf-blocked-countries>li.wf-active:hover,#wfcolorbox .wf-country-selector-options .wf-blocked-countries>li.wf-active:focus,.wf-drawer .wf-country-selector-options .wf-blocked-countries>li.wf-active,.wf-drawer .wf-country-selector-options .wf-blocked-countries>li.wf-active:hover,.wf-drawer .wf-country-selector-options .wf-blocked-countries>li.wf-active:focus{background-color:#00709e;border-color:#00709e}#wfcolorbox .wf-country-selector-options .wf-blocked-countries>li.wf-active>a,#wfcolorbox .wf-country-selector-options .wf-blocked-countries>li.wf-active:hover>a,#wfcolorbox .wf-country-selector-options .wf-blocked-countries>li.wf-active:focus>a,.wf-drawer .wf-country-selector-options .wf-blocked-countries>li.wf-active>a,.wf-drawer .wf-country-selector-options .wf-blocked-countries>li.wf-active:hover>a,.wf-drawer .wf-country-selector-options .wf-blocked-countries>li.wf-active:focus>a{color:#fff}#wfcolorbox .wf-country-selector-options .wf-blocked-countries>li.text-only,.wf-drawer .wf-country-selector-options .wf-blocked-countries>li.text-only{position:relative;display:block;padding:8px 12px}#wfcolorbox .wf-country-selector-options .wf-blocked-countries>li>a>img,.wf-drawer .wf-country-selector-options .wf-blocked-countries>li>a>img{max-width:none}.wf-tag-selected{background-color:#ffffff;border:1px solid #e2e2e2;border-radius:4px;cursor:default;float:left;margin-right:5px !important;margin-top:5px !important;list-style:none;padding:0.5rem !important}.wf-destroy-tag-selected{color:#999;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.wf-destroy-tag-selected:hover{text-decoration:none}.wf-tags-show-hide-more{float:left;margin-right:5px;margin-top:5px;list-style:none;padding:0.5rem}.wf-select2-hide-tags .wfselect2-selection__choice{display:none}.wf-country-selector-outer-wrapper{position:relative;-webkit-flex-grow:1;flex-grow:1}.wf-country-selector-outer-wrapper .wf-country-selector-inner-wrapper{position:absolute;top:0px;right:0px;bottom:0px;left:0px;overflow-x:hidden;overflow-y:auto}table.wf-dataTable{width:auto;max-width:800px;clear:both;border-collapse:collapse;border-spacing:0}table.wf-dataTable>thead th,table.wf-dataTable>tfoot th{font-weight:bold}table.wf-dataTable>thead th,table.wf-dataTable>thead td{cursor:pointer;text-align:left;font-size:11px;border:1px solid #ccc;padding:8px 4px 5px 9px;text-transform:uppercase}table.wf-dataTable>thead th:active,table.wf-dataTable>thead td:active{outline:none}table.wf-dataTable>tfoot th,table.wf-dataTable>tfoot td{padding:10px 18px 6px 18px;border-top:1px solid #111}table.wf-dataTable>thead .sorting,table.wf-dataTable>thead .sorting_asc,table.wf-dataTable>thead .sorting_desc{cursor:pointer;*cursor:hand}table.wf-dataTable>thead .sorting,table.wf-dataTable>thead .sorting_asc,table.wf-dataTable>thead .sorting_desc,table.wf-dataTable>thead .sorting_asc_disabled,table.wf-dataTable>thead .sorting_desc_disabled{background-repeat:no-repeat;background-position:center right}table.wf-dataTable>thead .sorting{background-image:url(../images/sort_both.png)}table.wf-dataTable>thead .sorting_asc{background-image:url(../images/sort_asc.png)}table.wf-dataTable>thead .sorting_desc{background-image:url(../images/sort_desc.png)}table.wf-dataTable>thead .sorting_asc_disabled{background-image:url(../images/sort_asc_disabled.png)}table.wf-dataTable>thead .sorting_desc_disabled{background-image:url(../images/sort_desc_disabled.png)}table.wf-dataTable>tbody>tr{background-color:#ffffff}table.wf-dataTable>tbody>tr.selected{background-color:#B0BED9}table.wf-dataTable>tbody>tr>th,table.wf-dataTable>tbody>tr>td{padding:5px 8px}table.wf-dataTable.row-border>tbody>tr>th,table.wf-dataTable.row-border>tbody>tr>td,table.wf-dataTable.display>tbody>tr>th,table.wf-dataTable.display>tbody>tr>td{border:1px solid #cccccc}table.wf-dataTable.row-border>tbody>tr:first-child>th,table.wf-dataTable.row-border>tbody>tr:first-child>td,table.wf-dataTable.display>tbody>tr:first-child>th,table.wf-dataTable.display>tbody>tr:first-child>td{border-top:none}table.wf-dataTable.cell-border>tbody>tr>th,table.wf-dataTable.cell-border>tbody>tr>td{border-top:1px solid #ddd;border-right:1px solid #ddd}table.wf-dataTable.cell-border>tbody>tr>th:first-child,table.wf-dataTable.cell-border>tbody>tr>td:first-child{border-left:1px solid #ddd}table.wf-dataTable.cell-border>tbody>tr:first-child>th,table.wf-dataTable.cell-border>tbody>tr:first-child>td{border-top:none}table.wf-dataTable.stripe>tbody>tr.odd,table.wf-dataTable.display>tbody>tr.odd{background-color:#f9f9f9}table.wf-dataTable.stripe>tbody>tr.odd.selected,table.wf-dataTable.display>tbody>tr.odd.selected{background-color:#acbad4}table.wf-dataTable.hover>tbody>tr:hover,table.wf-dataTable.display>tbody>tr:hover{background-color:#f6f6f6}table.wf-dataTable.hover>tbody>tr:hover.selected,table.wf-dataTable.display>tbody>tr:hover.selected{background-color:#aab7d1}table.wf-dataTable.order-column>tbody>tr>.sorting_1,table.wf-dataTable.order-column>tbody>tr>.sorting_2,table.wf-dataTable.order-column>tbody>tr>.sorting_3,table.wf-dataTable.display tbody>tr>.sorting_1,table.wf-dataTable.display>tbody>tr>.sorting_2,table.wf-dataTable.display>tbody>tr>.sorting_3{background-color:#fafafa}table.wf-dataTable.order-column>tbody>tr.selected>.sorting_1,table.wf-dataTable.order-column>tbody>tr.selected>.sorting_2,table.wf-dataTable.order-column>tbody>tr.selected>.sorting_3,table.wf-dataTable.display>tbody>tr.selected>.sorting_1,table.wf-dataTable.display>tbody>tr.selected>.sorting_2,table.wf-dataTable.display>tbody>tr.selected>.sorting_3{background-color:#acbad5}table.wf-dataTable.display>tbody>tr.odd>.sorting_1,table.wf-dataTable.order-column.stripe>tbody>tr.odd>.sorting_1{background-color:#f1f1f1}table.wf-dataTable.display>tbody>tr.odd>.sorting_2,table.wf-dataTable.order-column.stripe>tbody>tr.odd>.sorting_2{background-color:#f3f3f3}table.wf-dataTable.display>tbody>tr.odd>.sorting_3,table.wf-dataTable.order-column.stripe>tbody>tr.odd>.sorting_3{background-color:whitesmoke}table.wf-dataTable.display>tbody>tr.odd.selected>.sorting_1,table.wf-dataTable.order-column.stripe>tbody>tr.odd.selected>.sorting_1{background-color:#a6b4cd}table.wf-dataTable.display>tbody>tr.odd.selected>.sorting_2,table.wf-dataTable.order-column.stripe>tbody>tr.odd.selected>.sorting_2{background-color:#a8b5cf}table.wf-dataTable.display>tbody>tr.odd.selected>.sorting_3,table.wf-dataTable.order-column.stripe>tbody>tr.odd.selected>.sorting_3{background-color:#a9b7d1}table.wf-dataTable.display>tbody>tr.even>.sorting_1,table.wf-dataTable.order-column.stripe>tbody>tr.even>.sorting_1{background-color:#fafafa}table.wf-dataTable.display>tbody>tr.even>.sorting_2,table.wf-dataTable.order-column.stripe>tbody>tr.even>.sorting_2{background-color:#fcfcfc}table.wf-dataTable.display>tbody>tr.even>.sorting_3,table.wf-dataTable.order-column.stripe>tbody>tr.even>.sorting_3{background-color:#fefefe}table.wf-dataTable.display>tbody>tr.even.selected>.sorting_1,table.wf-dataTable.order-column.stripe>tbody>tr.even.selected>.sorting_1{background-color:#acbad5}table.wf-dataTable.display>tbody>tr.even.selected>.sorting_2,table.wf-dataTable.order-column.stripe>tbody>tr.even.selected>.sorting_2{background-color:#aebcd6}table.wf-dataTable.display>tbody>tr.even.selected>.sorting_3,table.wf-dataTable.order-column.stripe>tbody>tr.even.selected>.sorting_3{background-color:#afbdd8}table.wf-dataTable.display>tbody>tr:hover>.sorting_1,table.wf-dataTable.order-column.hover>tbody>tr:hover>.sorting_1{background-color:#eaeaea}table.wf-dataTable.display>tbody>tr:hover>.sorting_2,table.wf-dataTable.order-column.hover>tbody>tr:hover>.sorting_2{background-color:#ececec}table.wf-dataTable.display>tbody>tr:hover>.sorting_3,table.wf-dataTable.order-column.hover>tbody>tr:hover>.sorting_3{background-color:#efefef}table.wf-dataTable.display>tbody>tr:hover.selected>.sorting_1,table.wf-dataTable.order-column.hover>tbody>tr:hover.selected>.sorting_1{background-color:#a2aec7}table.wf-dataTable.display>tbody>tr:hover.selected>.sorting_2,table.wf-dataTable.order-column.hover>tbody>tr:hover.selected>.sorting_2{background-color:#a3b0c9}table.wf-dataTable.display>tbody>tr:hover.selected>.sorting_3,table.wf-dataTable.order-column.hover>tbody>tr:hover.selected>.sorting_3{background-color:#a5b2cb}table.wf-dataTable.no-footer{border-bottom:1px solid #111}table.wf-dataTable.nowrap th,table.wf-dataTable.nowrap td{white-space:nowrap}table.wf-dataTable.compact thead th,table.wf-dataTable.compact thead td{padding:4px 17px 4px 4px}table.wf-dataTable.compact tfoot th,table.wf-dataTable.compact tfoot td{padding:4px}table.wf-dataTable.compact>tbody>tr>th,table.wf-dataTable.compact>tbody>tr>td{padding:4px}table.wf-dataTable th.dt-left,table.wf-dataTable td.dt-left{text-align:left}table.wf-dataTable th.dt-center,table.wf-dataTable td.dt-center,table.wf-dataTable td.dataTables_empty{text-align:center}table.wf-dataTable th.dt-right,table.wf-dataTable td.dt-right{text-align:right}table.wf-dataTable th.dt-justify,table.wf-dataTable td.dt-justify{text-align:justify}table.wf-dataTable th.dt-nowrap,table.wf-dataTable td.dt-nowrap{white-space:nowrap}table.wf-dataTable thead th.dt-head-left,table.wf-dataTable thead td.dt-head-left,table.wf-dataTable tfoot th.dt-head-left,table.wf-dataTable tfoot td.dt-head-left{text-align:left}table.wf-dataTable thead th.dt-head-center,table.wf-dataTable thead td.dt-head-center,table.wf-dataTable tfoot th.dt-head-center,table.wf-dataTable tfoot td.dt-head-center{text-align:center}table.wf-dataTable thead th.dt-head-right,table.wf-dataTable thead td.dt-head-right,table.wf-dataTable tfoot th.dt-head-right,table.wf-dataTable tfoot td.dt-head-right{text-align:right}table.wf-dataTable thead th.dt-head-justify,table.wf-dataTable thead td.dt-head-justify,table.wf-dataTable tfoot th.dt-head-justify,table.wf-dataTable tfoot td.dt-head-justify{text-align:justify}table.wf-dataTable thead th.dt-head-nowrap,table.wf-dataTable thead td.dt-head-nowrap,table.wf-dataTable tfoot th.dt-head-nowrap,table.wf-dataTable tfoot td.dt-head-nowrap{white-space:nowrap}table.wf-dataTable>tbody>tr>th.dt-body-left,table.wf-dataTable>tbody>tr>td.dt-body-left{text-align:left}table.wf-dataTable>tbody>tr>th.dt-body-center,table.wf-dataTable>tbody>tr>td.dt-body-center{text-align:center}table.wf-dataTable>tbody>tr>th.dt-body-right,table.wf-dataTable>tbody>tr>td.dt-body-right{text-align:right}table.wf-dataTable>tbody>tr>th.dt-body-justify,table.wf-dataTable>tbody>tr>td.dt-body-justify{text-align:justify}table.wf-dataTable>tbody>tr>th.dt-body-nowrap,table.wf-dataTable>tbody>tr>td.dt-body-nowrap{white-space:nowrap}table.wf-dataTable table.dataTable,table.wf-dataTable th,table.wf-dataTable td{-webkit-box-sizing:content-box;box-sizing:content-box}.wf-dataTables_wrapper{position:relative;clear:both;*zoom:1;zoom:1}.wf-dataTables_wrapper .dataTables_length{float:left}.wf-dataTables_wrapper .dataTables_filter{float:right;text-align:right}.wf-dataTables_wrapper .dataTables_filter input{margin-left:0.5em}.wf-dataTables_wrapper .dataTables_info{clear:both;float:left;padding-top:0.755em}.wf-dataTables_wrapper .dataTables_paginate{float:right;text-align:right;padding-top:0.25em}.wf-dataTables_wrapper .dataTables_paginate .paginate_button{box-sizing:border-box;display:inline-block;min-width:1.5em;padding:0.5em 1em;margin-left:2px;text-align:center;text-decoration:none !important;cursor:pointer;*cursor:hand;color:#333 !important;border:1px solid transparent;border-radius:2px}.wf-dataTables_wrapper .dataTables_paginate .paginate_button.current,.wf-dataTables_wrapper .dataTables_paginate .paginate_button.current:hover{color:#333 !important;border:1px solid #979797;background-color:white;background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #fff), color-stop(100%, #dcdcdc));background:-webkit-linear-gradient(top, #fff 0%, #dcdcdc 100%);background:-moz-linear-gradient(top, #fff 0%, #dcdcdc 100%);background:-ms-linear-gradient(top, #fff 0%, #dcdcdc 100%);background:-o-linear-gradient(top, #fff 0%, #dcdcdc 100%);background:linear-gradient(to bottom, #ffffff 0%,#dcdcdc 100%)}.wf-dataTables_wrapper .dataTables_paginate .paginate_button.disabled,.wf-dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover,.wf-dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active{cursor:default;color:#666 !important;border:1px solid transparent;background:transparent;box-shadow:none}.wf-dataTables_wrapper .dataTables_paginate .paginate_button:hover{color:white !important;border:1px solid #111;background-color:#585858;background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #585858), color-stop(100%, #111));background:-webkit-linear-gradient(top, #585858 0%, #111 100%);background:-moz-linear-gradient(top, #585858 0%, #111 100%);background:-ms-linear-gradient(top, #585858 0%, #111 100%);background:-o-linear-gradient(top, #585858 0%, #111 100%);background:linear-gradient(to bottom, #585858 0%,#111111 100%)}.wf-dataTables_wrapper .dataTables_paginate .paginate_button:active{outline:none;background-color:#2b2b2b;background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #2b2b2b), color-stop(100%, #0c0c0c));background:-webkit-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:-moz-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:-ms-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:-o-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:linear-gradient(to bottom, #2b2b2b 0%,#0c0c0c 100%);box-shadow:inset 0 0 3px #111}.wf-dataTables_wrapper .dataTables_paginate .ellipsis{padding:0 1em}.wf-dataTables_wrapper .dataTables_processing{position:absolute;top:50%;left:50%;width:100%;height:40px;margin-left:-50%;margin-top:-25px;padding-top:20px;text-align:center;font-size:1.2em;background-color:white;background:-webkit-gradient(linear, left top, right top, color-stop(0%, rgba(255,255,255,0)), color-stop(25%, rgba(255,255,255,0.9)), color-stop(75%, rgba(255,255,255,0.9)), color-stop(100%, rgba(255,255,255,0)));background:-webkit-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);background:-moz-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);background:-ms-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);background:-o-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);background:linear-gradient(to right, rgba(255,255,255,0) 0%,rgba(255,255,255,0.9) 25%,rgba(255,255,255,0.9) 75%,rgba(255,255,255,0) 100%)}.wf-dataTables_wrapper .dataTables_length,.wf-dataTables_wrapper .dataTables_filter,.wf-dataTables_wrapper .dataTables_info,.wf-dataTables_wrapper .dataTables_processing,.wf-dataTables_wrapper .dataTables_paginate{color:#333}.wf-dataTables_wrapper .dataTables_scroll{clear:both}.wf-dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody{*margin-top:-1px;-webkit-overflow-scrolling:touch}.wf-dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody th,.wf-dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody td{vertical-align:middle}.wf-dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody th>div.dataTables_sizing,.wf-dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody td>div.dataTables_sizing{height:0;overflow:hidden;margin:0 !important;padding:0 !important}.wf-dataTables_wrapper.no-footer .dataTables_scrollBody{border-bottom:1px solid #111}.wf-dataTables_wrapper.no-footer div.dataTables_scrollHead table,.wf-dataTables_wrapper.no-footer div.dataTables_scrollBody table{border-bottom:none}.wf-dataTables_wrapper:after{visibility:hidden;display:block;content:"";clear:both;height:0}@media screen and (max-width: 767px){.wf-dataTables_wrapper .dataTables_info,.wf-dataTables_wrapper .dataTables_paginate{float:none;text-align:center}.wf-dataTables_wrapper .dataTables_paginate{margin-top:0.5em}}@media screen and (max-width: 640px){.wf-dataTables_wrapper .dataTables_length,.wf-dataTables_wrapper .dataTables_filter{float:none;text-align:center}.wf-dataTables_wrapper .dataTables_filter{margin-top:0.5em}}.wf-alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.wf-alert h4{margin-top:0;color:inherit}.wf-alert .wf-alert-link{font-weight:bold}.wf-alert>p,.wf-alert>ul{margin-bottom:0}.wf-alert>p+p{margin-top:5px}.wf-alert-dismissable,.wf-alert-dismissible{padding-right:35px}.wf-alert-dismissable .close,.wf-alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.wf-alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#3c763d}.wf-alert-success hr{border-top-color:#c9e2b3}.wf-alert-success .alert-link{color:#2b542c}.wf-alert-info{background-color:#d9edf7;border-color:#bce8f1;color:#31708f}.wf-alert-info hr{border-top-color:#a6e1ec}.wf-alert-info .alert-link{color:#245269}.wf-alert-warning{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}.wf-alert-warning hr{border-top-color:#f7e1b5}.wf-alert-warning .alert-link{color:#66512c}.wf-alert-danger{background-color:#f2dede;border-color:#ebccd1;color:#a94442}.wf-alert-danger hr{border-top-color:#e4b9c0}.wf-alert-danger .alert-link{color:#843534}#wf-tools-whois #wfrawhtml .wf-flex-row{margin:.5rem 0 1rem}#wf-tools-whois #wfrawhtml .wf-flex-row a.wf-flex-row-1{color:#444;text-decoration:none}#wf-tools-whois #wfrawhtml .wf-flex-row a.wf-flex-row-1:hover{color:#00a0d2;text-decoration:underline}.wf-diagnostic-fail.wf-block .wf-block-header .wf-block-header-content .wf-block-title{color:#d0514c}.wf-diagnostic-fail.wf-block .wf-block-header .wf-block-header-content .wf-block-title:before{content:'\f100';font-family:"Ionicons";display:inline-block;margin:0 .4rem 0 0}#wf-diagnostics .wf-block{margin:0 auto 0.5rem}#wf-diagnostics-other-tests .wf-btn-sm,#wf-diagnostics-other-tests .wf-btn-group-sm>.wf-btn{padding:2px 10px;vertical-align:top}.wf-support-block{padding:1rem 0}.wf-support-block>h4{margin:0;padding:0 0 1rem 0}.wf-support-block>h4>a{text-decoration:none;font-size:1.3125rem;line-height:1.5;font-weight:300}.wf-support-block>p{margin:0;padding:0}.wf-support-block>ul{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:row;flex-direction:row;-webkit-flex-wrap:wrap;flex-wrap:wrap;margin:0;padding:0}.wf-support-block>ul>li{margin:0;padding:1rem 1rem 1rem 0}.wf-support-block>ul>li>a{text-decoration:none;font-size:.875rem;line-height:1.3125;font-weight:normal}.wf-support-top-block,.wf-support-missing-block{padding:1.5rem 0}.wf-support-top-block>h4,.wf-support-missing-block>h4{margin:0;padding:0}.wf-support-top-block>ol>li,.wf-support-missing-block>ol>li{margin:0.75rem 0;padding:0}.wf-support-top-block>ol>li>a,.wf-support-missing-block>ol>li>a{text-decoration:none;font-size:.875rem;line-height:1.3125;font-weight:normal}#wf-gdpr-banner{position:relative;z-index:3006;background-color:#fcb214;font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:.875rem;color:#2d2d2d;line-height:1.3125;font-weight:normal;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between;-webkit-flex-direction:row;flex-direction:row;margin:0 0 0 -20px;padding:0}#wf-gdpr-banner>li{margin:0;padding:0.5rem 1rem}#wf-toupp-required-overlay::after{position:absolute;z-index:3004;top:0;right:0;width:0;height:0;background:rgba(241,241,241,0.6);content:'';opacity:0;-webkit-transition:opacity 0.5s,width 0.1s 0.5s,height 0.1s 0.5s;-o-transition:opacity 0.5s,width 0.1s 0.5s,height 0.1s 0.5s;transition:opacity 0.5s,width 0.1s 0.5s,height 0.1s 0.5s}.wf-toupp-required #wf-toupp-required-overlay::after{width:100%;height:100%;opacity:1;-webkit-transition:opacity 0.5s;-o-transition:opacity 0.5s;transition:opacity 0.5s}#wf-toupp-required-message{display:none;position:fixed;z-index:3005;left:0;width:100%;top:50%;transform:translateY(-50%);text-align:center;color:#666666;opacity:0;-webkit-transition:opacity 0.5s,width 0.1s 0.5s,height 0.1s 0.5s;-o-transition:opacity 0.5s,width 0.1s 0.5s,height 0.1s 0.5s;transition:opacity 0.5s,width 0.1s 0.5s,height 0.1s 0.5s}#wf-toupp-required-message #wf-toupp-required-message-inner{background-color:#00709e;color:#fff;overflow:hidden;max-width:550px;margin:0 auto;padding:20px}#wf-toupp-required-message #wf-toupp-required-message-inner h2{font-size:2.0rem}#wf-toupp-required-message #wf-toupp-required-message-inner h2 .wf-toupp-required-header{line-height:2.4rem}#wf-toupp-required-message #wf-toupp-required-message-inner p{font-size:1rem}#wf-toupp-required-message #wf-toupp-required-message-inner p:first-child{margin-top:0}#wf-toupp-required-message #wf-toupp-required-message-inner p:last-child{margin-bottom:0}#wf-toupp-required-message #wf-toupp-required-message-inner small{font-size:0.9rem;font-weight:normal;margin-top:12px;display:block}.wf-toupp-required #wf-toupp-required-message{display:block;opacity:1;-webkit-transition:opacity 0.5s;transition:opacity 0.5s}.wf-flag-{background-position:-0px -0px !important}.wf-flag-ad{background-position:-16px -0px !important}.wf-flag-ae{background-position:-32px -0px !important}.wf-flag-af{background-position:-48px -0px !important}.wf-flag-ag{background-position:-64px -0px !important}.wf-flag-ai{background-position:-80px -0px !important}.wf-flag-al{background-position:-96px -0px !important}.wf-flag-am{background-position:-112px -0px !important}.wf-flag-an{background-position:-128px -0px !important}.wf-flag-ao{background-position:-144px -0px !important}.wf-flag-ap{background-position:-160px -0px !important}.wf-flag-aq{background-position:-176px -0px !important}.wf-flag-ar{background-position:-0px -11px !important}.wf-flag-as{background-position:-16px -11px !important}.wf-flag-at{background-position:-32px -11px !important}.wf-flag-au{background-position:-48px -11px !important}.wf-flag-aw{background-position:-64px -11px !important}.wf-flag-ax{background-position:-80px -11px !important}.wf-flag-az{background-position:-96px -11px !important}.wf-flag-ba{background-position:-112px -11px !important}.wf-flag-bb{background-position:-128px -11px !important}.wf-flag-bd{background-position:-144px -11px !important}.wf-flag-be{background-position:-160px -11px !important}.wf-flag-bf{background-position:-176px -11px !important}.wf-flag-bg{background-position:-0px -22px !important}.wf-flag-bh{background-position:-16px -22px !important}.wf-flag-bi{background-position:-32px -22px !important}.wf-flag-bj{background-position:-48px -22px !important}.wf-flag-bl{background-position:-64px -22px !important}.wf-flag-bm{background-position:-80px -22px !important}.wf-flag-bn{background-position:-96px -22px !important}.wf-flag-bo{background-position:-112px -22px !important}.wf-flag-bq{background-position:-128px -22px !important}.wf-flag-br{background-position:-144px -22px !important}.wf-flag-bs{background-position:-160px -22px !important}.wf-flag-bt{background-position:-176px -22px !important}.wf-flag-bv{background-position:-0px -33px !important}.wf-flag-bw{background-position:-16px -33px !important}.wf-flag-by{background-position:-32px -33px !important}.wf-flag-bz{background-position:-48px -33px !important}.wf-flag-ca{background-position:-64px -33px !important}.wf-flag-cc{background-position:-80px -33px !important}.wf-flag-cd{background-position:-96px -33px !important}.wf-flag-cf{background-position:-112px -33px !important}.wf-flag-cg{background-position:-128px -33px !important}.wf-flag-ch{background-position:-144px -33px !important}.wf-flag-ci{background-position:-160px -33px !important}.wf-flag-ck{background-position:-176px -33px !important}.wf-flag-cl{background-position:-0px -44px !important}.wf-flag-cm{background-position:-16px -44px !important}.wf-flag-cn{background-position:-32px -44px !important}.wf-flag-co{background-position:-48px -44px !important}.wf-flag-cr{background-position:-64px -44px !important}.wf-flag-cs{background-position:-80px -44px !important}.wf-flag-cu{background-position:-96px -44px !important}.wf-flag-cv{background-position:-112px -44px !important}.wf-flag-cw{background-position:-128px -44px !important}.wf-flag-cx{background-position:-144px -44px !important}.wf-flag-cy{background-position:-160px -44px !important}.wf-flag-cz{background-position:-176px -44px !important}.wf-flag-de{background-position:-0px -55px !important}.wf-flag-dj{background-position:-16px -55px !important}.wf-flag-dk{background-position:-32px -55px !important}.wf-flag-dm{background-position:-48px -55px !important}.wf-flag-do{background-position:-64px -55px !important}.wf-flag-dz{background-position:-80px -55px !important}.wf-flag-ec{background-position:-96px -55px !important}.wf-flag-ee{background-position:-112px -55px !important}.wf-flag-eg{background-position:-128px -55px !important}.wf-flag-eh{background-position:-144px -55px !important}.wf-flag-england{background-position:-160px -55px !important}.wf-flag-er{background-position:-176px -55px !important}.wf-flag-es{background-position:-0px -66px !important}.wf-flag-et{background-position:-16px -66px !important}.wf-flag-eu{background-position:-32px -66px !important}.wf-flag-fam{background-position:-48px -66px !important}.wf-flag-fi{background-position:-64px -66px !important}.wf-flag-fj{background-position:-80px -66px !important}.wf-flag-fk{background-position:-96px -66px !important}.wf-flag-fm{background-position:-112px -66px !important}.wf-flag-fo{background-position:-128px -66px !important}.wf-flag-fr{background-position:-144px -66px !important}.wf-flag-ga{background-position:-160px -66px !important}.wf-flag-gb{background-position:-176px -66px !important}.wf-flag-gd{background-position:-0px -77px !important}.wf-flag-ge{background-position:-16px -77px !important}.wf-flag-gf{background-position:-32px -77px !important}.wf-flag-gg{background-position:-48px -77px !important}.wf-flag-gh{background-position:-64px -77px !important}.wf-flag-gi{background-position:-80px -77px !important}.wf-flag-gl{background-position:-96px -77px !important}.wf-flag-gm{background-position:-112px -77px !important}.wf-flag-gn{background-position:-128px -77px !important}.wf-flag-gp{background-position:-144px -77px !important}.wf-flag-gq{background-position:-160px -77px !important}.wf-flag-gr{background-position:-176px -77px !important}.wf-flag-gs{background-position:-0px -88px !important}.wf-flag-gt{background-position:-16px -88px !important}.wf-flag-gu{background-position:-32px -88px !important}.wf-flag-gw{background-position:-48px -88px !important}.wf-flag-gy{background-position:-64px -88px !important}.wf-flag-hk{background-position:-80px -88px !important}.wf-flag-hm{background-position:-96px -88px !important}.wf-flag-hn{background-position:-112px -88px !important}.wf-flag-hr{background-position:-128px -88px !important}.wf-flag-ht{background-position:-144px -88px !important}.wf-flag-hu{background-position:-160px -88px !important}.wf-flag-id{background-position:-176px -88px !important}.wf-flag-ie{background-position:-0px -99px !important}.wf-flag-il{background-position:-16px -99px !important}.wf-flag-im{background-position:-32px -99px !important}.wf-flag-in{background-position:-48px -99px !important}.wf-flag-io{background-position:-64px -99px !important}.wf-flag-iq{background-position:-80px -99px !important}.wf-flag-ir{background-position:-96px -99px !important}.wf-flag-is{background-position:-112px -99px !important}.wf-flag-it{background-position:-128px -99px !important}.wf-flag-je{background-position:-144px -99px !important}.wf-flag-jm{background-position:-160px -99px !important}.wf-flag-jo{background-position:-176px -99px !important}.wf-flag-jp{background-position:-0px -110px !important}.wf-flag-ke{background-position:-16px -110px !important}.wf-flag-kg{background-position:-32px -110px !important}.wf-flag-kh{background-position:-48px -110px !important}.wf-flag-ki{background-position:-64px -110px !important}.wf-flag-km{background-position:-80px -110px !important}.wf-flag-kn{background-position:-96px -110px !important}.wf-flag-kp{background-position:-112px -110px !important}.wf-flag-kr{background-position:-128px -110px !important}.wf-flag-kw{background-position:-144px -110px !important}.wf-flag-ky{background-position:-160px -110px !important}.wf-flag-kz{background-position:-176px -110px !important}.wf-flag-la{background-position:-0px -121px !important}.wf-flag-lb{background-position:-16px -121px !important}.wf-flag-lc{background-position:-32px -121px !important}.wf-flag-li{background-position:-48px -121px !important}.wf-flag-lk{background-position:-64px -121px !important}.wf-flag-lr{background-position:-80px -121px !important}.wf-flag-ls{background-position:-96px -121px !important}.wf-flag-lt{background-position:-112px -121px !important}.wf-flag-lu{background-position:-128px -121px !important}.wf-flag-lv{background-position:-144px -121px !important}.wf-flag-ly{background-position:-160px -121px !important}.wf-flag-ma{background-position:-176px -121px !important}.wf-flag-mc{background-position:-0px -132px !important}.wf-flag-md{background-position:-16px -132px !important}.wf-flag-me{background-position:-32px -132px !important}.wf-flag-mf{background-position:-48px -132px !important}.wf-flag-mg{background-position:-64px -132px !important}.wf-flag-mh{background-position:-80px -132px !important}.wf-flag-mk{background-position:-96px -132px !important}.wf-flag-ml{background-position:-112px -132px !important}.wf-flag-mm{background-position:-128px -132px !important}.wf-flag-mn{background-position:-144px -132px !important}.wf-flag-mo{background-position:-160px -132px !important}.wf-flag-mp{background-position:-176px -132px !important}.wf-flag-mq{background-position:-0px -143px !important}.wf-flag-mr{background-position:-16px -143px !important}.wf-flag-ms{background-position:-32px -143px !important}.wf-flag-mt{background-position:-48px -143px !important}.wf-flag-mu{background-position:-64px -143px !important}.wf-flag-mv{background-position:-80px -143px !important}.wf-flag-mw{background-position:-96px -143px !important}.wf-flag-mx{background-position:-112px -143px !important}.wf-flag-my{background-position:-128px -143px !important}.wf-flag-mz{background-position:-144px -143px !important}.wf-flag-na{background-position:-160px -143px !important}.wf-flag-nc{background-position:-176px -143px !important}.wf-flag-ne{background-position:-0px -154px !important}.wf-flag-nf{background-position:-16px -154px !important}.wf-flag-ng{background-position:-32px -154px !important}.wf-flag-ni{background-position:-48px -154px !important}.wf-flag-nl{background-position:-64px -154px !important}.wf-flag-no{background-position:-80px -154px !important}.wf-flag-np{background-position:-96px -154px !important}.wf-flag-nr{background-position:-112px -154px !important}.wf-flag-nu{background-position:-128px -154px !important}.wf-flag-nz{background-position:-144px -154px !important}.wf-flag-om{background-position:-160px -154px !important}.wf-flag-pa{background-position:-176px -154px !important}.wf-flag-pe{background-position:-0px -165px !important}.wf-flag-pf{background-position:-16px -165px !important}.wf-flag-pg{background-position:-32px -165px !important}.wf-flag-ph{background-position:-48px -165px !important}.wf-flag-pk{background-position:-64px -165px !important}.wf-flag-pl{background-position:-80px -165px !important}.wf-flag-pm{background-position:-96px -165px !important}.wf-flag-pn{background-position:-112px -165px !important}.wf-flag-pr{background-position:-128px -165px !important}.wf-flag-ps{background-position:-144px -165px !important}.wf-flag-pt{background-position:-160px -165px !important}.wf-flag-pw{background-position:-176px -165px !important}.wf-flag-py{background-position:-0px -176px !important}.wf-flag-qa{background-position:-16px -176px !important}.wf-flag-re{background-position:-32px -176px !important}.wf-flag-ro{background-position:-48px -176px !important}.wf-flag-rs{background-position:-64px -176px !important}.wf-flag-ru{background-position:-80px -176px !important}.wf-flag-rw{background-position:-96px -176px !important}.wf-flag-sa{background-position:-112px -176px !important}.wf-flag-sb{background-position:-128px -176px !important}.wf-flag-sc{background-position:-144px -176px !important}.wf-flag-scotland{background-position:-160px -176px !important}.wf-flag-sd{background-position:-176px -176px !important}.wf-flag-se{background-position:-0px -187px !important}.wf-flag-sg{background-position:-16px -187px !important}.wf-flag-sh{background-position:-32px -187px !important}.wf-flag-si{background-position:-48px -187px !important}.wf-flag-sj{background-position:-64px -187px !important}.wf-flag-sk{background-position:-80px -187px !important}.wf-flag-sl{background-position:-96px -187px !important}.wf-flag-sm{background-position:-112px -187px !important}.wf-flag-sn{background-position:-128px -187px !important}.wf-flag-so{background-position:-144px -187px !important}.wf-flag-sr{background-position:-160px -187px !important}.wf-flag-ss{background-position:-176px -187px !important}.wf-flag-st{background-position:-0px -198px !important}.wf-flag-sv{background-position:-16px -198px !important}.wf-flag-sx{background-position:-32px -198px !important}.wf-flag-sy{background-position:-48px -198px !important}.wf-flag-sz{background-position:-64px -198px !important}.wf-flag-tc{background-position:-80px -198px !important}.wf-flag-td{background-position:-96px -198px !important}.wf-flag-tf{background-position:-112px -198px !important}.wf-flag-tg{background-position:-128px -198px !important}.wf-flag-th{background-position:-144px -198px !important}.wf-flag-tj{background-position:-160px -198px !important}.wf-flag-tk{background-position:-176px -198px !important}.wf-flag-tl{background-position:-0px -209px !important}.wf-flag-tm{background-position:-16px -209px !important}.wf-flag-tn{background-position:-32px -209px !important}.wf-flag-to{background-position:-48px -209px !important}.wf-flag-tr{background-position:-64px -209px !important}.wf-flag-tt{background-position:-80px -209px !important}.wf-flag-tv{background-position:-96px -209px !important}.wf-flag-tw{background-position:-112px -209px !important}.wf-flag-tz{background-position:-128px -209px !important}.wf-flag-ua{background-position:-144px -209px !important}.wf-flag-ug{background-position:-160px -209px !important}.wf-flag-uk{background-position:-176px -209px !important}.wf-flag-um{background-position:-0px -220px !important}.wf-flag-un{background-position:-16px -220px !important}.wf-flag-us{background-position:-32px -220px !important}.wf-flag-uy{background-position:-48px -220px !important}.wf-flag-uz{background-position:-64px -220px !important}.wf-flag-va{background-position:-80px -220px !important}.wf-flag-vc{background-position:-96px -220px !important}.wf-flag-ve{background-position:-112px -220px !important}.wf-flag-vg{background-position:-128px -220px !important}.wf-flag-vi{background-position:-144px -220px !important}.wf-flag-vn{background-position:-160px -220px !important}.wf-flag-vu{background-position:-176px -220px !important}.wf-flag-wales{background-position:-0px -231px !important}.wf-flag-wf{background-position:-16px -231px !important}.wf-flag-ws{background-position:-32px -231px !important}.wf-flag-xk{background-position:-48px -231px !important}.wf-flag-ye{background-position:-64px -231px !important}.wf-flag-yt{background-position:-80px -231px !important}.wf-flag-za{background-position:-96px -231px !important}.wf-flag-zm{background-position:-112px -231px !important}.wf-flag-zw{background-position:-128px -231px !important}
|
|
css/main.1549315000.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
.wf-clearfix:before,.wf-clearfix:after{content:" ";display:table}.wf-clearfix:after{clear:both}.wf-btn{display:inline-block;margin-bottom:0;font-weight:normal;text-align:center;vertical-align:middle;touch-action:manipulation;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;text-transform:uppercase;padding:.4rem 1rem;font-size:.875rem;line-height:1.3125rem;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}@media (min-width: 768px){.wf-btn{padding:.5rem 1.25rem;font-size:.875rem;line-height:1.3125rem;border-radius:4px}}.wf-btn:focus,.wf-btn.wf-focus,.wf-btn:active:focus,.wf-btn:active.wf-focus,.wf-btn.wf-active:focus,.wf-btn.wf-active.wf-focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.wf-btn:hover,.wf-btn:focus,.wf-btn.wf-focus{color:#00709e;text-decoration:none}.wf-btn:active,.wf-btn.wf-active{outline:0;background-image:none;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.wf-btn.wf-disabled,.wf-btn[disabled],.wf-btn[readonly],fieldset[disabled] .wf-btn{cursor:not-allowed;-webkit-box-shadow:none;box-shadow:none}a.wf-btn{text-decoration:none}a.wf-btn.wf-disabled,fieldset[disabled] a.wf-btn{cursor:not-allowed;pointer-events:none}.wf-btn-default{color:#00709e;background-color:#fff;border-color:#00709e}.wf-btn-default:focus,.wf-btn-default.focus{color:#00709e;background-color:#e6e6e6;border-color:#00161f}.wf-btn-default:hover{color:#00709e;background-color:#e6e6e6;border-color:#004561}.wf-btn-default:active,.wf-btn-default.active,.wf-open>.wf-btn-default.wf-dropdown-toggle{color:#00709e;background-color:#e6e6e6;border-color:#004561}.wf-btn-default:active:hover,.wf-btn-default:active:focus,.wf-btn-default:active.focus,.wf-btn-default.active:hover,.wf-btn-default.active:focus,.wf-btn-default.active.focus,.wf-open>.wf-btn-default.wf-dropdown-toggle:hover,.wf-open>.wf-btn-default.wf-dropdown-toggle:focus,.wf-open>.wf-btn-default.wf-dropdown-toggle.focus{color:#00709e;background-color:#d4d4d4;border-color:#00161f}.wf-btn-default:active,.wf-btn-default.wf-active,.wf-open>.wf-btn-default.wf-dropdown-toggle{background-image:none}.wf-btn-default.wf-disabled,.wf-btn-default[disabled],.wf-btn-default[readonly],fieldset[disabled] .wf-btn-default{color:#777;background-color:#fff;border-color:#e2e2e2;cursor:not-allowed}.wf-btn-default.wf-disabled:hover,.wf-btn-default.wf-disabled:focus,.wf-btn-default.wf-disabled.wf-focus,.wf-btn-default[disabled]:hover,.wf-btn-default[disabled]:focus,.wf-btn-default[disabled].wf-focus,.wf-btn-default[readonly]:hover,.wf-btn-default[readonly]:focus,.wf-btn-default[readonly].wf-focus,fieldset[disabled] .wf-btn-default:hover,fieldset[disabled] .wf-btn-default:focus,fieldset[disabled] .wf-btn-default.wf-focus{background-color:#fff;border-color:#00709e}.wf-btn-default .wf-badge{color:#fff;background-color:#00709e}.wf-btn-primary{color:#fff;background-color:#00709e;border-color:#005e85}.wf-btn-primary:focus,.wf-btn-primary.focus{color:#fff;background-color:#004c6b;border-color:#000405}.wf-btn-primary:hover{color:#fff;background-color:#004c6b;border-color:#003347}.wf-btn-primary:active,.wf-btn-primary.active,.wf-open>.wf-btn-primary.wf-dropdown-toggle{color:#fff;background-color:#004c6b;border-color:#003347}.wf-btn-primary:active:hover,.wf-btn-primary:active:focus,.wf-btn-primary:active.focus,.wf-btn-primary.active:hover,.wf-btn-primary.active:focus,.wf-btn-primary.active.focus,.wf-open>.wf-btn-primary.wf-dropdown-toggle:hover,.wf-open>.wf-btn-primary.wf-dropdown-toggle:focus,.wf-open>.wf-btn-primary.wf-dropdown-toggle.focus{color:#fff;background-color:#003347;border-color:#000405}.wf-btn-primary:active,.wf-btn-primary.wf-active,.wf-open>.wf-btn-primary.wf-dropdown-toggle{background-image:none}.wf-btn-primary.wf-disabled,.wf-btn-primary[disabled],.wf-btn-primary[readonly],fieldset[disabled] .wf-btn-primary{color:#fff;background-color:#59a2c0;border-color:#5996b0;cursor:not-allowed}.wf-btn-primary.wf-disabled:hover,.wf-btn-primary.wf-disabled:focus,.wf-btn-primary.wf-disabled.wf-focus,.wf-btn-primary[disabled]:hover,.wf-btn-primary[disabled]:focus,.wf-btn-primary[disabled].wf-focus,.wf-btn-primary[readonly]:hover,.wf-btn-primary[readonly]:focus,.wf-btn-primary[readonly].wf-focus,fieldset[disabled] .wf-btn-primary:hover,fieldset[disabled] .wf-btn-primary:focus,fieldset[disabled] .wf-btn-primary.wf-focus{background-color:#00709e;border-color:#005e85}.wf-btn-primary .wf-badge{color:#00709e;background-color:#fff}.wf-btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.wf-btn-success:focus,.wf-btn-success.focus{color:#fff;background-color:#449d44;border-color:#255625}.wf-btn-success:hover{color:#fff;background-color:#449d44;border-color:#398439}.wf-btn-success:active,.wf-btn-success.active,.wf-open>.wf-btn-success.wf-dropdown-toggle{color:#fff;background-color:#449d44;border-color:#398439}.wf-btn-success:active:hover,.wf-btn-success:active:focus,.wf-btn-success:active.focus,.wf-btn-success.active:hover,.wf-btn-success.active:focus,.wf-btn-success.active.focus,.wf-open>.wf-btn-success.wf-dropdown-toggle:hover,.wf-open>.wf-btn-success.wf-dropdown-toggle:focus,.wf-open>.wf-btn-success.wf-dropdown-toggle.focus{color:#fff;background-color:#398439;border-color:#255625}.wf-btn-success:active,.wf-btn-success.wf-active,.wf-open>.wf-btn-success.wf-dropdown-toggle{background-image:none}.wf-btn-success.wf-disabled,.wf-btn-success[disabled],.wf-btn-success[readonly],fieldset[disabled] .wf-btn-success{color:#fff;background-color:#95d195;border-color:#8bca8b;cursor:not-allowed}.wf-btn-success.wf-disabled:hover,.wf-btn-success.wf-disabled:focus,.wf-btn-success.wf-disabled.wf-focus,.wf-btn-success[disabled]:hover,.wf-btn-success[disabled]:focus,.wf-btn-success[disabled].wf-focus,.wf-btn-success[readonly]:hover,.wf-btn-success[readonly]:focus,.wf-btn-success[readonly].wf-focus,fieldset[disabled] .wf-btn-success:hover,fieldset[disabled] .wf-btn-success:focus,fieldset[disabled] .wf-btn-success.wf-focus{background-color:#5cb85c;border-color:#4cae4c}.wf-btn-success .wf-badge{color:#5cb85c;background-color:#fff}.wf-btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.wf-btn-info:focus,.wf-btn-info.focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.wf-btn-info:hover{color:#fff;background-color:#31b0d5;border-color:#269abc}.wf-btn-info:active,.wf-btn-info.active,.wf-open>.wf-btn-info.wf-dropdown-toggle{color:#fff;background-color:#31b0d5;border-color:#269abc}.wf-btn-info:active:hover,.wf-btn-info:active:focus,.wf-btn-info:active.focus,.wf-btn-info.active:hover,.wf-btn-info.active:focus,.wf-btn-info.active.focus,.wf-open>.wf-btn-info.wf-dropdown-toggle:hover,.wf-open>.wf-btn-info.wf-dropdown-toggle:focus,.wf-open>.wf-btn-info.wf-dropdown-toggle.focus{color:#fff;background-color:#269abc;border-color:#1b6d85}.wf-btn-info:active,.wf-btn-info.wf-active,.wf-open>.wf-btn-info.wf-dropdown-toggle{background-image:none}.wf-btn-info.wf-disabled,.wf-btn-info[disabled],.wf-btn-info[readonly],fieldset[disabled] .wf-btn-info{color:#fff;background-color:#94d6ea;border-color:#87d1e7;cursor:not-allowed}.wf-btn-info.wf-disabled:hover,.wf-btn-info.wf-disabled:focus,.wf-btn-info.wf-disabled.wf-focus,.wf-btn-info[disabled]:hover,.wf-btn-info[disabled]:focus,.wf-btn-info[disabled].wf-focus,.wf-btn-info[readonly]:hover,.wf-btn-info[readonly]:focus,.wf-btn-info[readonly].wf-focus,fieldset[disabled] .wf-btn-info:hover,fieldset[disabled] .wf-btn-info:focus,fieldset[disabled] .wf-btn-info.wf-focus{background-color:#5bc0de;border-color:#46b8da}.wf-btn-info .wf-badge{color:#5bc0de;background-color:#fff}.wf-btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.wf-btn-warning:focus,.wf-btn-warning.focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.wf-btn-warning:hover{color:#fff;background-color:#ec971f;border-color:#d58512}.wf-btn-warning:active,.wf-btn-warning.active,.wf-open>.wf-btn-warning.wf-dropdown-toggle{color:#fff;background-color:#ec971f;border-color:#d58512}.wf-btn-warning:active:hover,.wf-btn-warning:active:focus,.wf-btn-warning:active.focus,.wf-btn-warning.active:hover,.wf-btn-warning.active:focus,.wf-btn-warning.active.focus,.wf-open>.wf-btn-warning.wf-dropdown-toggle:hover,.wf-open>.wf-btn-warning.wf-dropdown-toggle:focus,.wf-open>.wf-btn-warning.wf-dropdown-toggle.focus{color:#fff;background-color:#d58512;border-color:#985f0d}.wf-btn-warning:active,.wf-btn-warning.wf-active,.wf-open>.wf-btn-warning.wf-dropdown-toggle{background-image:none}.wf-btn-warning.wf-disabled,.wf-btn-warning[disabled],.wf-btn-warning[readonly],fieldset[disabled] .wf-btn-warning{color:#fff;background-color:#f5ca8c;border-color:#f4c37c;cursor:not-allowed}.wf-btn-warning.wf-disabled:hover,.wf-btn-warning.wf-disabled:focus,.wf-btn-warning.wf-disabled.wf-focus,.wf-btn-warning[disabled]:hover,.wf-btn-warning[disabled]:focus,.wf-btn-warning[disabled].wf-focus,.wf-btn-warning[readonly]:hover,.wf-btn-warning[readonly]:focus,.wf-btn-warning[readonly].wf-focus,fieldset[disabled] .wf-btn-warning:hover,fieldset[disabled] .wf-btn-warning:focus,fieldset[disabled] .wf-btn-warning.wf-focus{background-color:#f0ad4e;border-color:#eea236}.wf-btn-warning .wf-badge{color:#f0ad4e;background-color:#fff}.wf-btn-danger{color:#fff;background-color:#930000;border-color:#7a0000}.wf-btn-danger:focus,.wf-btn-danger.focus{color:#fff;background-color:#600000;border-color:#000}.wf-btn-danger:hover{color:#fff;background-color:#600000;border-color:#3c0000}.wf-btn-danger:active,.wf-btn-danger.active,.wf-open>.wf-btn-danger.wf-dropdown-toggle{color:#fff;background-color:#600000;border-color:#3c0000}.wf-btn-danger:active:hover,.wf-btn-danger:active:focus,.wf-btn-danger:active.focus,.wf-btn-danger.active:hover,.wf-btn-danger.active:focus,.wf-btn-danger.active.focus,.wf-open>.wf-btn-danger.wf-dropdown-toggle:hover,.wf-open>.wf-btn-danger.wf-dropdown-toggle:focus,.wf-open>.wf-btn-danger.wf-dropdown-toggle.focus{color:#fff;background-color:#3c0000;border-color:#000}.wf-btn-danger:active,.wf-btn-danger.wf-active,.wf-open>.wf-btn-danger.wf-dropdown-toggle{background-image:none}.wf-btn-danger.wf-disabled,.wf-btn-danger[disabled],.wf-btn-danger[readonly],fieldset[disabled] .wf-btn-danger{color:#fff;background-color:#b95959;border-color:#a95959;cursor:not-allowed}.wf-btn-danger.wf-disabled:hover,.wf-btn-danger.wf-disabled:focus,.wf-btn-danger.wf-disabled.wf-focus,.wf-btn-danger[disabled]:hover,.wf-btn-danger[disabled]:focus,.wf-btn-danger[disabled].wf-focus,.wf-btn-danger[readonly]:hover,.wf-btn-danger[readonly]:focus,.wf-btn-danger[readonly].wf-focus,fieldset[disabled] .wf-btn-danger:hover,fieldset[disabled] .wf-btn-danger:focus,fieldset[disabled] .wf-btn-danger.wf-focus{background-color:#930000;border-color:#7a0000}.wf-btn-danger .wf-badge{color:#930000;background-color:#fff}.wf-btn-callout{font-weight:600;text-transform:uppercase}.wf-btn-callout-subtle{font-weight:400;text-transform:uppercase}.wf-btn-link{color:#00709e;font-weight:normal;border-radius:0}.wf-btn-link,.wf-btn-link:active,.wf-btn-link.wf-active,.wf-btn-link[disabled],fieldset[disabled] .wf-btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.wf-btn-link,.wf-btn-link:hover,.wf-btn-link:focus,.wf-btn-link:active{border-color:transparent}.wf-btn-link:hover,.wf-btn-link:focus{color:#003a52;text-decoration:underline;background-color:transparent}.wf-btn-link[disabled]:hover,.wf-btn-link[disabled]:focus,fieldset[disabled] .wf-btn-link:hover,fieldset[disabled] .wf-btn-link:focus{color:#777;text-decoration:none}.wf-btn-lg,.wf-btn-group-lg>.wf-btn{padding:10px 16px;font-size:18px;line-height:1.33333;border-radius:6px}.wf-btn-sm,.wf-btn-group-sm>.wf-btn{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.wf-btn-xs,.wf-btn-group-xs>.wf-btn{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.wf-btn-block{display:block;width:100%}.wf-btn-block+.wf-btn-block{margin-top:5px}input[type="submit"].wf-btn-block,input[type="reset"].wf-btn-block,input[type="button"].wf-btn-block{width:100%}.wf-btn-group,.wf-btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.wf-btn-group>.wf-btn,.wf-btn-group-vertical>.wf-btn{position:relative;float:left}.wf-btn-group>.wf-btn:hover,.wf-btn-group>.wf-btn:focus,.wf-btn-group>.wf-btn:active,.wf-btn-group>.wf-btn.wf-active,.wf-btn-group-vertical>.wf-btn:hover,.wf-btn-group-vertical>.wf-btn:focus,.wf-btn-group-vertical>.wf-btn:active,.wf-btn-group-vertical>.wf-btn.wf-active{z-index:2}.wf-btn-group .wf-btn+.wf-btn,.wf-btn-group .wf-btn+.wf-btn-group,.wf-btn-group .wf-btn-group+.wf-btn,.wf-btn-group .wf-btn-group+.wf-btn-group{margin-left:-1px}.wf-btn-toolbar{margin-left:-5px}.wf-btn-toolbar:before,.wf-btn-toolbar:after{content:" ";display:table}.wf-btn-toolbar:after{clear:both}.wf-btn-toolbar .wf-btn,.wf-btn-toolbar .wf-btn-group,.wf-btn-toolbar .wf-input-group{float:left}.wf-btn-toolbar>.wf-btn,.wf-btn-toolbar>.wf-btn-group,.wf-btn-toolbar>.wf-input-group{margin-left:5px}.wf-btn-group>.wf-btn:not(:first-child):not(:last-child):not(.wf-dropdown-toggle){border-radius:0}.wf-btn-group>.wf-btn:first-child{margin-left:0}.wf-btn-group>.wf-btn:first-child:not(:last-child):not(.wf-dropdown-toggle){-moz-border-radius-topright:0;-webkit-border-top-right-radius:0;border-top-right-radius:0;-moz-border-radius-bottomright:0;-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0}.wf-btn-group>.wf-btn:last-child:not(:first-child),.wf-btn-group>.wf-dropdown-toggle:not(:first-child){-moz-border-radius-topleft:0;-webkit-border-top-left-radius:0;border-top-left-radius:0;-moz-border-radius-bottomleft:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0}.wf-btn-group>.wf-btn-group{float:left}.wf-btn-group>.wf-btn-group:not(:first-child):not(:last-child)>.wf-btn{border-radius:0}.wf-btn-group>.wf-btn-group:first-child:not(:last-child)>.wf-btn:last-child,.wf-btn-group>.wf-btn-group:first-child:not(:last-child)>.wf-dropdown-toggle{-moz-border-radius-topright:0;-webkit-border-top-right-radius:0;border-top-right-radius:0;-moz-border-radius-bottomright:0;-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0}.wf-btn-group>.wf-btn-group:last-child:not(:first-child)>.wf-btn:first-child{-moz-border-radius-topleft:0;-webkit-border-top-left-radius:0;border-top-left-radius:0;-moz-border-radius-bottomleft:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0}.wf-btn-group .wf-dropdown-toggle:active,.wf-btn-group.wf-open .wf-dropdown-toggle{outline:0}.wf-btn-group>.wf-btn+.wf-dropdown-toggle{padding-left:8px;padding-right:8px}.wf-btn-group>.wf-btn-lg+.wf-dropdown-toggle,.wf-btn-group-lg.wf-btn-group>.wf-btn+.wf-dropdown-toggle{padding-left:12px;padding-right:12px}.wf-btn-group.open .wf-dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.wf-btn-group.open .wf-dropdown-toggle.wf-btn-link{-webkit-box-shadow:none;box-shadow:none}.wf-btn .wf-caret{margin-left:0}.wf-btn-lg .wf-caret,.wf-btn-group-lg>.wf-btn .wf-caret{border-width:5px 5px 0;border-bottom-width:0}.wf-dropup .wf-btn-lg .wf-caret,.wf-dropup .wf-btn-group-lg>.wf-btn .wf-caret{border-width:0 5px 5px}.wf-btn-group-vertical>.wf-btn,.wf-btn-group-vertical>.wf-btn-group,.wf-btn-group-vertical>.wf-btn-group>.wf-btn{display:block;float:none;width:100%;max-width:100%}.wf-btn-group-vertical>.wf-btn-group:before,.wf-btn-group-vertical>.wf-btn-group:after{content:" ";display:table}.wf-btn-group-vertical>.wf-btn-group:after{clear:both}.wf-btn-group-vertical>.wf-btn-group>.wf-btn{float:none}.wf-btn-group-vertical>.wf-btn+.wf-btn,.wf-btn-group-vertical>.wf-btn+.wf-btn-group,.wf-btn-group-vertical>.wf-btn-group+.wf-btn,.wf-btn-group-vertical>.wf-btn-group+.wf-btn-group{margin-top:-1px;margin-left:0}.wf-btn-group-vertical>.wf-btn:not(:first-child):not(:last-child){border-radius:0}.wf-btn-group-vertical>.wf-btn:first-child:not(:last-child){-moz-border-radius-topleft:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topright:4px;-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-bottomleft:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0;-moz-border-radius-bottomright:0;-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0}.wf-btn-group-vertical>.wf-btn:last-child:not(:first-child){-moz-border-radius-topleft:0;-webkit-border-top-left-radius:0;border-top-left-radius:0;-moz-border-radius-topright:0;-webkit-border-top-right-radius:0;border-top-right-radius:0;-moz-border-radius-bottomleft:4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomright:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px}.wf-btn-group-vertical>.wf-btn-group:not(:first-child):not(:last-child)>.wf-btn{border-radius:0}.wf-btn-group-vertical>.wf-btn-group:first-child:not(:last-child)>.wf-btn:last-child,.wf-btn-group-vertical>.wf-btn-group:first-child:not(:last-child)>.wf-dropdown-toggle{-moz-border-radius-bottomleft:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0;-moz-border-radius-bottomright:0;-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0}.wf-btn-group-vertical>.wf-btn-group:last-child:not(:first-child)>.wf-btn:first-child{-moz-border-radius-topleft:0;-webkit-border-top-left-radius:0;border-top-left-radius:0;-moz-border-radius-topright:0;-webkit-border-top-right-radius:0;border-top-right-radius:0}.wf-btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.wf-btn-group-justified>.wf-btn,.wf-btn-group-justified>.wf-btn-group{float:none;display:table-cell;width:1%}.wf-btn-group-justified>.wf-btn-group .wf-btn{width:100%}.wf-btn-group-justified>.wf-btn-group .wf-dropdown-menu{left:auto}[data-toggle="buttons"]>.wf-btn input[type="radio"],[data-toggle="buttons"]>.wf-btn input[type="checkbox"],[data-toggle="buttons"]>.wf-btn-group>.wf-btn input[type="radio"],[data-toggle="buttons"]>.wf-btn-group>.wf-btn input[type="checkbox"]{position:absolute;clip:rect(0, 0, 0, 0);pointer-events:none}.wf-pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.wf-pagination>li{display:inline}.wf-pagination>li>a,.wf-pagination>li>span{position:relative;float:left;padding:.5rem 1.25rem;line-height:1.42857;text-decoration:none;color:#00709e;background-color:#fff;border:1px solid #ddd;margin-left:-1px}.wf-pagination>li:first-child>a,.wf-pagination>li:first-child>span{margin-left:0;-moz-border-radius-topleft:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-bottomleft:4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px}.wf-pagination>li:last-child>a,.wf-pagination>li:last-child>span{-moz-border-radius-topright:4px;-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-bottomright:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px}.wf-pagination>li>a:hover,.wf-pagination>li>a:focus,.wf-pagination>li>span:hover,.wf-pagination>li>span:focus{z-index:2;color:#003a52;background-color:#e2e2e2;border-color:#ddd}.wf-pagination>.wf-active>a,.wf-pagination>.wf-active>a:hover,.wf-pagination>.wf-active>a:focus,.wf-pagination>.wf-active>span,.wf-pagination>.wf-active>span:hover,.wf-pagination>.wf-active>span:focus{z-index:3;color:#fff;background-color:#00709e;border-color:#00709e;cursor:default}.wf-pagination>.wf-disabled>span,.wf-pagination>.wf-disabled>span:hover,.wf-pagination>.wf-disabled>span:focus,.wf-pagination>.wf-disabled>a,.wf-pagination>.wf-disabled>a:hover,.wf-pagination>.wf-disabled>a:focus{color:#777;background-color:#fff;border-color:#ddd;cursor:not-allowed}.wf-pagination-lg>li>a,.wf-pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.33333}.wf-pagination-lg>li:first-child>a,.wf-pagination-lg>li:first-child>span{-moz-border-radius-topleft:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px}.wf-pagination-lg>li:last-child>a,.wf-pagination-lg>li:last-child>span{-moz-border-radius-topright:6px;-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-moz-border-radius-bottomright:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px}.wf-pagination-sm>li>a,.wf-pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.wf-pagination-sm>li:first-child>a,.wf-pagination-sm>li:first-child>span{-moz-border-radius-topleft:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;-moz-border-radius-bottomleft:3px;-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px}.wf-pagination-sm>li:last-child>a,.wf-pagination-sm>li:last-child>span{-moz-border-radius-topright:3px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-moz-border-radius-bottomright:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px}@-ms-viewport{width:device-width}.wf-visible-xs{display:none !important}.wf-visible-sm{display:none !important}.wf-visible-md{display:none !important}.wf-visible-lg{display:none !important}.wf-visible-xs-block,.wf-visible-xs-inline,.wf-visible-xs-inline-block,.wf-visible-sm-block,.wf-visible-sm-inline,.wf-visible-sm-inline-block,.wf-visible-md-block,.wf-visible-md-inline,.wf-visible-md-inline-block,.wf-visible-lg-block,.wf-visible-lg-inline,.wf-visible-lg-inline-block{display:none !important}@media (max-width: 767px){.wf-visible-xs{display:block !important}table.wf-visible-xs{display:table !important}tr.wf-visible-xs{display:table-row !important}th.wf-visible-xs,td.wf-visible-xs{display:table-cell !important}}@media (max-width: 767px){.wf-visible-xs-block{display:block !important}}@media (max-width: 767px){.wf-visible-xs-inline{display:inline !important}}@media (max-width: 767px){.wf-visible-xs-inline-block{display:inline-block !important}}@media (min-width: 768px) and (max-width: 991px){.wf-visible-sm{display:block !important}table.wf-visible-sm{display:table !important}tr.wf-visible-sm{display:table-row !important}th.wf-visible-sm,td.wf-visible-sm{display:table-cell !important}}@media (min-width: 768px) and (max-width: 991px){.wf-visible-sm-block{display:block !important}}@media (min-width: 768px) and (max-width: 991px){.wf-visible-sm-inline{display:inline !important}}@media (min-width: 768px) and (max-width: 991px){.wf-visible-sm-inline-block{display:inline-block !important}}@media (min-width: 992px) and (max-width: 1199px){.wf-visible-md{display:block !important}table.wf-visible-md{display:table !important}tr.wf-visible-md{display:table-row !important}th.wf-visible-md,td.wf-visible-md{display:table-cell !important}}@media (min-width: 992px) and (max-width: 1199px){.wf-visible-md-block{display:block !important}}@media (min-width: 992px) and (max-width: 1199px){.wf-visible-md-inline{display:inline !important}}@media (min-width: 992px) and (max-width: 1199px){.wf-visible-md-inline-block{display:inline-block !important}}@media (min-width: 1200px){.wf-visible-lg{display:block !important}table.wf-visible-lg{display:table !important}tr.wf-visible-lg{display:table-row !important}th.wf-visible-lg,td.wf-visible-lg{display:table-cell !important}}@media (min-width: 1200px){.wf-visible-lg-block{display:block !important}}@media (min-width: 1200px){.wf-visible-lg-inline{display:inline !important}}@media (min-width: 1200px){.wf-visible-lg-inline-block{display:inline-block !important}}@media (max-width: 767px){.wf-hidden-xs{display:none !important}}@media (min-width: 768px) and (max-width: 991px){.wf-hidden-sm{display:none !important}}@media (min-width: 992px) and (max-width: 1199px){.wf-hidden-md{display:none !important}}@media (min-width: 1200px){.wf-hidden-lg{display:none !important}}.wf-visible-print{display:none !important}@media print{.wf-visible-print{display:block !important}table.wf-visible-print{display:table !important}tr.wf-visible-print{display:table-row !important}th.wf-visible-print,td.wf-visible-print{display:table-cell !important}}.wf-visible-print-block{display:none !important}@media print{.wf-visible-print-block{display:block !important}}.wf-visible-print-inline{display:none !important}@media print{.wf-visible-print-inline{display:inline !important}}.wf-visible-print-inline-block{display:none !important}@media print{.wf-visible-print-inline-block{display:inline-block !important}}@media print{.wf-hidden-print{display:none !important}}.wf-container{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}.wf-container:before,.wf-container:after{content:" ";display:table}.wf-container:after{clear:both}@media (min-width: 768px){.wf-container{width:750px}}@media (min-width: 992px){.wf-container{width:970px}}@media (min-width: 1200px){.wf-container{width:1170px}}.wf-container-fluid{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}.wf-container-fluid:before,.wf-container-fluid:after{content:" ";display:table}.wf-container-fluid:after{clear:both}.wf-row{margin-left:-15px;margin-right:-15px}.wf-row:before,.wf-row:after{content:" ";display:table}.wf-row:after{clear:both}.wf-col-xs-1,.wf-col-sm-1,.wf-col-md-1,.wf-col-lg-1,.wf-col-xs-2,.wf-col-sm-2,.wf-col-md-2,.wf-col-lg-2,.wf-col-xs-3,.wf-col-sm-3,.wf-col-md-3,.wf-col-lg-3,.wf-col-xs-4,.wf-col-sm-4,.wf-col-md-4,.wf-col-lg-4,.wf-col-xs-5,.wf-col-sm-5,.wf-col-md-5,.wf-col-lg-5,.wf-col-xs-6,.wf-col-sm-6,.wf-col-md-6,.wf-col-lg-6,.wf-col-xs-7,.wf-col-sm-7,.wf-col-md-7,.wf-col-lg-7,.wf-col-xs-8,.wf-col-sm-8,.wf-col-md-8,.wf-col-lg-8,.wf-col-xs-9,.wf-col-sm-9,.wf-col-md-9,.wf-col-lg-9,.wf-col-xs-10,.wf-col-sm-10,.wf-col-md-10,.wf-col-lg-10,.wf-col-xs-11,.wf-col-sm-11,.wf-col-md-11,.wf-col-lg-11,.wf-col-xs-12,.wf-col-sm-12,.wf-col-md-12,.wf-col-lg-12{position:relative;min-height:1px;padding-left:15px;padding-right:15px;box-sizing:border-box}.wf-col-xs-1,.wf-col-xs-2,.wf-col-xs-3,.wf-col-xs-4,.wf-col-xs-5,.wf-col-xs-6,.wf-col-xs-7,.wf-col-xs-8,.wf-col-xs-9,.wf-col-xs-10,.wf-col-xs-11,.wf-col-xs-12{float:left}.wf-col-xs-1{width:8.33333%}.wf-col-xs-2{width:16.66667%}.wf-col-xs-3{width:25%}.wf-col-xs-4{width:33.33333%}.wf-col-xs-5{width:41.66667%}.wf-col-xs-6{width:50%}.wf-col-xs-7{width:58.33333%}.wf-col-xs-8{width:66.66667%}.wf-col-xs-9{width:75%}.wf-col-xs-10{width:83.33333%}.wf-col-xs-11{width:91.66667%}.wf-col-xs-12{width:100%}.wf-col-xs-pull-0{right:auto}.wf-col-xs-pull-1{right:8.33333%}.wf-col-xs-pull-2{right:16.66667%}.wf-col-xs-pull-3{right:25%}.wf-col-xs-pull-4{right:33.33333%}.wf-col-xs-pull-5{right:41.66667%}.wf-col-xs-pull-6{right:50%}.wf-col-xs-pull-7{right:58.33333%}.wf-col-xs-pull-8{right:66.66667%}.wf-col-xs-pull-9{right:75%}.wf-col-xs-pull-10{right:83.33333%}.wf-col-xs-pull-11{right:91.66667%}.wf-col-xs-pull-12{right:100%}.wf-col-xs-push-0{left:auto}.wf-col-xs-push-1{left:8.33333%}.wf-col-xs-push-2{left:16.66667%}.wf-col-xs-push-3{left:25%}.wf-col-xs-push-4{left:33.33333%}.wf-col-xs-push-5{left:41.66667%}.wf-col-xs-push-6{left:50%}.wf-col-xs-push-7{left:58.33333%}.wf-col-xs-push-8{left:66.66667%}.wf-col-xs-push-9{left:75%}.wf-col-xs-push-10{left:83.33333%}.wf-col-xs-push-11{left:91.66667%}.wf-col-xs-push-12{left:100%}.wf-col-xs-offset-0{margin-left:0%}.wf-col-xs-offset-1{margin-left:8.33333%}.wf-col-xs-offset-2{margin-left:16.66667%}.wf-col-xs-offset-3{margin-left:25%}.wf-col-xs-offset-4{margin-left:33.33333%}.wf-col-xs-offset-5{margin-left:41.66667%}.wf-col-xs-offset-6{margin-left:50%}.wf-col-xs-offset-7{margin-left:58.33333%}.wf-col-xs-offset-8{margin-left:66.66667%}.wf-col-xs-offset-9{margin-left:75%}.wf-col-xs-offset-10{margin-left:83.33333%}.wf-col-xs-offset-11{margin-left:91.66667%}.wf-col-xs-offset-12{margin-left:100%}.wf-col-xs-half-padding-left{padding-left:8px}.wf-col-xs-half-padding-right{padding-right:7px}@media (min-width: 768px){.wf-col-sm-1,.wf-col-sm-2,.wf-col-sm-3,.wf-col-sm-4,.wf-col-sm-5,.wf-col-sm-6,.wf-col-sm-7,.wf-col-sm-8,.wf-col-sm-9,.wf-col-sm-10,.wf-col-sm-11,.wf-col-sm-12{float:left}.wf-col-sm-1{width:8.33333%}.wf-col-sm-2{width:16.66667%}.wf-col-sm-3{width:25%}.wf-col-sm-4{width:33.33333%}.wf-col-sm-5{width:41.66667%}.wf-col-sm-6{width:50%}.wf-col-sm-7{width:58.33333%}.wf-col-sm-8{width:66.66667%}.wf-col-sm-9{width:75%}.wf-col-sm-10{width:83.33333%}.wf-col-sm-11{width:91.66667%}.wf-col-sm-12{width:100%}.wf-col-sm-pull-0{right:auto}.wf-col-sm-pull-1{right:8.33333%}.wf-col-sm-pull-2{right:16.66667%}.wf-col-sm-pull-3{right:25%}.wf-col-sm-pull-4{right:33.33333%}.wf-col-sm-pull-5{right:41.66667%}.wf-col-sm-pull-6{right:50%}.wf-col-sm-pull-7{right:58.33333%}.wf-col-sm-pull-8{right:66.66667%}.wf-col-sm-pull-9{right:75%}.wf-col-sm-pull-10{right:83.33333%}.wf-col-sm-pull-11{right:91.66667%}.wf-col-sm-pull-12{right:100%}.wf-col-sm-push-0{left:auto}.wf-col-sm-push-1{left:8.33333%}.wf-col-sm-push-2{left:16.66667%}.wf-col-sm-push-3{left:25%}.wf-col-sm-push-4{left:33.33333%}.wf-col-sm-push-5{left:41.66667%}.wf-col-sm-push-6{left:50%}.wf-col-sm-push-7{left:58.33333%}.wf-col-sm-push-8{left:66.66667%}.wf-col-sm-push-9{left:75%}.wf-col-sm-push-10{left:83.33333%}.wf-col-sm-push-11{left:91.66667%}.wf-col-sm-push-12{left:100%}.wf-col-sm-offset-0{margin-left:0%}.wf-col-sm-offset-1{margin-left:8.33333%}.wf-col-sm-offset-2{margin-left:16.66667%}.wf-col-sm-offset-3{margin-left:25%}.wf-col-sm-offset-4{margin-left:33.33333%}.wf-col-sm-offset-5{margin-left:41.66667%}.wf-col-sm-offset-6{margin-left:50%}.wf-col-sm-offset-7{margin-left:58.33333%}.wf-col-sm-offset-8{margin-left:66.66667%}.wf-col-sm-offset-9{margin-left:75%}.wf-col-sm-offset-10{margin-left:83.33333%}.wf-col-sm-offset-11{margin-left:91.66667%}.wf-col-sm-offset-12{margin-left:100%}.wf-col-sm-half-padding-left{padding-left:8px}.wf-col-sm-half-padding-right{padding-right:7px}}@media (min-width: 992px){.wf-col-md-1,.wf-col-md-2,.wf-col-md-3,.wf-col-md-4,.wf-col-md-5,.wf-col-md-6,.wf-col-md-7,.wf-col-md-8,.wf-col-md-9,.wf-col-md-10,.wf-col-md-11,.wf-col-md-12{float:left}.wf-col-md-1{width:8.33333%}.wf-col-md-2{width:16.66667%}.wf-col-md-3{width:25%}.wf-col-md-4{width:33.33333%}.wf-col-md-5{width:41.66667%}.wf-col-md-6{width:50%}.wf-col-md-7{width:58.33333%}.wf-col-md-8{width:66.66667%}.wf-col-md-9{width:75%}.wf-col-md-10{width:83.33333%}.wf-col-md-11{width:91.66667%}.wf-col-md-12{width:100%}.wf-col-md-pull-0{right:auto}.wf-col-md-pull-1{right:8.33333%}.wf-col-md-pull-2{right:16.66667%}.wf-col-md-pull-3{right:25%}.wf-col-md-pull-4{right:33.33333%}.wf-col-md-pull-5{right:41.66667%}.wf-col-md-pull-6{right:50%}.wf-col-md-pull-7{right:58.33333%}.wf-col-md-pull-8{right:66.66667%}.wf-col-md-pull-9{right:75%}.wf-col-md-pull-10{right:83.33333%}.wf-col-md-pull-11{right:91.66667%}.wf-col-md-pull-12{right:100%}.wf-col-md-push-0{left:auto}.wf-col-md-push-1{left:8.33333%}.wf-col-md-push-2{left:16.66667%}.wf-col-md-push-3{left:25%}.wf-col-md-push-4{left:33.33333%}.wf-col-md-push-5{left:41.66667%}.wf-col-md-push-6{left:50%}.wf-col-md-push-7{left:58.33333%}.wf-col-md-push-8{left:66.66667%}.wf-col-md-push-9{left:75%}.wf-col-md-push-10{left:83.33333%}.wf-col-md-push-11{left:91.66667%}.wf-col-md-push-12{left:100%}.wf-col-md-offset-0{margin-left:0%}.wf-col-md-offset-1{margin-left:8.33333%}.wf-col-md-offset-2{margin-left:16.66667%}.wf-col-md-offset-3{margin-left:25%}.wf-col-md-offset-4{margin-left:33.33333%}.wf-col-md-offset-5{margin-left:41.66667%}.wf-col-md-offset-6{margin-left:50%}.wf-col-md-offset-7{margin-left:58.33333%}.wf-col-md-offset-8{margin-left:66.66667%}.wf-col-md-offset-9{margin-left:75%}.wf-col-md-offset-10{margin-left:83.33333%}.wf-col-md-offset-11{margin-left:91.66667%}.wf-col-md-offset-12{margin-left:100%}.wf-col-md-half-padding-left{padding-left:8px}.wf-col-md-half-padding-right{padding-right:7px}}@media (min-width: 1200px){.wf-col-lg-1,.wf-col-lg-2,.wf-col-lg-3,.wf-col-lg-4,.wf-col-lg-5,.wf-col-lg-6,.wf-col-lg-7,.wf-col-lg-8,.wf-col-lg-9,.wf-col-lg-10,.wf-col-lg-11,.wf-col-lg-12{float:left}.wf-col-lg-1{width:8.33333%}.wf-col-lg-2{width:16.66667%}.wf-col-lg-3{width:25%}.wf-col-lg-4{width:33.33333%}.wf-col-lg-5{width:41.66667%}.wf-col-lg-6{width:50%}.wf-col-lg-7{width:58.33333%}.wf-col-lg-8{width:66.66667%}.wf-col-lg-9{width:75%}.wf-col-lg-10{width:83.33333%}.wf-col-lg-11{width:91.66667%}.wf-col-lg-12{width:100%}.wf-col-lg-pull-0{right:auto}.wf-col-lg-pull-1{right:8.33333%}.wf-col-lg-pull-2{right:16.66667%}.wf-col-lg-pull-3{right:25%}.wf-col-lg-pull-4{right:33.33333%}.wf-col-lg-pull-5{right:41.66667%}.wf-col-lg-pull-6{right:50%}.wf-col-lg-pull-7{right:58.33333%}.wf-col-lg-pull-8{right:66.66667%}.wf-col-lg-pull-9{right:75%}.wf-col-lg-pull-10{right:83.33333%}.wf-col-lg-pull-11{right:91.66667%}.wf-col-lg-pull-12{right:100%}.wf-col-lg-push-0{left:auto}.wf-col-lg-push-1{left:8.33333%}.wf-col-lg-push-2{left:16.66667%}.wf-col-lg-push-3{left:25%}.wf-col-lg-push-4{left:33.33333%}.wf-col-lg-push-5{left:41.66667%}.wf-col-lg-push-6{left:50%}.wf-col-lg-push-7{left:58.33333%}.wf-col-lg-push-8{left:66.66667%}.wf-col-lg-push-9{left:75%}.wf-col-lg-push-10{left:83.33333%}.wf-col-lg-push-11{left:91.66667%}.wf-col-lg-push-12{left:100%}.wf-col-lg-offset-0{margin-left:0%}.wf-col-lg-offset-1{margin-left:8.33333%}.wf-col-lg-offset-2{margin-left:16.66667%}.wf-col-lg-offset-3{margin-left:25%}.wf-col-lg-offset-4{margin-left:33.33333%}.wf-col-lg-offset-5{margin-left:41.66667%}.wf-col-lg-offset-6{margin-left:50%}.wf-col-lg-offset-7{margin-left:58.33333%}.wf-col-lg-offset-8{margin-left:66.66667%}.wf-col-lg-offset-9{margin-left:75%}.wf-col-lg-offset-10{margin-left:83.33333%}.wf-col-lg-offset-11{margin-left:91.66667%}.wf-col-lg-offset-12{margin-left:100%}.wf-col-lg-half-padding-left{padding-left:8px}.wf-col-lg-half-padding-right{padding-right:7px}}.wrap.wordfence{direction:ltr}@media (min-width: 768px){.wrap.wordfence{max-width:750px}}@media (min-width: 992px){.wrap.wordfence{max-width:970px}}@media (min-width: 1200px){.wrap.wordfence{max-width:1170px}}.wrap.wordfence>.wf-container-fluid{padding-left:0px;padding-right:0px}.wrap.wordfence .button-primary{text-align:center;text-transform:uppercase;font-weight:bold;background-color:#00709e}.wrap.wordfence a{text-decoration:none}.wrap.wordfence a:hover{text-decoration:underline}.wrap.wordfence a.wf-btn:hover{text-decoration:none}.wrap.wordfence p,.wrap.wordfence td,.wrap.wordfence li{font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:.875rem;color:#2d2d2d;line-height:1.3125;font-weight:normal}.wrap.wordfence p strong,.wrap.wordfence td strong,.wrap.wordfence li strong{font-weight:600}.wrap.wordfence p em,.wrap.wordfence td em,.wrap.wordfence li em{font-weight:normal}.wrap.wordfence h1,.wrap.wordfence h2,.wrap.wordfence h3,.wrap.wordfence h4,.wrap.wordfence h5,.wrap.wordfence h6{font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;color:#2d2d2d;font-weight:700}.wrap.wordfence h2{font-size:1.3125rem;line-height:1.5}.wrap.wordfence h3{font-size:1.125rem}.wrap.wordfence h4{font-size:1rem}a{color:#00709e}.wf-inline-help{color:#9f9fa0}.wf-inline-help:hover{color:#00709e}.wordfenceWrap{margin:20px 0 0 20px}.wordfence-icon32{width:32px;height:32px;background-position:0 0;background-repeat:no-repeat;padding:0;margin:7px 5px 0 0;float:left}#wfHeading:after{content:'.';visibility:hidden;display:block;clear:both;height:0px}.wordfence-lock-icon{background-image:url(../images/wordfence-logo-32x32.png)}a.wfhelp{margin:0 3px 0 3px;text-decoration:none;display:inline-block;vertical-align:middle;font:normal normal normal 14px/1 FontAwesome;text-rendering:auto;-webkit-font-smoothing:antialiased}a.wfhelp:before{content:'\f29c'}.wordfence .resulticon{display:block;float:left;width:16px;height:16px;background-position:0 0;background-repeat:no-repeat;border-width:0;padding:0;margin:0 3px 0 0;background-image:url(../images/icons/bullet_yellow.png)}.wordfenceBoldTD{font-weight:bold}.wfAjax24{display:none;width:24px;height:24px;background-image:url(../images/icons/ajax24.gif);margin:0;padding:0}div.wfLoadingWhite32{width:32px;height:32px;background-image:url(../images/icons/ajaxWhite32x32.gif);margin:0;padding:0}.wfTabsContainer{background-color:#FFF;overflow:hidden;border:1px solid #CCC;padding:15px;min-height:200px;-webkit-font-smoothing:antialiased}#wfTabs::after{content:".";display:block;height:0;width:0;line-height:0;clear:both;visibility:hidden}#wfTabs a{float:left;z-index:10;height:18px;margin:0 5px -1px 0;padding:5px 8px;border:1px solid #CCC;text-decoration:none;background-color:#EFEFEF;color:#21759B;-moz-border-radius-topright:3px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-moz-border-radius-topleft:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px}#wfTabs a.selected{border-bottom:1px solid #FFF;background-color:#FFF;color:#777}.wordfenceTopTab{display:none;margin-top:15px}.wordfenceTopTab.active{display:block}.wordfenceHelpLink{margin-top:15px}.wfAjaxLight128{background-image:url(../images/icons/ajax3.gif)}.wfStrong{font-weight:bold}.wordfenceModeElem{width:1px;height:1px;opacity:0}.wfWarn{color:#F00}.wf-flag{display:inline-block;vertical-align:middle;margin:0px 2px 0 0;background-repeat:no-repeat;background-position:center center;width:16px;height:11px;background-image:url(../images/flags.png);-webkit-flex-shrink:0;flex-shrink:0;-webkit-flex-grow:0;flex-grow:0}.wfHitTime{font-style:italic}.wfAvatar img{vertical-align:middle;margin-right:0.5rem}.wf-hex-sequence{color:#587ECB}.wfLoadMoreButton.disabled,.wfLoadMoreButton[disabled]{pointer-events:none;opacity:0.65}table.wfConfigForm th{font-weight:normal;text-align:left;padding:2px 3px 1px 0;vertical-align:middle}table.wfConfigForm td{vertical-align:middle}table.wfConfigForm td.align-top{vertical-align:top}table th.wfConfigEnable{font-weight:bold;min-width:25%}.wfSavedMsg{display:none;color:#A00}table th.wfSubheading{font-weight:bold;padding-top:10px}h3.wfConfigHeading{font-size:22px;color:#777;font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;font-style:italic;font-weight:normal}.wfTipText{color:#777;font-family:Georgia,Times New Roman,Times,serif;font-style:italic}.wfBlackCursor{color:#FFF}.wf-spinner{display:inline-block;width:4px}.wferror{color:#F00}#wordfenceWorking{padding:10px 40px 6px 16px;z-index:100000;position:fixed;right:16px;bottom:0px;background-color:#fcb214;border:5px solid #fcb214;border-width:6px 15px 6px 6px;color:#525355;font-size:12px;font-weight:bold;font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;background-image:url("../images/icons/working-indicator.gif");background-position:100% 50%;background-repeat:no-repeat}@media (max-width: 960px){#wordfenceWorking{left:auto;right:0px}}#paidWrap{position:relative}.paidInnerMsg{width:500px;margin:150px auto 0 auto;color:#000;font-size:18px;font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;line-height:1.8em;text-align:center;-webkit-font-smoothing:antialiased}.wfMarker{height:1px;width:1px}.wfPaidOnlyNotice{width:500px;background-color:#FFFFE0;border:1px solid #000;padding:10px;margin:20px}.wfOnOffSwitch{display:inline-block;position:relative !important;width:69px !important;-webkit-user-select:none !important;-moz-user-select:none !important;-ms-user-select:none !important;user-select:none !important}.wfOnOffSwitch-checkbox{display:none !important}.wfOnOffSwitch-label{display:block !important;overflow:hidden !important;cursor:pointer !important;border:2px solid #999999 !important;border-radius:19px !important;margin:0}.wfOnOffSwitch-inner{width:200% !important;margin-left:-100% !important;-webkit-transition:margin 0.3s ease-in !important;-o-transition:margin 0.3s ease-in !important;transition:margin 0.3s ease-in !important;-webkit-transition-delay:0s !important;transition-delay:0s !important}.wfOnOffSwitch-inner:before,.wfOnOffSwitch-inner:after{float:left !important;width:50% !important;height:19px !important;padding:0 !important;line-height:19px !important;font-size:14px !important;color:white !important;font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif !important;font-weight:bold !important;-webkit-box-sizing:border-box !important;-moz-box-sizing:border-box !important;box-sizing:border-box !important;-moz-border-radius:19px !important;-webkit-border-radius:19px;border-radius:19px !important;-webkit-box-shadow:0 9.5px 0 rgba(0,0,0,0.08) inset !important;box-shadow:0 9.5px 0 rgba(0,0,0,0.08) inset !important}.wfOnOffSwitch-inner:before{content:"ON" !important;padding-left:10px !important;background-color:#30D965 !important;color:#FFFFFF !important;-moz-border-radius:19px 0 0 19px !important;-webkit-border-radius:19px;border-radius:19px 0 0 19px !important}.wfOnOffSwitch-inner:after{content:"OFF" !important;padding-right:10px !important;background-color:#EEEEEE !important;color:#999999 !important;text-align:right !important;-moz-border-radius:0 19px 19px 0 !important;-webkit-border-radius:0;border-radius:0 19px 19px 0 !important}.wfOnOffSwitch-switch{width:19px !important;margin:0 !important;background:#FFFFFF !important;border:2px solid #999999 !important;-moz-border-radius:19px !important;-webkit-border-radius:19px;border-radius:19px !important;position:absolute !important;top:0 !important;bottom:0 !important;right:46px !important;-webkit-transition:all 0.3s ease-in !important;-o-transition:all 0.3s ease-in !important;transition:all 0.3s ease-in !important;-webkit-transition-delay:0s !important;transition-delay:0s !important;background-image:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwLjEiLz48c3RvcCBvZmZzZXQ9IjgwJSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwLjAiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJ1cmwoI2dyYWQpIiAvPjwvc3ZnPiA=') !important;background-size:100%;background-image:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(0,0,0,0.1)),color-stop(80%, rgba(0,0,0,0))) !important;background-image:-moz-linear-gradient(center top, rgba(0,0,0,0.1) 0%,rgba(0,0,0,0) 80%) !important;background-image:-webkit-linear-gradient(center top, rgba(0,0,0,0.1) 0%,rgba(0,0,0,0) 80%) !important;background-image:linear-gradient(to center bottom, rgba(0,0,0,0.1) 0%,rgba(0,0,0,0) 80%) !important;box-shadow:0 1px 1px white inset !important}.wfOnOffSwitch-checkbox:checked+.wfOnOffSwitch-label .wfOnOffSwitch-inner{margin-left:0 !important}.wfOnOffSwitch-checkbox:checked+.wfOnOffSwitch-label .wfOnOffSwitch-switch{right:0 !important}#wordfenceConfigWarning,#wordfenceAdminEmailWarning{clear:left;margin-top:5px}.wf-striped-table{width:100%;max-width:100%;border-collapse:collapse}.wf-striped-table th{border-left:1px solid #bdbdbd}.wf-striped-table th:first-of-type{border-left:0}.wf-striped-table th,.wf-striped-table td{padding:1rem}.wf-striped-table thead th,.wf-striped-table thead td,.wf-striped-table tfoot th,.wf-striped-table tfoot td,.wf-striped-table tbody.thead th,.wf-striped-table tbody.thead td{background-color:#ebebeb;color:#777;font-weight:bold;text-align:left}.wf-striped-table tbody tr.even td,.wf-striped-table tbody tr:nth-child(2n) td{background-color:#ffffff}.wf-striped-table tbody tr td,.wf-striped-table tbody tr.odd td{background-color:#fafafa}.wf-striped-table tbody tr:hover>td{background-color:#fffbd8}.wf-striped-table tbody.empty-row tr td{border-width:0;padding:8px 0;background-color:transparent}.wf-striped-table .wf-result-error,.wf-block-list .wf-result-error{color:#d0514c !important;font-weight:bold}.wf-striped-table .wf-result-error:before,.wf-block-list .wf-result-error:before{content:"\2718"}.wf-striped-table .wf-result-success{max-width:20%}.wf-striped-table .wf-result-success,.wf-block-list .wf-result-success{color:#008c10 !important;font-weight:bold}.wf-striped-table .wf-result-success:before,.wf-block-list .wf-result-success:before{content:"\2713"}.wf-striped-table .wf-result-success:before,.wf-block-list .wf-result-success:before,.wf-striped-table .wf-result-error:before,.wf-block-list .wf-result-error:before{font-size:16px;display:inline-block;margin:0px 8px 0px 0px}.wf-striped-table .wf-result-inactive,.wf-block-list .wf-result-inactive{font-weight:bold;color:#666666 !important}.wf-fixed-table{table-layout:fixed}pre.wf-pre{margin:8px 0 20px;padding:12px;background:#ffffff;border:1px solid #999999;overflow:auto}.wf-center{text-align:center}#wfConfigForm,.wf-diagnostics-wrapper{max-width:1035px}.wf-hidden{display:none !important}.wf-card{position:relative;margin:0 auto .625rem;padding:1rem;box-sizing:border-box;background:#fff;box-shadow:0 0 0 1px rgba(200,215,225,0.5),0 1px 2px #e9eff3}.wf-card .wf-card-inner{min-height:76px;width:100%;padding:8px;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;position:relative}.wf-card .wf-card-inner .wf-card-content{max-width:75%}.wf-card .wf-card-inner .wf-card-content .wf-card-title{font-size:1.125rem;width:100%}.wf-card .wf-card-inner .wf-card-content .wf-card-subtitle{margin-top:.125rem;margin-bottom:.125rem;font-size:.875rem;color:#4f748e}.wf-card .wf-card-inner .wf-card-action{position:absolute;top:0;right:0;height:100%;background:none;border:0;outline:0;width:48px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;vertical-align:middle;transition:transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275),color 0.2s ease-in}.wf-card .wf-card-inner .wf-card-action .wf-card-action-chevron{background:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJjaGV2cm9uLW9iamVjdCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiCgkgd2lkdGg9IjI0cHgiIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAyNCAyNCIKCSB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHBhdGggaWQ9ImNoZXZyb24iIGQ9Ik0yMCA5bC04IDgtOC04IDEuNDE0LTEuNDE0TDEyIDE0LjE3Mmw2LjU4Ni02LjU4NiIvPgo8L3N2Zz4K");background-repeat:no-repeat;background-position:center center;width:24px;height:24px;fill:#87a6bc}.wf-card .wf-card-inner .wf-card-action .wf-card-action-checkbox{background-image:url(../images/checkbox.png);background-repeat:no-repeat;background-position:left center;width:29px;height:29px}.wf-card .wf-card-inner .wf-card-action .wf-card-action-checkbox.checked{background-position:right center}.wf-card .wf-card-extra{display:none;padding:0.5rem;margin-top:1rem;border-top:1px solid #f3f6f8}@media (min-width: 768px){.wf-card .wf-card-extra{padding:1rem}}.wf-card.active .wf-card-extra{display:block}.wf-card.wf-card-left .wf-card-content{margin-left:48px}.wf-card.wf-card-left .wf-card-action{right:auto;left:0px}.wf-card.disabled .wf-card-content .wf-card-title{color:#aaaaaa}.wf-card.disabled .wf-card-content .wf-card-subtitle{color:#8ea6be}.wf-inline-block{display:inline-block}@media (max-width: 767px){.wf-inline-block-xs{display:inline-block}}.wf-full-width{width:100%;max-width:100%}.wf-no-top{margin-top:0 !important}.wf-add-top{margin-top:1rem !important}.wf-add-top-large{margin-top:1.5rem !important}.wf-add-top-medium{margin-top:0.75rem !important}.wf-add-top-small{margin-top:0.5rem !important}.wf-add-top-smaller{margin-top:0.25rem !important}.wf-no-bottom{margin-bottom:0 !important}.wf-add-bottom{margin-bottom:1rem !important}.wf-add-bottom-large{margin-bottom:1.5rem !important}.wf-add-bottom-medium{margin-bottom:0.75rem !important}.wf-add-bottom-small{margin-bottom:0.5rem !important}.wf-add-bottom-smaller{margin-bottom:0.25rem !important}.wf-padding-no-top{padding-top:0 !important}.wf-no-right{margin-right:0 !important}.wf-padding-no-bottom{padding-bottom:0 !important}.wf-padding-no-left{padding-left:0 !important}.wf-padding-no-right{padding-right:0 !important}.wf-padding-add-top{padding-top:1rem !important}.wf-padding-add-top-small{padding-top:0.5rem !important}.wf-padding-add-top-medium{padding-top:0.75rem !important}.wf-padding-add-top-large{padding-top:1.5rem !important}.wf-padding-add-bottom{padding-bottom:1rem !important}.wf-padding-add-bottom-small{padding-bottom:0.5rem !important}.wf-padding-add-bottom-medium{padding-bottom:0.75rem !important}.wf-padding-add-bottom-large{padding-bottom:1.5rem !important}.wf-padding-add-left{padding-left:1rem !important}.wf-padding-add-left-small{padding-left:0.5rem !important}.wf-padding-add-left-medium{padding-left:0.75rem !important}.wf-padding-add-left-large{padding-left:1.5rem !important}.wf-padding-add-right{padding-right:1rem !important}.wf-padding-add-right-small{padding-right:0.5rem !important}.wf-padding-add-right-medium{padding-right:0.75rem !important}.wf-padding-add-right-large{padding-right:1.5rem !important}.wf-left{text-align:left !important}.wf-center{text-align:center !important}.wf-block-center{margin:0 auto}.wf-right{text-align:right !important}.wf-block-right{margin:0 0 0 auto}@media (max-width: 767px){.wf-left-xs{text-align:left !important}.wf-center-xs{text-align:center !important}.wf-padding-add-top-xs{padding-top:1rem !important}.wf-padding-add-top-xs-small{padding-top:0.5rem !important}.wf-padding-add-top-xs-large{padding-top:1.5rem !important}.wf-padding-add-bottom-xs{padding-bottom:1rem !important}.wf-padding-add-bottom-xs-small{padding-bottom:0.5rem !important}.wf-padding-add-bottom-xs-large{padding-bottom:1.5rem !important}}@media (min-width: 768px) and (max-width: 991px){.wf-left-sm{text-align:left !important}.wf-center-sm{text-align:center !important}}@media (min-width: 992px) and (max-width: 1199px){.wf-left-md{text-align:left !important}.wf-center-md{text-align:center !important}.wf-right-md{text-align:right !important}}@media (min-width: 1200px){.wf-left-lg{text-align:left !important}.wf-center-lg{text-align:center !important}.wf-right-lg{text-align:right !important}}.wf-border-no-top{border-top:none !important}.wf-border-no-right{border-right:none !important}.wf-border-no-bottom{border-bottom:none !important}.wf-border-no-left{border-left:none !important}.wf-overflow-x-auto{overflow-x:auto}.wf-overflow-y-auto{overflow-y:auto}@media (max-width: 767px){.wf-overflow-x-auto-xs{overflow-x:auto}.wf-overflow-y-auto-xs{overflow-y:auto}}.wf-blue{color:#00709e !important}.wf-blue-light{color:#008cc1 !important}.wf-gray-dark{color:#2d2d2d !important}.wf-gray-blue{color:#3f596b !important}.wf-green-dark{color:#11967a !important}.wf-green-light{color:#16bc9b !important}.wf-red-dark{color:#930000 !important}.wf-red-light{color:#c10000 !important}.wf-yellow-dark{color:#fcb214 !important}.wf-yellow-light{color:#ffd10a !important}.wf-gray{color:#525355 !important}.wf-gray-light{color:#9f9fa0 !important}.wf-nowrap{white-space:nowrap}.wf-tip{color:#fcb214;font-size:1.1rem;margin-right:0.25rem}.wf-text-small{font-size:80%}.wf-scroll-x::-webkit-scrollbar,.wf-scroll-y::-webkit-scrollbar{-webkit-appearance:none;width:7px;height:7px}.wf-scroll-x::-webkit-scrollbar-thumb,.wf-scroll-y::-webkit-scrollbar-thumb{border-radius:4px;background-color:rgba(0,0,0,0.194);-webkit-box-shadow:0 0 1px rgba(255,255,255,0.5)}.wf-split-word{word-wrap:break-word;word-break:break-all}@media (max-width: 767px){.wf-split-word-xs{word-wrap:break-word;word-break:break-all;white-space:normal !important}}.wfselect2-container{font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;min-width:200px}@media (min-width: 768px){.wfselect2-container{min-width:280px}}@media (min-width: 992px){.wfselect2-container{min-width:320px}}@media (max-width: 767px){.wfselect2-container .wfselect2-search.wfselect2-search--inline{margin:0 !important}}.wf-select2-placeholder-fix .wfselect2-search__field{width:auto !important}#wf-all-options-search .wfselect2-container{min-width:250px}#wf-all-options-search .wf-select2-placeholder-fix .wfselect2-search__field{margin-top:10px !important}.wf-page-title{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;margin-top:0.5rem}.wf-page-title>*{-webkit-flex-grow:0;flex-grow:0;min-width:0}.wf-page-title>*:first-child{-webkit-flex-grow:0;flex-grow:0;min-width:32px;-webkit-flex-basis:32px;flex-basis:32px;padding-right:0.25rem}.wf-page-title .wordfence-icon32{margin:0;margin-right:0.5rem}.wf-page-title h2{padding:0 !important}.wf-page-title .wfOnOffSwitch{-webkit-flex-basis:69px;flex-basis:69px;-webkit-flex-shrink:0;flex-shrink:0;margin-left:0.5rem}.wf-tab-container{background-color:#fff}@media (min-width: 768px){.wf-tab-container{background-color:unset}}.wf-page-tabs,.wf-page-fixed-tabs{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;border-bottom:1px solid #d0d0d0;margin:0;margin-top:0.5rem;margin-left:-10px;margin-right:-10px}@media (min-width: 768px){.wf-page-tabs,.wf-page-fixed-tabs{margin-left:0;margin-right:0}}.wf-page-tabs>*,.wf-page-fixed-tabs>*{-webkit-flex-grow:0;flex-grow:0;min-width:0}.wf-page-tabs>*:first-child,.wf-page-fixed-tabs>*:first-child{-webkit-flex-grow:0;flex-grow:0;min-width:32px;-webkit-flex-basis:32px;flex-basis:32px}.wf-page-tabs .wordfence-icon32,.wf-page-fixed-tabs .wordfence-icon32{margin:0;margin-right:0.5rem;margin-left:0.5rem}@media (min-width: 768px){.wf-page-tabs .wordfence-icon32,.wf-page-fixed-tabs .wordfence-icon32{margin-left:0}}.wf-page-tabs .wf-text-tab,.wf-page-fixed-tabs .wf-text-tab{margin:0;margin-left:0.5rem;color:#333}.wf-page-tabs .wf-tab,.wf-page-fixed-tabs .wf-tab{border:1px solid #fff;border-top-right-radius:0.5rem;border-top-left-radius:0.5rem;border-bottom:none;margin-bottom:-1px;margin-right:0.5rem;color:#333}@media (min-width: 768px){.wf-page-tabs .wf-tab,.wf-page-fixed-tabs .wf-tab{border:1px solid #d0d0d0;background:#e6e6e6}}.wf-page-tabs .wf-tab a,.wf-page-fixed-tabs .wf-tab a{display:block;padding:0.5rem 1rem;font-size:14px;line-height:24px;text-decoration:none;font-weight:bold;color:#333}.wf-page-tabs .wf-tab.wf-active,.wf-page-tabs .wf-tab:hover,.wf-page-fixed-tabs .wf-tab.wf-active,.wf-page-fixed-tabs .wf-tab:hover{border-bottom:1px solid #f1f1f1;background:#f1f1f1;color:#00709e;-webkit-box-shadow:none;box-shadow:none}.wf-page-tabs .wf-tab.wf-active a,.wf-page-tabs .wf-tab:hover a,.wf-page-fixed-tabs .wf-tab.wf-active a,.wf-page-fixed-tabs .wf-tab:hover a{color:#00709e}.wf-tab-content{display:none;margin-top:15px}.wf-tab-content.wf-active{display:block}.wf-fixed-tab-content{margin-top:15px}.wf-section-title{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start}.wf-section-title>*{-webkit-flex-grow:0;flex-grow:0;min-width:0}.wf-section-title>h1,.wf-section-title>h2,.wf-section-title>h3,.wf-section-title>h4,.wf-section-title>h5,.wf-section-title>h6{-webkit-flex-grow:1;flex-grow:1;color:#2d2d2d !important;font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif !important;line-height:1.5rem !important;font-weight:700 !important;padding:0 !important;margin:0 !important}@media (min-width: 768px){.wf-section-title>h1,.wf-section-title>h2,.wf-section-title>h3,.wf-section-title>h4,.wf-section-title>h5,.wf-section-title>h6{padding-right:0.25rem !important}}.wf-section-title h2{font-size:1.3125rem;line-height:1.5}.wf-section-title h3{font-size:1.125rem}.wf-section-title h4{font-size:1rem}.wf-section-title .wordfence-icon32{margin:0;margin-right:0.5rem}.wf-status-circular{position:relative}.wf-status-circular-text{position:absolute;left:50%;top:50%;padding:0;margin:0;transform:translate(-50%, -50%);color:#aaa;font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:1.3125rem;font-weight:300;line-height:1.5}.wf-status-circular .wf-status-overlay-text{position:absolute;left:50%;top:50%;padding:0;margin:0;width:200%;text-align:center;transform:translate(-50%, -50%);font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:.875rem;font-weight:normal;line-height:1.3125;opacity:0.0;color:#777}.wf-status-warning,.wf-status-critical,.wf-status-payment-expiring,.wf-status-renewing{width:100px;height:100px;margin-bottom:1rem}.wf-status-warning svg path{fill:#fcb214}.wf-status-critical svg path{fill:#930000}.wf-status-payment-expiring svg rect,.wf-status-payment-expiring svg path{fill:#930000}.wf-status-renewing svg rect,.wf-status-renewing svg path{fill:#11967a}#howGetIPs-preview{color:#8c8c8c}#howGetIPs-preview strong{color:#666}.wf-scrollTop{background:#424242;bottom:30px;right:15px;position:fixed;z-index:999;display:none}.wf-scrollTop a{background:#959595;display:block;padding:4px 5px;line-height:32px;width:32px;color:#ffffff;text-align:center}.wf-back-icon{color:#00709e;margin-right:0.75rem;font-size:1.5rem !important}.wf-back-link-chevron{margin-left:1rem}.wf-back-link-chevron:first-of-type{margin-left:0}.wf-back-link{font-weight:bold;text-decoration:none}.wf-premium-link{font-weight:bold}.wf-boolean-switch{border:1px solid #aaa;display:block;cursor:pointer;width:54px;height:30px;min-width:54px;min-height:30px;-moz-border-radius:15px;-webkit-border-radius:15px;border-radius:15px;line-height:30px !important;background-color:#ffffff;position:relative;box-sizing:border-box;transition:background-color 0.2s ease-in-out, border-color 0.2s ease-in-out}@media (min-width: 768px){.wf-boolean-switch{width:34px;height:20px;min-width:34px;min-height:20px;-moz-border-radius:10px;-webkit-border-radius:10px;border-radius:10px;line-height:20px !important}}.wf-boolean-switch .wf-boolean-switch-handle{position:relative;display:block;border:1px solid #aaa;background-color:#fff;width:30px;height:30px;min-width:30px;min-height:30px;-moz-border-radius:15px;-webkit-border-radius:15px;border-radius:15px;margin-top:-1px;box-sizing:border-box;left:-1px;transition:border-color 0.2s ease-in-out, left 0.2s ease-in-out}@media (min-width: 768px){.wf-boolean-switch .wf-boolean-switch-handle{width:20px;height:20px;min-width:20px;min-height:20px;-moz-border-radius:10px;-webkit-border-radius:10px;border-radius:10px}}.wf-boolean-switch.wf-active{border:1px solid #00709e;background-color:#00709e}.wf-boolean-switch.wf-active .wf-boolean-switch-handle{border:1px solid #00709e;left:25px}@media (min-width: 768px){.wf-boolean-switch.wf-active .wf-boolean-switch-handle{left:15px}}.wf-boolean-switch.wf-disabled{pointer-events:none;border-color:#e2e2e2}.wf-boolean-switch.wf-disabled .wf-boolean-switch-handle{border-color:#e2e2e2}.wf-boolean-switch.wf-disabled.wf-active{border-color:#e2e2e2;background-color:#e2e2e2}.wf-boolean-switch.wf-disabled.wf-active .wf-boolean-switch-handle{border-color:#e2e2e2}.wf-option-checkbox,[type=checkbox].wf-option-checkbox+label:before{content:'\f3fd';font-family:"Ionicons" !important;display:block;cursor:pointer;width:30px;height:30px;min-width:30px;min-height:30px;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;line-height:30px !important;text-align:center !important;background-color:#ffffff !important;box-shadow:0px 0px 0px 1px #aaa;color:#ffffff !important;font-size:30px !important;font-weight:normal !important}@media (min-width: 768px){.wf-option-checkbox,[type=checkbox].wf-option-checkbox+label:before{width:20px;height:20px;min-width:20px;min-height:20px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;line-height:21px !important;font-size:25px !important}}@media (min-width: 768px){.wf-option-checkbox{position:relative}.wf-option-checkbox>*{position:absolute;top:9px;left:50%;transform:translateX(-50%) translateY(-50%)}}.wf-option-radio,[type=radio].wf-option-radio+label:before{content:"\f401";font-family:"Ionicons" !important;display:block;cursor:pointer;width:30px;height:30px;min-width:30px;min-height:30px;line-height:30px !important;text-align:center !important;color:#ccc !important;font-size:30px !important;font-weight:normal !important}@media (min-width: 768px){.wf-option-radio,[type=radio].wf-option-radio+label:before{width:20px;height:20px;min-width:20px;min-height:20px;-moz-border-radius:10px;-webkit-border-radius:10px;border-radius:10px;line-height:20px !important}}[type=checkbox].wf-option-checkbox.wf-small+label:before{width:20px;height:20px;min-width:20px;min-height:20px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;line-height:21px !important;font-size:20px !important}[type=radio].wf-option-radio.wf-small+label:before{width:20px;height:20px;min-width:20px;min-height:20px;line-height:21px !important;font-size:20px !important}[type=checkbox].wf-option-checkbox+label:before,[type=radio].wf-option-radio+label:before{text-align:center !important;text-indent:0px;display:inline-block;vertical-align:-6px;margin:0px 5px 0px 0px;font-weight:normal;font-style:normal}[type=checkbox].wf-option-checkbox.wf-small+label:before,[type=radio].wf-option-radio.wf-small+label:before{text-indent:0px;vertical-align:-3px}.wf-option-checkbox.wf-checked,[type=checkbox].wf-option-checkbox:checked+label:before{color:#ffffff !important;box-shadow:0px 0px 0px 1px #00709e !important;background-color:#00709e !important}.wf-option-checkbox.wf-disabled,[type=checkbox].wf-option-checkbox:disabled+label:before{color:#f1f1f1 !important;box-shadow:0px 0px 0px 1px #e2e2e2 !important;background-color:#f1f1f1 !important}.wf-option-checkbox.wf-checked.wf-disabled,[type=checkbox].wf-option-checkbox:disabled:checked+label:before{color:#777 !important;box-shadow:0px 0px 0px 1px #e2e2e2 !important;background-color:#f1f1f1 !important}.wf-option-radio.wf-checked,[type=radio].wf-option-radio:checked+label:before{content:"\f3a7";color:#00709e !important}.wf-option-checkbox[type=checkbox],.wf-option-checkbox[type=radio],.wf-option-radio[type=checkbox],.wf-option-radio[type=radio]{position:absolute;left:-9999px}.wf-option-text input[type="text"],input.wf-input-text{text-align:left;width:100%;height:40px;border-radius:0;border:0;background-color:#ffffff;box-shadow:1px 1px 1px 2px rgba(215,215,215,0.65)}.wf-option-text input[type="text"]:placeholder-shown,input.wf-input-text:placeholder-shown{font-style:italic;color:#bfbfbf}::-webkit-input-placeholder{color:#bfbfbf}:-moz-placeholder{color:#bfbfbf;opacity:1}::-moz-placeholder{color:#bfbfbf;opacity:1}:-ms-input-placeholder{color:#bfbfbf}::-ms-input-placeholder{color:#bfbfbf}::placeholder{color:#bfbfbf}.wf-option-premium .wf-option-title,.wf-option-premium .wf-option-title>ul>li,.wf-option.wf-disabled .wf-option-title,.wf-option.wf-disabled .wf-option-title>ul>li{color:#aaa !important}.wf-option-premium .wf-option-checkbox,.wf-option-premium .wf-option-radio,.wf-option.wf-disabled .wf-option-checkbox,.wf-option.wf-disabled .wf-option-radio{opacity:0.5}.wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status .wf-block-labeled-value-value{padding-top:0}.wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status .wf-block-labeled-value-value .wf-fa{font-size:8rem}.wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status .wf-block-labeled-value-value svg{width:160px}.wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status .wf-block-labeled-value-label{font-size:1.35rem;font-weight:300;padding-bottom:0}.wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status-premium .wf-block-labeled-value-value{color:#9f9fa0}.wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status-premium .wf-block-labeled-value-value svg{fill:#9f9fa0}.wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status-premium .wf-block-labeled-value-label{color:#9f9fa0}.wf-indeterminate-progress{-webkit-animation:wf-indeterminate-progress-keyframes 1s steps(8, end) infinite;-o-animation:wf-indeterminate-progress-keyframes 1s steps(8, end) infinite;animation:wf-indeterminate-progress-keyframes 1s steps(8, end) infinite}.wf-indeterminate-progress path{fill:#00709e}@-moz-keyframes wf-indeterminate-progress-keyframes{to{-moz-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes wf-indeterminate-progress-keyframes{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes wf-indeterminate-progress-keyframes{to{-moz-transform:rotate(360deg);-ms-transform:rotate(360deg);-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.wf-flex-row{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:row;flex-direction:row}.wf-flex-row .wf-flex-row-1{-webkit-flex-grow:1;flex-grow:1}.wf-flex-row .wf-flex-row-0{-webkit-flex-grow:0;flex-grow:0}.wf-switch{display:-webkit-flex !important;display:flex !important;-webkit-align-items:stretch !important;align-items:stretch !important;-webkit-justify-content:flex-start !important;justify-content:flex-start !important;-webkit-flex-direction:row !important;flex-direction:row !important;margin:0;padding:0}.wf-switch>li{margin:0 !important;padding:0.5rem 0.7rem !important;text-transform:uppercase;cursor:pointer;color:#aaa;font-weight:400;border-top:1px solid #bfbfbf;border-bottom:1px solid #bfbfbf;border-right:1px solid #bfbfbf}.wf-switch>li:first-of-type{border-left:1px solid #bfbfbf;-moz-border-radius-topleft:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px}.wf-switch>li:last-of-type{-moz-border-radius-topright:6px;-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-moz-border-radius-bottomright:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px}.wf-switch>li.wf-active{color:#ffffff;background-color:#00709e}.wf-tooltip,.ui-widget.wf-tooltip{max-width:600px;font-size:0.75rem;overflow-wrap:break-word}.wf-widget-learning-mode{border-top:1px solid #eee;margin:0 -1rem;padding:1rem;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;-webkit-flex-direction:row;flex-direction:row}@media (min-width: 768px){.wf-widget-learning-mode{padding:1.5rem}}.wf-widget-learning-mode svg{width:18px}.wf-widget-learning-mode svg path{fill:#aaa}.wf-widget-learning-mode span{padding-left:0.5rem;font-size:.875rem;line-height:1.3125;font-weight:600}.wf-drawer-overlay{position:fixed;top:0px;right:0px;bottom:0px;left:160px;background-color:rgba(0,0,0,0.5);z-index:9980;padding:5rem 0}.folded .wf-drawer-overlay{left:36px}@media only screen and (max-width: 960px){.auto-fold .wf-drawer-overlay{left:36px}}.rtl .wf-drawer-overlay{right:160px;left:0px}.rtl .folded .wf-drawer-overlay{right:36px}@media only screen and (max-width: 960px){.rtl .auto-fold .wf-drawer-overlay{right:36px}}@media screen and (max-width: 782px){.wf-drawer-overlay,.folded .wf-drawer-overlay,.auto-fold .wf-drawer-overlay,.rtl .wf-drawer-overlay,.rtl .folded .wf-drawer-overlay,.rtl .auto-fold .wf-drawer-overlay{left:0px;right:0px}}.wf-drawer{background-color:#ffffff;position:fixed;top:32px;bottom:0px;right:0px;z-index:9981}.wf-drawer .wf-modal{display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:column;flex-direction:column;height:100%}.wf-drawer .wf-modal ul,.wf-drawer .wf-modal li{padding:0;margin:0}.wf-drawer .wf-modal .wf-modal-header{-webkit-flex-shrink:0;flex-shrink:0;min-height:44px;padding:1rem;width:100%;box-sizing:border-box;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between;position:relative;background-color:#00709e;color:#ffffff}.wf-drawer .wf-modal .wf-modal-header .wf-modal-header-content{max-width:75%}.wf-drawer .wf-modal .wf-modal-header .wf-modal-header-content .wf-modal-title{font-size:1.3125rem;line-height:1.5;font-weight:300;width:100%;transition:color 0.2s ease-in}.wf-drawer .wf-modal .wf-modal-header .wf-modal-header-content .wf-modal-subtitle{margin-top:.125rem;margin-bottom:.125rem;font-size:.575rem;color:#4f748e}.wf-drawer .wf-modal .wf-modal-content{-webkit-flex-grow:1;flex-grow:1;display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:column;flex-direction:column;padding:1rem}.wf-drawer .wf-modal .wf-modal-content>*:first-child{margin-top:0}.wf-drawer .wf-modal .wf-modal-content select,.wf-drawer .wf-modal .wf-modal-content select option,.wf-drawer .wf-modal .wf-modal-content .wfselect2-container--default{font-size:0.7rem;font-weight:bold}@media (min-width: 768px){.wf-drawer .wf-modal .wf-modal-content select,.wf-drawer .wf-modal .wf-modal-content select option,.wf-drawer .wf-modal .wf-modal-content .wfselect2-container--default{font-size:0.8rem}}@media (min-width: 992px){.wf-drawer .wf-modal .wf-modal-content select,.wf-drawer .wf-modal .wf-modal-content select option,.wf-drawer .wf-modal .wf-modal-content .wfselect2-container--default{font-size:0.9rem}}.wf-drawer .wf-modal .wf-modal-content .wf-option-select-option,.wf-drawer .wf-modal .wf-modal-content .wfselect2-container--default,.wf-drawer .wf-modal .wf-modal-content .wfselect2-container--default .wfselect2-selection--single{text-align:left;height:40px;border-radius:0;border:0;background-color:#ffffff;box-shadow:1px 1px 1px 2px rgba(215,215,215,0.35)}.wf-drawer .wf-modal .wf-modal-content .wf-option-select-option .wfselect2-selection__rendered,.wf-drawer .wf-modal .wf-modal-content .wfselect2-container--default .wfselect2-selection__rendered,.wf-drawer .wf-modal .wf-modal-content .wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__rendered{color:#333;line-height:40px}.wf-drawer .wf-modal .wf-modal-content .wf-option-select-option .wfselect2-selection__arrow,.wf-drawer .wf-modal .wf-modal-content .wfselect2-container--default .wfselect2-selection__arrow,.wf-drawer .wf-modal .wf-modal-content .wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__arrow{height:38px}.wf-drawer .wf-modal .wf-modal-content .wf-option-select-option.wfselect2-container--disabled .wfselect2-selection__rendered,.wf-drawer .wf-modal .wf-modal-content .wfselect2-container--default.wfselect2-container--disabled .wfselect2-selection__rendered,.wf-drawer .wf-modal .wf-modal-content .wfselect2-container--default .wfselect2-selection--single.wfselect2-container--disabled .wfselect2-selection__rendered{color:#aaa}.wf-drawer .wf-modal .wf-modal-content .wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__arrow b{border-color:#333 transparent transparent}.wf-drawer .wf-modal .wf-modal-content .wfselect2-container--default.wfselect2-container--open .wfselect2-selection--single .wfselect2-selection__arrow b{border-color:transparent transparent #333}.wf-drawer .wf-modal .wf-modal-footer{-webkit-flex-shrink:0;flex-shrink:0;min-height:44px;padding:1rem;width:100%;box-sizing:border-box;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between;position:relative;background-color:#f1f1f1;border-top:1px solid #d9d9d9}.wf-mobile-menu-overlay{position:fixed;top:0px;right:0px;bottom:0px;left:0px;background-color:rgba(0,0,0,0.5);z-index:100000}.wf-mobile-menu-overlay>.wf-mobile-menu-tap-hint{position:absolute;top:25%;left:50%;transform:translateX(-50%);color:#ffffff;font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:1.3125rem;font-weight:300;line-height:1.5}.wf-mobile-menu{position:fixed;left:50%;transform:translateX(-50%);z-index:100001}.wf-mobile-menu>.wf-mobile-menu-items{margin:0;padding:0 0 0.25rem 0;list-style:none}.wf-mobile-menu>.wf-mobile-menu-items>li{margin:0;padding:0.25rem 0}.wf-mobile-menu>.wf-mobile-menu-items>li>a{box-sizing:border-box}.wf-circle-tooltip.ui-tooltip{padding:0;font-size:0.7rem;max-width:400px;border:1px solid #9f9fa0;position:absolute !important;z-index:3000;-moz-border-radius:6px;-webkit-border-radius:6px;border-radius:6px}.wf-circle-tooltip.ui-tooltip h4{margin:0 0 10px}.wf-circle-tooltip.ui-tooltip ul{margin:10px 0}.wf-circle-tooltip.ui-tooltip p{font-size:0.7rem;margin:10px 0 0}.wf-circle-tooltip.ui-tooltip a{color:#00709e;text-decoration:none}.wf-circle-tooltip.ui-tooltip a:hover{text-decoration:underline}.wf-circle-tooltip.ui-tooltip .wf-circle-tooltip-header,.wf-circle-tooltip.ui-tooltip .wf-circle-tooltip-body{padding:12px}.wf-circle-tooltip.ui-tooltip .wf-circle-tooltip-header{-moz-border-radius:6px 6px 0px 0px;-webkit-border-radius:6px;border-radius:6px 6px 0px 0px;background-color:#f1f1f1}.wf-circle-tooltip.ui-tooltip .wf-circle-tooltip-header h4{margin:0;font-size:0.8rem}.wf-circle-tooltip.ui-tooltip .wf-circle-tooltip-body .wf-tooltip-status-circle{position:relative;padding:0 10px 0 0}.wf-circle-tooltip.ui-tooltip .wf-circle-tooltip-body .wf-tooltip-status-circle .wf-status-overlay-text{display:none}.wf-circle-tooltip.ui-tooltip .wf-circle-tooltip-body ul li strong{width:20%}.wf-circle-tooltip.ui-tooltip .wf-circle-tooltip-body ul li span{width:80%}.wf-circle-tooltip.ui-tooltip .wf-circle-tooltip-block{position:relative;background-color:#fff;z-index:3001;-moz-border-radius:6px;-webkit-border-radius:6px;border-radius:6px}.wf-circle-tooltip.ui-tooltip .wf-circle-tooltip-block:after{content:'';position:absolute;bottom:-20px;left:20px;width:0;height:0;border-left:20px solid transparent;border-right:20px solid transparent;border-top:20px solid #fff}.wf-circle-tooltip.ui-tooltip:after{content:'';position:absolute;bottom:-22px;left:18px;width:0;height:0;border-left:22px solid transparent;border-right:22px solid transparent;border-top:22px solid rgba(0,0,0,0.5);filter:blur(2px)}.wf-circle-tooltip.ui-tooltip.wf-tooltip-vertical-top:after{top:-22px;bottom:auto;border-left:22px solid transparent;border-right:22px solid transparent;border-bottom:22px solid rgba(0,0,0,0.5);border-top-width:0}.wf-circle-tooltip.ui-tooltip.wf-tooltip-vertical-top .wf-circle-tooltip-block:after{top:-20px;bottom:auto;border-left:20px solid transparent;border-right:20px solid transparent;border-bottom:20px solid #f1f1f1;border-top-width:0}.wf-circle-tooltip.ui-tooltip.wf-tooltip-vertical-top.wf-tooltip-horizontal-right:after{left:auto;right:18px}.wf-circle-tooltip.ui-tooltip.wf-tooltip-vertical-top.wf-tooltip-horizontal-right .wf-circle-tooltip-block:after{left:auto;right:20px}.wf-circle-tooltip.ui-tooltip.wf-tooltip-vertical-bottom.wf-tooltip-horizontal-right:after{left:auto;right:18px}.wf-circle-tooltip.ui-tooltip.wf-tooltip-vertical-bottom.wf-tooltip-horizontal-right .wf-circle-tooltip-block:after{left:auto;right:20px}#wf-mobile-controls{white-space:nowrap;font-size:1.2rem}.wf-callout-warning{background-color:#feecc4;padding:0.8rem 1.25rem}.wf-tip-light-bulb{color:#fcb214;font-size:1.5rem;font-weight:bold}.wf-tip-info-message{padding-left:0.5rem !important;font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:.875rem;color:#2d2d2d;line-height:1.3125;font-weight:normal}.wf-block{position:relative;margin:0 auto 0.5rem;padding:0 1rem;box-sizing:border-box;background-color:#fff;box-shadow:0 0 0 1px rgba(200,215,225,0.25),0 1px 2px #e9eff3}@media (min-width: 768px){.wf-block{padding:0 1.5rem}}.wf-block.wf-block-no-padding{padding:0}.wf-block.wf-block-transparent{background-color:transparent;box-shadow:none}.wf-block .wf-block-banner{min-height:44px;margin:0 -1rem;padding:0;box-sizing:border-box;position:relative;background-color:#fcb214;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between;-webkit-flex-direction:row;flex-direction:row}.wf-block .wf-block-banner>li{margin:0;padding:0.75rem 1rem}@media (min-width: 768px){.wf-block .wf-block-banner{margin:0 -1.5rem}.wf-block .wf-block-banner>li{padding:0.75rem 1.5rem}}.wf-block .wf-block-header{min-height:44px;padding:1rem 0;width:100%;box-sizing:border-box;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between;position:relative}.wf-block .wf-block-header .wf-block-header-content{max-width:75%}.wf-block .wf-block-header .wf-block-header-content .wf-block-title{font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:0.9rem;width:100%;transition:color 0.2s ease-in}.wf-block .wf-block-header .wf-block-header-content .wf-block-subtitle{margin-top:.125rem;margin-bottom:.125rem;font-size:0.775rem}.wf-block .wf-block-header .wf-block-header-action{position:absolute;top:0;right:0;height:100%;background:none;border:0;outline:0;width:48px;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-end;justify-content:flex-end;vertical-align:middle;transition:transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275),color 0.2s ease-in}.wf-block .wf-block-header .wf-block-header-action.wf-block-header-action-text{width:auto}.wf-block .wf-block-header .wf-block-header-action.wf-block-header-action-text.wf-block-header-action-text-success{color:#11967a}.wf-block .wf-block-header .wf-block-header-action.wf-block-header-action-text.wf-block-header-action-text-warning{color:#930000}.wf-block .wf-block-header .wf-block-header-action.wf-block-header-action-text.wf-block-header-action-text-warning a{color:#930000}.wf-block .wf-block-header .wf-block-header-action .wf-block-header-action-chevron{background:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJjaGV2cm9uLW9iamVjdCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiCgkgd2lkdGg9IjI0cHgiIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAyNCAyNCIKCSB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHBhdGggaWQ9ImNoZXZyb24iIGQ9Ik0yMCA5bC04IDgtOC04IDEuNDE0LTEuNDE0TDEyIDE0LjE3Mmw2LjU4Ni02LjU4NiIvPgo8L3N2Zz4K");background-repeat:no-repeat;background-position:center center;width:24px;height:24px}.wf-block .wf-block-header .wf-block-header-action .wf-block-header-action-disclosure{background:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJkaXNjbG9zdXJlLWNsb3NlZC1vYmplY3QiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHdpZHRoPSIxMnB4IiBoZWlnaHQ9IjEycHgiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMTIgMTIiCgkgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxwYXRoIGlkPSJkaXNjbG9zdXJlLWNsb3NlZCIgZD0iTSA2IDAgbCA2IDYgLTYgNiAwIC0xMiIgZmlsbD0iIzc3NyIvPgo8L3N2Zz4=");background-repeat:no-repeat;background-position:center center;width:12px;height:12px;transition:transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275),background 0.2s ease-in}.wf-block .wf-block-header .wf-block-header-action .wf-block-header-action-checkbox{background-image:url(../images/checkbox.png);background-repeat:no-repeat;background-position:left center;width:29px;height:29px}.wf-block .wf-block-header .wf-block-header-action .wf-block-header-action-checkbox.wf-checked{background-position:right center}.wf-block .wf-block-content{display:none;margin:0 -1rem;padding:0 1rem}@media (min-width: 768px){.wf-block .wf-block-content{margin:0 -1.5rem;padding:0 1.5rem}}.wf-block .wf-block-content .wf-block-list{margin:0 -1rem;padding:0;list-style:none}@media (min-width: 768px){.wf-block .wf-block-content .wf-block-list{margin:0 -1.5rem}}.wf-block .wf-block-content .wf-block-list.wf-block-list-striped>li:nth-of-type(odd){background-color:#f9f9f9}.wf-block .wf-block-content .wf-block-list.wf-block-list-striped>li:nth-of-type(even){background-color:#ffffff}.wf-block .wf-block-content .wf-block-list>li{display:block;min-height:44px;padding:0 1rem;margin:0;border-top:1px solid #e2e2e2;box-sizing:border-box;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between}@media (min-width: 768px){.wf-block .wf-block-content .wf-block-list>li{padding:0 1.5rem}}.wf-block .wf-block-content .wf-block-list>li>*:first-child{-webkit-flex-grow:1;flex-grow:1;min-width:0}.wf-block .wf-block-content .wf-block-list.wf-block-list-horizontal{box-sizing:border-box;margin-top:-1px;display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-align-content:flex-start;align-content:flex-start;-webkit-justify-content:space-between;justify-content:space-between;-webkit-flex-wrap:wrap;flex-wrap:wrap}.wf-block .wf-block-content .wf-block-list.wf-block-list-horizontal>li{-webkit-flex-grow:1;flex-grow:1;-webkit-flex-basis:100%;flex-basis:100%;border-left:1px solid #e2e2e2}@media (min-width: 768px){.wf-block .wf-block-content .wf-block-list.wf-block-list-horizontal>li{-webkit-flex-basis:50%;flex-basis:50%}}@media (min-width: 992px){.wf-block .wf-block-content .wf-block-list.wf-block-list-horizontal>li{-webkit-flex-basis:25%;flex-basis:25%}}.wf-block .wf-block-content .wf-block-list.wf-block-list-horizontal.wf-block-list-nowrap{overflow-y:auto;-webkit-flex-wrap:nowrap;flex-wrap:nowrap}.wf-block .wf-block-content .wf-block-list.wf-block-list-horizontal.wf-block-list-nowrap>li{-webkit-flex-shrink:0;flex-shrink:0}.wf-block .wf-block-content .wf-block-list.wf-block-list-horizontal.wf-block-list-horizontal-5>li{-webkit-flex-grow:1;flex-grow:1;-webkit-flex-basis:20%;flex-basis:20%}.wf-block .wf-block-content .wf-block-list.wf-block-list-horizontal>*:first-child{border-left:0}@media (min-width: 768px){.wf-block .wf-block-content .wf-block-list.wf-block-list-horizontal.wf-block-list-equal>li{max-width:50%}}@media (min-width: 992px){.wf-block .wf-block-content .wf-block-list.wf-block-list-horizontal.wf-block-list-equal>li{max-width:25%}}.wf-block .wf-block-content .wf-block-list.wf-block-list-horizontal.wf-block-list-horizontal-5.wf-block-list-equal>li{max-width:20%}.wf-block .wf-block-content .wf-block-list .wf-block-list-state{text-align:center}@media (min-width: 1200px){.wf-block .wf-block-content .wf-block-list .wf-block-list-state{text-align:left}}.wf-block .wf-block-content .wf-block-list .wf-block-list-state-enabled .wf-fa{color:#11967a}.wf-block .wf-block-content .wf-block-list .wf-block-list-state-disabled .wf-fa{color:#525355}.wf-block .wf-block-content .wf-block-list .wf-block-list-state-premium{color:#9f9fa0}.wf-block .wf-block-content .wf-block-list .wf-block-list-dismiss{padding-left:2rem;font-size:1.25rem}.wf-block .wf-block-content .wf-block-list .wf-block-list-dismiss a{color:#525355}.wf-block .wf-block-content:first-child>.wf-block-list>li:first-child{border-top:none}.wf-block .wf-block-content .wf-block-left-right{margin:0 -1rem;padding:0;list-style:none;display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-align-content:flex-start;align-content:flex-start;-webkit-justify-content:space-between;justify-content:space-between;-webkit-flex-wrap:wrap;flex-wrap:wrap}@media (min-width: 768px){.wf-block .wf-block-content .wf-block-left-right{margin:0 -1.5rem}}.wf-block .wf-block-content .wf-block-left-right.wf-block-left-right-nowrap{-webkit-flex-wrap:nowrap;flex-wrap:nowrap}.wf-block .wf-block-content .wf-block-left-right>li{display:block;min-height:44px;padding:0;margin:0;box-sizing:border-box;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between}.wf-block .wf-block-content .wf-block-left-right>li>*:first-child{-webkit-flex-grow:1;flex-grow:1;min-width:0}.wf-block .wf-block-content .wf-block-left-right>li.wf-left{text-align:left}.wf-block .wf-block-content .wf-block-left-right>li.wf-right{text-align:right}.wf-block .wf-block-content .wf-block-left-center-right{margin:0 -1rem;padding:0;list-style:none;display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-align-content:center;align-content:center;-webkit-justify-content:space-between;justify-content:space-between;-webkit-flex-direction:row;flex-direction:row;-webkit-flex-wrap:nowrap;flex-wrap:nowrap}.wf-block .wf-block-content .wf-block-left-center-right>li{display:block;min-height:44px;padding:0;margin:0;box-sizing:border-box;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-grow:1;flex-grow:1;-webkit-flex-basis:33.3333%;flex-basis:33.3333%;max-width:33.3333%}.wf-block .wf-block-content .wf-block-left-center-right>li a{text-decoration:none;font-size:.875rem}.wf-block .wf-block-content .wf-block-left-center-right>li.wf-left{text-align:left}.wf-block .wf-block-content .wf-block-left-center-right>li.wf-center{text-align:center;-webkit-justify-content:center;justify-content:center}.wf-block .wf-block-content .wf-block-left-center-right>li.wf-center .wordfence-icon32{margin:0}.wf-block .wf-block-content .wf-block-left-center-right>li.wf-right{text-align:right;-webkit-justify-content:flex-end;justify-content:flex-end}.wf-block .wf-block-content .wf-block-labeled-value{box-sizing:border-box;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between;-webkit-flex-direction:column;flex-direction:column;margin:0 -1rem;padding:1rem}@media (min-width: 768px){.wf-block .wf-block-content .wf-block-labeled-value{margin:0 -1.5rem;padding:1.5rem}}.wf-block .wf-block-content .wf-block-labeled-value-value{font-size:3rem;line-height:3rem;color:#9f9fa0;padding:1rem}.wf-block .wf-block-content .wf-block-labeled-value-label{font-size:0.75rem;color:#9f9fa0;padding:0 1rem 1rem 1rem}.wf-block.wf-block-no-header .wf-block-content .wf-block-list>li{border-top:none}.wf-block.wf-active .wf-block-content,.wf-block.wf-always-active .wf-block-content{display:block}.wf-block.wf-active>.wf-block-header>.wf-block-header-content>.wf-block-title{color:#00709e}.wf-block.wf-active>.wf-block-header>.wf-block-header-content>.wf-block-header-action>.wf-block-header-action-disclosure{background:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJkaXNjbG9zdXJlLWNsb3NlZC1vYmplY3QiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHdpZHRoPSIxMnB4IiBoZWlnaHQ9IjEycHgiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMTIgMTIiCgkgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxwYXRoIGlkPSJkaXNjbG9zdXJlLWNsb3NlZCIgZD0iTSA2IDAgbCA2IDYgLTYgNiAwIC0xMiIgZmlsbD0iIzAwNzA5ZSIvPgo8L3N2Zz4=") !important;transform:rotate(90deg)}.wf-block.wf-disabled>.wf-block-header>.wf-block-header-content>.wf-block-title,.wf-block.wf-disabled>.wf-block-header>.wf-block-header-content>.wf-block-subtitle{color:#bfbfbf !important}.wf-block.wf-disabled>.wf-block-header>.wf-block-header-content>.wf-block-header-action>.wf-block-header-action-disclosure{background:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJkaXNjbG9zdXJlLWNsb3NlZC1vYmplY3QiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHdpZHRoPSIxMnB4IiBoZWlnaHQ9IjEycHgiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMTIgMTIiCgkgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CjxwYXRoIGlkPSJkaXNjbG9zdXJlLWNsb3NlZCIgZD0iTSA2IDAgbCA2IDYgLTYgNiAwIC0xMiIgZmlsbD0iI2JkYmRiZCIvPgo8L3N2Zz4=") !important;transform:rotate(0deg)}.wf-block.wf-disabled>.wf-block-content{display:none !important}.wf-block.wf-block-header-left .wf-block-header-content{margin-left:48px}.wf-block.wf-block-header-left .wf-block-header-action{right:auto;left:0px}.wf-block.wf-disabled .wf-dashboard-item-content .wf-block-title{color:#aaaaaa}.wf-block.wf-disabled .wf-dashboard-item-content .wf-block-subtitle{color:#8ea6be}.wf-section-title{margin-bottom:1rem}.wf-status-detail{box-sizing:border-box;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between;-webkit-flex-direction:column;flex-direction:column;margin:0 -1rem;padding:1rem}.wf-status-detail p{margin:0 0 0.45rem 0}.wf-status-detail .wf-status-circular{margin-bottom:1rem}.wf-status-detail .wf-status-detail-title{font-weight:700 !important;font-size:1rem !important;line-height:1.3125 !important}.wf-status-detail .wf-status-detail-subtitle{font-size:.875rem !important;line-height:1.3125 !important;font-weight:normal !important;text-align:center}.wf-status-detail .wf-status-detail-link>a{font-weight:600 !important;font-size:0.85rem !important}.wf-block-navigation-option{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-align-content:flex-start;align-content:flex-start;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-wrap:nowrap;flex-wrap:nowrap}.wf-block-navigation-option svg.wf-block-navigation-option-icon{width:50px;min-width:50px;fill:#9f9fa0}.wf-block-navigation-option:hover{cursor:pointer}.wf-block-navigation-option:hover a{text-decoration:underline}.wf-block-navigation-option:hover svg.wf-block-navigation-option-icon{fill:#00709e}.wf-select-group{display:-webkit-flex !important;display:flex !important;-webkit-align-items:center !important;align-items:center !important;-webkit-justify-content:flex-start !important;justify-content:flex-start !important;-webkit-flex-direction:row !important;flex-direction:row !important;-webkit-flex-grow:0 !important;flex-grow:0 !important}.wf-select-group .wfselect2-container{min-width:200px}@media (max-width: 767px){.wf-select-group .wfselect2-container{max-width:100px}}.wf-select-group .wfselect2-container--default .wfselect2-selection--single{display:block;width:100%;height:38px;padding:.5rem 1.25rem;font-size:14px;line-height:1.42857;color:#2b2b2b;background-color:#fff;background-image:none;border:1px solid #ddd;border-radius:4px;border-top-right-radius:0;border-bottom-right-radius:0;border-right:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-transition:border-color ease-in-out 0.15s,box-shadow ease-in-out 0.15s;-o-transition:border-color ease-in-out 0.15s,box-shadow ease-in-out 0.15s;transition:border-color ease-in-out 0.15s,box-shadow ease-in-out 0.15s}.wf-select-group .wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__rendered{color:#2b2b2b;line-height:inherit}.wf-select-group .wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__arrow{height:38px}.wf-select-group .wf-form-control{display:inline-block;width:auto;border-top-left-radius:0;border-bottom-left-radius:0;margin-left:0}.wf-flex-horizontal{display:-webkit-flex !important;display:flex !important;-webkit-align-items:center !important;align-items:center !important;-webkit-justify-content:flex-start !important;justify-content:flex-start !important;-webkit-flex-direction:row !important;flex-direction:row !important}.wf-flex-horizontal>*:first-child{-webkit-flex-grow:0 !important;flex-grow:0 !important}.wf-flex-horizontal.wf-flex-align-left{-webkit-align-items:flex-start !important;align-items:flex-start !important}.wf-flex-horizontal.wf-flex-align-right{-webkit-justify-content:flex-end !important;justify-content:flex-end !important}.wf-flex-horizontal.wf-flex-full-width{width:100%}.wf-flex-horizontal.wf-flex-full-width>*:last-child{-webkit-flex-grow:1 !important;flex-grow:1 !important}.wf-flex-horizontal.wf-flex-full-width.wf-flex-grow-first>*:first-child{-webkit-flex-grow:1 !important;flex-grow:1 !important}.wf-flex-horizontal.wf-flex-full-width.wf-flex-grow-first>*:last-child{-webkit-flex-grow:0 !important;flex-grow:0 !important}.wf-flex-horizontal.wf-flex-full-width.wf-flex-grow-all>*:first-child,.wf-flex-horizontal.wf-flex-full-width.wf-flex-grow-all>*{-webkit-flex-grow:1 !important;flex-grow:1 !important}.wf-flex-horizontal>li{padding:0;margin:0}.wf-flex-vertical{display:-webkit-flex !important;display:flex !important;-webkit-align-items:center !important;align-items:center !important;-webkit-justify-content:flex-start !important;justify-content:flex-start !important;-webkit-flex-direction:column !important;flex-direction:column !important}.wf-flex-vertical>*:first-child{-webkit-flex-grow:0 !important;flex-grow:0 !important}.wf-flex-vertical.wf-flex-align-left{-webkit-align-items:flex-start !important;align-items:flex-start !important}.wf-flex-vertical.wf-flex-align-right{-webkit-align-items:flex-end !important;align-items:flex-end !important}.wf-flex-vertical.wf-flex-full-width{-webkit-align-items:stretch !important;align-items:stretch !important}@media (max-width: 767px){.wf-flex-vertical.wf-flex-align-left-xs{-webkit-align-items:flex-start !important;align-items:flex-start !important}}@media (min-width: 768px) and (max-width: 991px){.wf-flex-vertical.wf-flex-align-left-sm{-webkit-align-items:flex-start !important;align-items:flex-start !important}}@media (min-width: 992px) and (max-width: 1199px){.wf-flex-vertical.wf-flex-align-left-md{-webkit-align-items:flex-start !important;align-items:flex-start !important}}@media (min-width: 1200px){.wf-flex-vertical.wf-flex-align-left-lg{-webkit-align-items:flex-start !important;align-items:flex-start !important}}.wf-flex-vertical>li{padding:0;margin:0}@media (max-width: 767px){.wf-flex-vertical-xs{display:-webkit-flex !important;display:flex !important;-webkit-align-items:center !important;align-items:center !important;-webkit-justify-content:flex-start !important;justify-content:flex-start !important;-webkit-flex-direction:column !important;flex-direction:column !important}.wf-flex-vertical-xs>*:first-child{-webkit-flex-grow:0 !important;flex-grow:0 !important}.wf-flex-vertical-xs.wf-flex-align-left{-webkit-align-items:flex-start !important;align-items:flex-start !important}.wf-flex-vertical-xs.wf-flex-align-right{-webkit-align-items:flex-end !important;align-items:flex-end !important}.wf-flex-vertical-xs.wf-flex-full-width{-webkit-align-items:stretch !important;align-items:stretch !important}}ul.wf-option,.wf-form-field{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:row;flex-direction:row;-webkit-flex-wrap:nowrap;flex-wrap:nowrap;padding:1rem 0;position:relative}ul.wf-option li,.wf-form-field li{margin:0;padding:0}ul.wf-option.wf-option-no-spacing,.wf-form-field.wf-option-no-spacing{padding:0;margin:0}ul.wf-option.wf-option-toggled>*:last-child,ul.wf-option.wf-option-footer>*:last-child,.wf-form-field.wf-option-toggled>*:last-child,.wf-form-field.wf-option-footer>*:last-child{margin-right:1rem}@media (max-width: 768px){ul.wf-option.wf-option-footer,.wf-form-field.wf-option-footer{-webkit-flex-direction:column;flex-direction:column}}ul.wf-option>.wf-option-content,.wf-form-field>.wf-option-content{-webkit-flex-grow:1;flex-grow:1}ul.wf-option>.wf-option-content>ul,.wf-form-field>.wf-option-content>ul{display:-webkit-flex;display:flex;-webkit-align-items:flex-start;align-items:flex-start;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:column;flex-direction:column;-webkit-flex-wrap:nowrap;flex-wrap:nowrap;width:100%}ul.wf-option>.wf-option-content>ul>*:first-child,.wf-form-field>.wf-option-content>ul>*:first-child{-webkit-flex-grow:1;flex-grow:1}@media (min-width: 768px){ul.wf-option>.wf-option-content>ul,.wf-form-field>.wf-option-content>ul{-webkit-flex-direction:row;flex-direction:row;-webkit-align-items:center;align-items:center}}ul.wf-option.wf-option-toggled-segmented *,.wf-form-field.wf-option-toggled-segmented *{-webkit-flex-grow:0;flex-grow:0}ul.wf-option.wf-option-toggled-segmented *:first-child,.wf-form-field.wf-option-toggled-segmented *:first-child{-webkit-flex-grow:1;flex-grow:1}ul.wf-option.wf-option-toggled-segmented>*:last-child,.wf-form-field.wf-option-toggled-segmented>*:last-child{margin-left:1rem}ul.wf-option.wf-option-toggled-segmented .wf-option-title,.wf-form-field.wf-option-toggled-segmented .wf-option-title{font-size:.8rem}ul.wf-option.wf-option-toggled-segmented .wf-option-segments,.wf-form-field.wf-option-toggled-segmented .wf-option-segments{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-align-content:stretch;align-content:stretch;-webkit-flex-wrap:nowrap;flex-wrap:nowrap}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label{-webkit-flex-grow:1;flex-grow:1;-webkit-flex-basis:50%;flex-basis:50%;display:block;margin-bottom:0;font-weight:normal;text-align:center;vertical-align:middle;touch-action:manipulation;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;text-transform:uppercase;padding:.5rem 1.25rem;font-size:14px;line-height:1.42857;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:#00709e;background-color:#fff;border-color:#00709e;border-radius:0}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.focus{color:#00709e;background-color:#e6e6e6;border-color:#00161f}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label:hover{color:#00709e;background-color:#e6e6e6;border-color:#004561}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label:active,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.active,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label:active,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.active,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle{color:#00709e;background-color:#e6e6e6;border-color:#004561}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label:active:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label:active:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label:active.focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.active:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.active:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.active.focus,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle:hover,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle:focus,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle.focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label:active:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label:active:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label:active.focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.active:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.active:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.active.focus,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle:hover,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle:focus,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle.focus{color:#00709e;background-color:#d4d4d4;border-color:#00161f}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label:active,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-active,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label:active,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-active,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-dropdown-toggle{background-image:none}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-disabled,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label[disabled],ul.wf-option.wf-option-toggled-segmented .wf-option-segments label[readonly],fieldset[disabled] ul.wf-option.wf-option-toggled-segmented .wf-option-segments label,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-disabled,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label[disabled],.wf-form-field.wf-option-toggled-segmented .wf-option-segments label[readonly],fieldset[disabled] .wf-form-field.wf-option-toggled-segmented .wf-option-segments label{color:#777;background-color:#fff;border-color:#e2e2e2;cursor:not-allowed}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-disabled:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-disabled:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-disabled.wf-focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label[disabled]:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label[disabled]:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label[disabled].wf-focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label[readonly]:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label[readonly]:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments label[readonly].wf-focus,fieldset[disabled] ul.wf-option.wf-option-toggled-segmented .wf-option-segments label:hover,fieldset[disabled] ul.wf-option.wf-option-toggled-segmented .wf-option-segments label:focus,fieldset[disabled] ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-disabled:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-disabled:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-disabled.wf-focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label[disabled]:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label[disabled]:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label[disabled].wf-focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label[readonly]:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label[readonly]:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label[readonly].wf-focus,fieldset[disabled] .wf-form-field.wf-option-toggled-segmented .wf-option-segments label:hover,fieldset[disabled] .wf-form-field.wf-option-toggled-segmented .wf-option-segments label:focus,fieldset[disabled] .wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-focus{background-color:#fff;border-color:#00709e}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label .wf-badge,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label .wf-badge{color:#fff;background-color:#00709e}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-segment-first,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-segment-first{border-radius:4px 0 0 4px}ul.wf-option.wf-option-toggled-segmented .wf-option-segments label.wf-segment-last,.wf-form-field.wf-option-toggled-segmented .wf-option-segments label.wf-segment-last{border-radius:0 4px 4px 0}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio],.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]{position:absolute;left:-9999px}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label{color:#fff;background-color:#00709e;border-color:#005e85}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.focus{color:#fff;background-color:#004c6b;border-color:#000405}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:hover{color:#fff;background-color:#004c6b;border-color:#003347}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.active,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.active,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle{color:#fff;background-color:#004c6b;border-color:#003347}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active.focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.active:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.active:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.active.focus,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle:hover,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle:focus,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle.focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active.focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.active:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.active:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.active.focus,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle:hover,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle:focus,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle.focus{color:#fff;background-color:#003347;border-color:#000405}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-active,.wf-open>ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:active,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-active,.wf-open>.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-dropdown-toggle{background-image:none}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-disabled,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[disabled],ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[readonly],fieldset[disabled] ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-disabled,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[disabled],.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[readonly],fieldset[disabled] .wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label{color:#fff;background-color:#59a2c0;border-color:#5996b0;cursor:not-allowed}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-disabled:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-disabled:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-disabled.wf-focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[disabled]:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[disabled]:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[disabled].wf-focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[readonly]:hover,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[readonly]:focus,ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[readonly].wf-focus,fieldset[disabled] ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:hover,fieldset[disabled] ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:focus,fieldset[disabled] ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-disabled:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-disabled:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-disabled.wf-focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[disabled]:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[disabled]:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[disabled].wf-focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[readonly]:hover,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[readonly]:focus,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label[readonly].wf-focus,fieldset[disabled] .wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:hover,fieldset[disabled] .wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label:focus,fieldset[disabled] .wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label.wf-focus{background-color:#00709e;border-color:#005e85}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label .wf-badge,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:checked+label .wf-badge{color:#00709e;background-color:#fff}ul.wf-option.wf-option-toggled-segmented .wf-option-segments [type=radio]:disabled+label,.wf-form-field.wf-option-toggled-segmented .wf-option-segments [type=radio]:disabled+label{cursor:not-allowed;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=65);opacity:.65}ul.wf-option.wf-option-toggled-multiple>.wf-option-content>ul,.wf-form-field.wf-option-toggled-multiple>.wf-option-content>ul{-webkit-flex-direction:column;flex-direction:column;-webkit-align-items:flex-start;align-items:flex-start}ul.wf-option>.wf-option-spacer,.wf-form-field>.wf-option-spacer{-webkit-flex-grow:0;flex-grow:0;-webkit-flex-shrink:0;flex-shrink:0;margin:0 1rem 0 0;width:30px;height:30px}@media (min-width: 768px){ul.wf-option>.wf-option-spacer,.wf-form-field>.wf-option-spacer{margin:0 2rem 0 1rem;width:20px;height:20px}}ul.wf-option>.wf-option-premium-lock,.wf-form-field>.wf-option-premium-lock{-webkit-flex-grow:0;flex-grow:0;-webkit-flex-shrink:0;flex-shrink:0;background:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB3aWR0aD0iMjRweCIgaGVpZ2h0PSIzMHB4IiB2aWV3Qm94PSIwIDAgMjQgMzAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KCTxwYXRoIGQ9Ik0yMy45NDksMTQuMjMzYy0wLjM3OSwtMC4zOSAtMC45MDQsLTAuNjA2IC0xLjQ0OCwtMC41OTVsLTAuNjgzLDBsMCwtNC4wOTJjMC4wMzIsLTIuNTM1IC0wLjk4NiwtNC45NzMgLTIuODEyLC02LjczMWMtMS43NTksLTEuODI4IC00LjE5OCwtMi44NDcgLTYuNzM0LC0yLjgxNWMtMi41MzYsLTAuMDMyIC00Ljk3NiwwLjk4NyAtNi43MzQsMi44MTVjLTEuODI2LDEuNzU4IC0yLjg0NCw0LjE5NiAtMi44MTIsNi43MzFsMCw0LjA4OWwtMC42OCwwYy0wLjU0NCwtMC4wMTEgLTEuMDY5LDAuMjA1IC0xLjQ0OCwwLjU5NWMtMC4zOTUsMC4zODIgLTAuNjEyLDAuOTEyIC0wLjU5OCwxLjQ2MWwwLDEyLjI2NmMtMC4wMTEsMC41NDQgMC4yMDQsMS4wNjkgMC41OTUsMS40NDhjMC4zNzksMC4zOTEgMC45MDQsMC42MDYgMS40NDgsMC41OTVsMjAuNDU4LDBjMC4wMDMsMCAwLjAwNiwwIDAuMDEsMGMxLjExNywwIDIuMDM2LC0wLjkxOSAyLjAzNiwtMi4wMzdjMCwtMC4wMDMgMCwtMC4wMDYgMCwtMC4wMDlsMCwtMTIuMjYzYzAuMDExLC0wLjU0NCAtMC4yMDYsLTEuMDY5IC0wLjU5OCwtMS40NDhsMCwtMC4wMVptLTYuMjExLC0wLjU5NWwtMTAuOTE5LDBsMCwtNC4wOTJjLTAuMDIyLC0xLjQ1MSAwLjU1NywtMi44NDggMS41OTksLTMuODU4YzEuMDA5LC0xLjA0MiAyLjQwNywtMS42MjEgMy44NTcsLTEuNTk4YzEuNDUxLC0wLjAyMyAyLjg0OCwwLjU1NiAzLjg1OCwxLjU5OGMxLjA0MiwxLjAwOSAxLjYyMSwyLjQwNyAxLjU5OCwzLjg1OGwwLjAwNyw0LjA5MloiIGZpbGw9IiNkMWQxZDEiLz4KPC9zdmc+");background-repeat:no-repeat;background-position:center center;background-size:contain;margin:0 1rem 0 0;width:30px;height:30px}@media (min-width: 768px){ul.wf-option>.wf-option-premium-lock,.wf-form-field>.wf-option-premium-lock{margin:0 2rem 0 1rem;width:20px;height:20px}}ul.wf-option>.wf-option-checkbox,.wf-form-field>.wf-option-checkbox{-webkit-flex-grow:0;flex-grow:0;-webkit-flex-shrink:0;flex-shrink:0;margin:0 1rem 0 0}@media (min-width: 768px){ul.wf-option>.wf-option-checkbox,.wf-form-field>.wf-option-checkbox{margin:0 2rem 0 1rem}}ul.wf-option>.wf-boolean-switch,.wf-form-field>.wf-boolean-switch{-webkit-flex-grow:0;flex-grow:0;-webkit-flex-shrink:0;flex-shrink:0;margin:0 1rem 0 0}@media (min-width: 768px){ul.wf-option>.wf-boolean-switch,.wf-form-field>.wf-boolean-switch{margin:0 1rem 0 1rem}}ul.wf-option.wf-option-no-spacing>.wf-boolean-switch,.wf-form-field.wf-option-no-spacing>.wf-boolean-switch{margin:0}ul.wf-option>.wf-option-radio-container,.wf-form-field>.wf-option-radio-container{-webkit-flex-grow:0;flex-grow:0;-webkit-flex-shrink:0;flex-shrink:0;margin:0 1rem 0 0}@media (min-width: 768px){ul.wf-option>.wf-option-radio-container,.wf-form-field>.wf-option-radio-container{margin:0 2rem 0 1rem}}ul.wf-option>.wf-option-radio-container [type=radio].wf-option-radio+label:before,.wf-form-field>.wf-option-radio-container [type=radio].wf-option-radio+label:before{margin:0}ul.wf-option>li>.wf-option-title,ul.wf-option>.wf-option-title,ul.wf-option>.wf-option-content>ul>.wf-option-title,.wf-form-field>li>.wf-option-title,.wf-form-field>.wf-option-title,.wf-form-field>.wf-option-content>ul>.wf-option-title{font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:0.9rem;color:#2b2b2b;padding-right:0.5rem}ul.wf-option>li>.wf-option-title.wf-option-title-top,ul.wf-option>.wf-option-title.wf-option-title-top,ul.wf-option>.wf-option-content>ul>.wf-option-title.wf-option-title-top,.wf-form-field>li>.wf-option-title.wf-option-title-top,.wf-form-field>.wf-option-title.wf-option-title-top,.wf-form-field>.wf-option-content>ul>.wf-option-title.wf-option-title-top{-webkit-align-self:flex-start;align-self:flex-start}ul.wf-option>li>.wf-option-title.wf-option-title-bottom,ul.wf-option>.wf-option-title.wf-option-title-bottom,ul.wf-option>.wf-option-content>ul>.wf-option-title.wf-option-title-bottom,.wf-form-field>li>.wf-option-title.wf-option-title-bottom,.wf-form-field>.wf-option-title.wf-option-title-bottom,.wf-form-field>.wf-option-content>ul>.wf-option-title.wf-option-title-bottom{-webkit-align-self:flex-end;align-self:flex-end}ul.wf-option .wf-option-subtitle,.wf-form-field .wf-option-subtitle{padding-top:0.25rem;font-size:0.75rem}ul.wf-option .wf-flex-vertical .wf-option-title,.wf-form-field .wf-flex-vertical .wf-option-title{padding-bottom:0.75rem}ul.wf-option.wf-flex-vertical>.wf-option-subtitle,.wf-form-field.wf-flex-vertical>.wf-option-subtitle{padding-top:0.25rem !important;font-size:0.75rem !important}ul.wf-option .wf-option-checkboxes,ul.wf-option .wf-option-checkboxes>ul,.wf-form-field .wf-option-checkboxes,.wf-form-field .wf-option-checkboxes>ul{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:row;flex-direction:row;-webkit-flex-wrap:nowrap;flex-wrap:nowrap}ul.wf-option .wf-option-checkboxes,.wf-form-field .wf-option-checkboxes{margin-top:1rem}ul.wf-option .wf-option-checkboxes>ul,.wf-form-field .wf-option-checkboxes>ul{margin-left:1rem}@media (min-width: 768px){ul.wf-option .wf-option-checkboxes>ul,.wf-form-field .wf-option-checkboxes>ul{margin-left:1.5rem}}ul.wf-option .wf-option-checkboxes>ul:first-of-type,.wf-form-field .wf-option-checkboxes>ul:first-of-type{margin-left:0}ul.wf-option .wf-option-checkboxes>ul>.wf-option-checkbox,.wf-form-field .wf-option-checkboxes>ul>.wf-option-checkbox{margin:0 1rem 0 0}ul.wf-option li.wf-option-text,ul.wf-option li.wf-option-textarea,ul.wf-option td.wf-option-text,.wf-form-field li.wf-option-text,.wf-form-field li.wf-option-textarea,.wf-form-field td.wf-option-text{padding-top:0.5rem}@media (min-width: 768px){ul.wf-option li.wf-option-text,ul.wf-option li.wf-option-textarea,ul.wf-option td.wf-option-text,.wf-form-field li.wf-option-text,.wf-form-field li.wf-option-textarea,.wf-form-field td.wf-option-text{-webkit-flex-grow:1;flex-grow:1;text-align:right;padding-left:1rem;padding-top:0}}ul.wf-option li.wf-option-text>input[type="text"],.wf-form-field li.wf-option-text>input[type="text"]{max-width:240px}@media (min-width: 768px){ul.wf-option li.wf-option-text>input[type="text"],.wf-form-field li.wf-option-text>input[type="text"]{max-width:280px}}@media (min-width: 992px){ul.wf-option li.wf-option-text>input[type="text"],.wf-form-field li.wf-option-text>input[type="text"]{max-width:340px}}ul.wf-option li.wf-option-text.wf-option-full-width>input[type="text"],.wf-form-field li.wf-option-text.wf-option-full-width>input[type="text"]{max-width:100%;width:100%}ul.wf-option li.wf-option-textarea,.wf-form-field li.wf-option-textarea{min-width:150px;max-width:240px}@media (min-width: 768px){ul.wf-option li.wf-option-textarea,.wf-form-field li.wf-option-textarea{min-width:200px;max-width:400px}}@media (min-width: 992px){ul.wf-option li.wf-option-textarea,.wf-form-field li.wf-option-textarea{min-width:250px;max-width:500px}}ul.wf-option li.wf-option-textarea>textarea,.wf-form-field li.wf-option-textarea>textarea{width:100%;height:80px;min-width:150px;max-width:240px}@media (min-width: 768px){ul.wf-option li.wf-option-textarea>textarea,.wf-form-field li.wf-option-textarea>textarea{min-width:200px;max-width:280px}}@media (min-width: 992px){ul.wf-option li.wf-option-textarea>textarea,.wf-form-field li.wf-option-textarea>textarea{min-width:250px;max-width:340px}}ul.wf-option li.wf-option-textarea>.wf-flex-vertical>li>textarea,.wf-form-field li.wf-option-textarea>.wf-flex-vertical>li>textarea{width:100%;height:80px;box-sizing:border-box}ul.wf-option li.wf-option-textarea>.wf-flex-vertical>li.wf-option-subtitle,.wf-form-field li.wf-option-textarea>.wf-flex-vertical>li.wf-option-subtitle{width:100%;text-align:left}ul.wf-option li.wf-option-switch,.wf-form-field li.wf-option-switch{-webkit-flex-grow:1;flex-grow:1}ul.wf-option li.wf-option-switch.wf-right .wf-switch,.wf-form-field li.wf-option-switch.wf-right .wf-switch{justify-content:flex-end !important}ul.wf-option li.wf-option-select,.wf-form-field li.wf-option-select{-webkit-flex-grow:1;flex-grow:1;text-align:right}ul.wf-option li.wf-option-select select,ul.wf-option li.wf-option-select select option,ul.wf-option li.wf-option-select .wfselect2-container--default,.wf-form-field li.wf-option-select select,.wf-form-field li.wf-option-select select option,.wf-form-field li.wf-option-select .wfselect2-container--default{font-size:0.7rem;font-weight:bold}@media (min-width: 768px){ul.wf-option li.wf-option-select select,ul.wf-option li.wf-option-select select option,ul.wf-option li.wf-option-select .wfselect2-container--default,.wf-form-field li.wf-option-select select,.wf-form-field li.wf-option-select select option,.wf-form-field li.wf-option-select .wfselect2-container--default{font-size:0.8rem}}@media (min-width: 992px){ul.wf-option li.wf-option-select select,ul.wf-option li.wf-option-select select option,ul.wf-option li.wf-option-select .wfselect2-container--default,.wf-form-field li.wf-option-select select,.wf-form-field li.wf-option-select select option,.wf-form-field li.wf-option-select .wfselect2-container--default{font-size:0.9rem}}ul.wf-option li.wf-option-select .wf-option-select-option,ul.wf-option li.wf-option-select .wfselect2-container--default,ul.wf-option li.wf-option-select .wfselect2-container--default .wfselect2-selection--single,.wf-form-field li.wf-option-select .wf-option-select-option,.wf-form-field li.wf-option-select .wfselect2-container--default,.wf-form-field li.wf-option-select .wfselect2-container--default .wfselect2-selection--single{text-align:left;height:40px;border-radius:0;border:0;background-color:#fff;box-shadow:1px 1px 1px 2px rgba(215,215,215,0.35)}ul.wf-option li.wf-option-select .wf-option-select-option .wfselect2-selection__rendered,ul.wf-option li.wf-option-select .wfselect2-container--default .wfselect2-selection__rendered,ul.wf-option li.wf-option-select .wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__rendered,.wf-form-field li.wf-option-select .wf-option-select-option .wfselect2-selection__rendered,.wf-form-field li.wf-option-select .wfselect2-container--default .wfselect2-selection__rendered,.wf-form-field li.wf-option-select .wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__rendered{color:#333;line-height:40px}ul.wf-option li.wf-option-select .wf-option-select-option .wfselect2-selection__arrow,ul.wf-option li.wf-option-select .wfselect2-container--default .wfselect2-selection__arrow,ul.wf-option li.wf-option-select .wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__arrow,.wf-form-field li.wf-option-select .wf-option-select-option .wfselect2-selection__arrow,.wf-form-field li.wf-option-select .wfselect2-container--default .wfselect2-selection__arrow,.wf-form-field li.wf-option-select .wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__arrow{height:38px}ul.wf-option li.wf-option-select .wf-option-select-option.wfselect2-container--disabled .wfselect2-selection__rendered,ul.wf-option li.wf-option-select .wfselect2-container--default.wfselect2-container--disabled .wfselect2-selection__rendered,ul.wf-option li.wf-option-select .wfselect2-container--default .wfselect2-selection--single.wfselect2-container--disabled .wfselect2-selection__rendered,.wf-form-field li.wf-option-select .wf-option-select-option.wfselect2-container--disabled .wfselect2-selection__rendered,.wf-form-field li.wf-option-select .wfselect2-container--default.wfselect2-container--disabled .wfselect2-selection__rendered,.wf-form-field li.wf-option-select .wfselect2-container--default .wfselect2-selection--single.wfselect2-container--disabled .wfselect2-selection__rendered{color:#aaa}ul.wf-option li.wf-option-select .wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__arrow b,.wf-form-field li.wf-option-select .wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__arrow b{border-color:#333 transparent transparent}ul.wf-option li.wf-option-select .wfselect2-container--default.wfselect2-container--open .wfselect2-selection--single .wfselect2-selection__arrow b,.wf-form-field li.wf-option-select .wfselect2-container--default.wfselect2-container--open .wfselect2-selection--single .wfselect2-selection__arrow b{border-color:transparent transparent #333}ul.wf-option.wf-option-token select,.wf-form-field.wf-option-token select{width:240px}@media (min-width: 768px){ul.wf-option.wf-option-token select,.wf-form-field.wf-option-token select{width:280px}}@media (min-width: 992px){ul.wf-option.wf-option-token select,.wf-form-field.wf-option-token select{width:320px}}ul.wf-option.wf-option-token .wfselect2-container--default,ul.wf-option.wf-option-token .wfselect2-container--default .wfselect2-selection--multiple,.wf-form-field.wf-option-token .wfselect2-container--default,.wf-form-field.wf-option-token .wfselect2-container--default .wfselect2-selection--multiple{border-color:#e2e2e2}ul.wf-option.wf-option-token .wfselect2-container--default .wfselect2-selection__choice,ul.wf-option.wf-option-token .wfselect2-container--default .wfselect2-selection--multiple .wfselect2-selection__choice,.wf-form-field.wf-option-token .wfselect2-container--default .wfselect2-selection__choice,.wf-form-field.wf-option-token .wfselect2-container--default .wfselect2-selection--multiple .wfselect2-selection__choice{background-color:#fff;border-color:#e2e2e2;padding:0.5rem}ul.wf-option.wf-option-token .wfselect2-container--default .wfselect2-search__field,ul.wf-option.wf-option-token .wfselect2-container--default .wfselect2-selection--multiple .wfselect2-search__field,.wf-form-field.wf-option-token .wfselect2-container--default .wfselect2-search__field,.wf-form-field.wf-option-token .wfselect2-container--default .wfselect2-selection--multiple .wfselect2-search__field{margin-right:5px;margin-top:5px;padding:0.5rem 0}.wf-option-sub{padding-left:2rem !important;margin-left:30px !important}.wf-select2-suppress-dropdown .wfselect2-results,.wf-select2-suppress-dropdown .wfselect2-dropdown{display:none}.wf-options-controls{direction:ltr;background:#ffffff;border-bottom:1px solid #e2e2e2;position:absolute;left:160px;right:0px;top:46px;z-index:900;padding-left:15px;padding-right:15px}@media (min-width: 616px){.wf-options-controls{position:fixed}}.wf-options-controls .wf-block{margin:0}@media (min-width: 782px){.wf-options-controls .wf-block{margin:0.5rem 0}}.wf-options-controls,.sticky-menu .wf-options-controls{top:32px}.folded .wf-options-controls{left:36px}@media only screen and (max-width: 960px){.auto-fold .wf-options-controls{left:36px}}.rtl .wf-options-controls{right:160px;left:0px}.rtl .folded .wf-options-controls{right:36px}@media only screen and (max-width: 960px){.rtl .auto-fold .wf-options-controls{right:36px}}@media screen and (max-width: 782px){.wf-options-controls,.folded .wf-options-controls,.auto-fold .wf-options-controls,.rtl .wf-options-controls,.rtl .folded .wf-options-controls,.rtl .auto-fold .wf-options-controls{left:-10px;right:0px}}.wf-options-controls-spacer{height:45px}@media (min-width: 782px){.wf-options-controls-spacer{height:75px}}.wf-options-controls-spacer,.sticky-menu .wf-options-controls-spacer{top:61px}.wordfence .wfselect2-container .wfselect2-selection--single{border:1px solid #dadada;font-weight:normal;font-size:0.8rem}#wf-notices{margin-top:15px}#wf-notices .wf-admin-notice{margin-left:0px;margin-right:0px}.wf-success-text,.wf-notice-text{display:inline-block;vertical-align:middle;line-height:1.3;font-size:16px;font-weight:bold;font-style:italic}.wf-notice{margin:12px 0;padding:8px;background-color:#ffffe0;border:1px solid #ffd975;border-width:1px 1px 1px 10px}.wf-notice-text{color:#6d798c}.wf-success{margin:12px 0;padding:8px;background-color:#ffffff;border:1px solid #16bc9b;border-width:1px 1px 1px 10px}.wf-success-text{color:#11967a}.wf-premium-callout{border:1px solid #dfdfdf;background-color:#ffffff;padding:16px;margin:20px 0 0;text-align:center}.wf-premium-callout ul{margin:8px 0;padding:0 0 0 15px}.wf-premium-callout ul li{list-style-type:disc;margin:0;padding:0}.wf-premium-callout .center{text-align:center;margin:0}.wf-premium-callout .button-primary{text-align:center;text-transform:uppercase;font-weight:bold;background-color:#00709e}#wfLiveTrafficOverlayAnchor::after{position:absolute;z-index:3002;top:0;right:0;width:0;height:0;background:rgba(241,241,241,0.6);content:'';opacity:0;-webkit-transition:opacity 0.5s,width 0.1s 0.5s,height 0.1s 0.5s;-o-transition:opacity 0.5s,width 0.1s 0.5s,height 0.1s 0.5s;transition:opacity 0.5s,width 0.1s 0.5s,height 0.1s 0.5s}.wordfenceLiveActivityPaused #wfLiveTrafficOverlayAnchor::after{width:100%;height:100%;opacity:1;-webkit-transition:opacity 0.5s;-o-transition:opacity 0.5s;transition:opacity 0.5s}#wordfenceLiveActivitySecurityOnly,#wordfenceLiveActivityAll{background:#fff;border-left:4px solid #00709e;-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);margin-bottom:0.5rem;padding:1px 13px}#wfLiveTrafficDisabledMessage{display:none;position:fixed;z-index:3003;left:0;width:100%;top:50%;transform:translateY(-50%);text-align:center;color:#666666;opacity:0;-webkit-transition:opacity 0.5s,width 0.1s 0.5s,height 0.1s 0.5s;-o-transition:opacity 0.5s,width 0.1s 0.5s,height 0.1s 0.5s;transition:opacity 0.5s,width 0.1s 0.5s,height 0.1s 0.5s}#wfLiveTrafficDisabledMessage h2{background-color:#00709e;color:#fff;overflow:hidden;max-width:350px;margin:0 auto;padding:20px;font-size:2.0em}#wfLiveTrafficDisabledMessage h2 small{font-size:0.5em;font-weight:normal;margin-top:12px;display:block}.wordfenceLiveActivityPaused #wfLiveTrafficDisabledMessage{display:block;opacity:1;-webkit-transition:opacity 0.5s;transition:opacity 0.5s}.wf-live-activity{position:relative;margin:20px 0 10px 0;padding:0.75rem;box-sizing:border-box;background:#FFFCEF;box-shadow:0 0 0 1px rgba(153,155,135,0.5),0 1px 2px #e8f3e0}.wf-live-activity .wf-live-activity-inner{width:100%;box-sizing:border-box;position:relative}.wf-live-activity .wf-live-activity-inner .wf-live-activity-content{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:flex-start}.wf-live-activity .wf-live-activity-inner .wf-live-activity-content .wf-live-activity-title{color:#888888;font-size:0.85rem;font-weight:bold;padding-right:0.5rem}.wf-live-activity .wf-live-activity-inner .wf-live-activity-content .wf-live-activity-message{font-size:0.80rem;color:#000000}.wf-live-activity .wf-live-activity-inner .wf-live-activity-state{position:absolute;top:0px;right:0px;bottom:0px;left:0px;background:rgba(255,252,239,0.9);display:none;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:center;z-index:3001;-webkit-transition:opacity 0.5s,width 0.1s 0.5s,height 0.1s 0.5s;-o-transition:opacity 0.5s,width 0.1s 0.5s,height 0.1s 0.5s;transition:opacity 0.5s,width 0.1s 0.5s,height 0.1s 0.5s}.wordfenceLiveActivityPaused .wf-live-activity .wf-live-activity-inner .wf-live-activity-state{display:-ms-flexbox;display:flex;opacity:1;-webkit-transition:opacity 0.5s;-webkit-transition:opacity 0.5s;-o-transition:opacity 0.5s;transition:opacity 0.5s}.wordfence .wordfenceScanButton{margin:20px 0 20px 0}.wordfence .wordfenceScanButton input.button-wf-grey{background:#EFEFEF url(../images/button-grad-grey.png) repeat-x scroll left top;border-color:#EFEFEF}.wordfence .wordfenceScanButton table td{vertical-align:top}.wordfence .wordfenceScanButton .button-primary{text-align:center;text-transform:uppercase;font-weight:bold;background-color:#00709E;height:44px;line-height:44px;padding:0px 20px}table.wfSummaryParent{font-family:sans-serif;font-size:14px;color:#000;z-index:9}table.wfSummaryParent td{vertical-align:top;padding:0;margin:0}table.wfSummaryParent table.wfSummaryChild th{font-weight:bold;text-align:right;font-family:Georgia,Times New Roman,Times,serif;color:#000;padding:5px 10px 5px 0;border-top:1px solid #CCC}table.wfSummaryParent table.wfSummaryChild td{font-weight:normal;text-align:left;padding:5px 0 5px 0;border-top:1px solid #CCC}table.wfSummaryParent table.wfSC1 td{width:300px;padding:0 25px 10px 0}table.wfSummaryParent table.wfSC2 th{width:80px}table.wfSummaryParent table.wfSC2 td{width:100px}table.wfSummaryParent table.wfSC3 th{width:80px}table.wfSummaryParent table.wfSC3 td{width:250px}table.wfSummaryParent th.wfHead{font-size:22px;font-family:Georgia,Times New Roman,Times,serif;font-style:italic;color:#555;font-weight:bold;text-align:left;padding:20px 0 20px 0;-webkit-font-smoothing:antialiased}.wf-issues-table{table-layout:fixed;width:100%}div.wfIssue{width:100%}div.wfIssue table.wfIssue td{padding:2px;margin:0;border-width:0;text-align:left;width:100%}div.wfIssue table.wfIssue th{padding:2px;margin:0;font-weight:bold;text-align:left;color:#777;white-space:nowrap}div.wfIssue table.wfIssueLinks td{border-width:0;text-align:left;padding-right:10px}div.wfIssue h2{margin:0 0 5px 0;padding:0;font-size:0.9rem}@media (min-width: 768px){div.wfIssue h2{font-size:1.05rem}}.wfIssueOptions{border-top:1px solid #CCC;padding:10px}.wfIssueOptions h3{font-size:0.8rem;margin:0}@media (min-width: 768px){.wfIssueOptions h3{display:inline-block}}.wfIssueOptions ul{margin-bottom:0;padding-left:0;list-style:none;display:-webkit-flex;display:flex;-webkit-align-items:flex-start;align-items:flex-start;-webkit-align-content:flex-start;align-content:flex-start;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-flex-direction:column;flex-direction:column}@media (min-width: 768px){.wfIssueOptions ul{-webkit-flex-direction:row;flex-direction:row;-webkit-align-items:center;align-items:center}}.wfIssueOptions ul>li>a{position:relative;display:block;padding:8px 12px/2}.wfIssueOptions ul>li>a:hover,.wfIssueOptions ul>li>a:focus{text-decoration:none;background-color:#e2e2e2}.wfIssueOptions a{margin-left:10px}.wfIssueOptions strong{float:left;display:block;width:60px}.wfIssueOptions p{margin:6px 0px 0px}.wfProbSev1,.wfProbSev2,.wfAjaxLight128,.wfResolved{width:128px;height:128px;border:0;margin:0 auto;background-repeat:no-repeat;background-position:0 0;text-decoration:none;display:block}.wfProbSev1{background-image:url(../images/icons/error128.png)}.wfProbSev2{background-image:url(../images/icons/warning128.png)}.wfResolved{background-image:url(../images/icons/tick128.png)}.wfIssuesContainer{width:100%;display:none}.wfIssuesContainer p{max-width:550px}.wfALogTime{color:#999}.wfALogMailLink,.wfALogViewLink{display:block;position:absolute;padding:0 0 0 18px;margin:0;right:10px;top:0;background-repeat:no-repeat;font-weight:normal}.wfALogMailLink{background-image:url(../images/icons/email_go.png)}.wfALogViewLink{background-image:url(../images/icons/magnifier.png)}#wfActivity{position:relative}.consoleHead{position:relative;padding:0 0 0 3px;font-weight:bold;width:100%}.consoleHeadText{margin-bottom:4px;font-size:18px;font-family:Georgia,Times New Roman,Times,serif;color:#555;font-weight:bold;-webkit-font-smoothing:antialiased}.consoleFooter{position:relative}.consoleOuter{width:100%}.consoleInner{height:116px;overflow:auto;z-index:1}.bevelDiv1{border:1px solid #EFEFEF}.bevelDiv2{border:1px solid #AAA}.bevelDiv3{background-color:#ffffed;padding:5px;font-family:Roboto,Helvetica Neue,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased}.wfSecure{color:#0A0;font-weight:bold}.wfSummaryLine{display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-align-content:flex-start;align-content:flex-start;-webkit-justify-content:space-between;justify-content:space-between;-webkit-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-flex-direction:column;flex-direction:column}@media (min-width: 768px){.wfSummaryLine{-webkit-flex-direction:row;flex-direction:row}}.wfSummaryLine .wfSummaryDate{padding-left:3px}.wfSummaryLine .wfSummaryMsg{padding-left:3px;-webkit-flex-grow:1;flex-grow:1;min-width:0}.wfSummaryLoading{width:16px;height:11px;background-image:url("../images/icons/ajaxScan.gif")}.wfSummaryBad,.wfSummaryErr{color:#930000}.wfSummaryOK{color:#11967a}.wfSummaryIgnored{color:#a87302}.wfClear{content:".";display:block;height:0;width:0;line-height:0;clear:both;visibility:hidden}.wfSummaryFinal{-webkit-font-smoothing:antialiased;font-weight:bold;color:#555}.wfStartScanButton{text-align:center}.wordfenceScanHelp{border:1px solid #CCC;padding:4px}.wf-scan-no-issues{font-size:1.25rem;color:#11967a}.wf-scan-severity{position:relative;width:10px}@media (min-width: 768px){.wf-scan-severity{width:144px}}.wf-scan-severity-1,.wf-scan-severity-2{position:absolute;top:0px;right:0px;bottom:0px;left:0px}.wf-scan-severity-1{background-color:#c10000}.wf-scan-severity-2{background-color:#ffd10a}.scan-schedule{border-collapse:collapse;border-spacing:0}.scan-schedule tr:first-of-type th{padding-top:0}.scan-schedule td{padding:0}.scan-schedule th{padding:1.5rem 0.5rem 0.75rem 0;font-size:1rem;text-align:left}@media (min-width: 768px){.scan-schedule th{padding:0 0.5rem 0 0;font-size:0.8125rem;text-align:center}}.next-scan{font-size:1em;display:block;position:relative;width:7em;height:7em;background-color:#fff;border-radius:0.6em;box-shadow:0 1px 0 rgba(189,189,189,0.6);overflow:hidden}.next-scan *{display:block;width:100%;font-size:1em;font-weight:bold;font-style:normal;text-align:center}.next-scan strong{position:absolute;top:0;padding:0.4em 0;color:#fff;background-color:#00709E;box-shadow:0 2px 0 #00709E}.next-scan em{position:absolute;bottom:0.3em;color:#00709E}.next-scan span{width:100%;font-size:2.8em;padding-top:1.15em;color:#2f2f2f}#wf-lt-listings .wfActEvent{padding-left:15px;border-left:5px solid #cccccc}#wf-lt-listings .wfActEvent.wfHuman{border-left:5px solid #16bc9b}#wf-lt-listings .wfActEvent.wfActionBlocked{border-left:5px solid #d03935}#wf-lt-listings .wfActEvent.wfNotice{border-left:5px solid #c10000}#wf-lt-listings .wfActEvent.wfWarning,#wf-lt-listings .wfActEvent.wf404,#wf-lt-listings .wfActEvent.wfFailedLogin{border-left:5px solid #ffd10a}#wf-lt-listings .wfActEvent:hover{background-color:#fff9e9 !important}.wf-live-traffic-controls{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:column;flex-direction:column;width:100%;margin-bottom:0}.wf-live-traffic-controls>*:first-child{-webkit-flex-grow:1;flex-grow:1}.wf-live-traffic-controls>*:last-child{-webkit-flex-grow:0;flex-grow:0}@media (min-width: 768px){.wf-live-traffic-controls{-webkit-flex-direction:row;flex-direction:row}}.wf-live-traffic-filter{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-align-content:flex-start;align-content:flex-start;-webkit-justify-content:flex-start;justify-content:flex-start}@media (min-width: 768px){.wf-live-traffic-filter{-webkit-flex-direction:row;flex-direction:row}}.wf-live-traffic-filter>*{padding:0.5rem}.wf-live-traffic-filter h2{margin:0;padding-bottom:0.5rem}@media (min-width: 768px){.wf-live-traffic-filter h2{padding-bottom:0;padding-right:0.5rem}}.wf-live-traffic-show-expanded{text-align:right;padding:0.5rem}@media (max-width: 1330px){.wf-live-traffic-show-expanded{display:none}}#wf-lt-advanced-filters{padding-left:0;padding-right:0;overflow:hidden}.wf-live-traffic-filter-detail{display:-webkit-flex;display:flex;-webkit-align-items:flex-start;align-items:flex-start;-webkit-align-content:flex-start;align-content:flex-start;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:column;flex-direction:column}@media (min-width: 768px){.wf-live-traffic-filter-detail{-webkit-flex-direction:row;flex-direction:row}.wf-live-traffic-filter-detail *{-webkit-flex-grow:1;flex-grow:1}}.wf-live-traffic-filter-detail .wf-live-traffic-filter-item{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-align-content:flex-start;align-content:flex-start;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:row;flex-direction:row}.wf-live-traffic-filter-detail .wf-live-traffic-filter-item .wf-live-traffic-filter-remove{margin-left:0.5rem;font-size:1.5rem;color:#333}.wf-live-traffic-filter-detail .wf-live-traffic-filter-item .wf-live-traffic-filter-item-parameters{display:-webkit-flex;display:flex;-webkit-align-items:flex-start;align-items:flex-start;-webkit-align-content:flex-start;align-content:flex-start;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:column;flex-direction:column}.wf-live-traffic-filter-detail .wf-live-traffic-filter-item .wf-live-traffic-filter-item-parameters div{padding:0.25rem 0}.wf-live-traffic-filter-detail .wf-live-traffic-filter-item .wf-live-traffic-filter-item-parameters select{font-size:0.75rem !important}@media (min-width: 768px){.wf-live-traffic-filter-detail .wf-live-traffic-filter-item .wf-live-traffic-filter-item-parameters{-webkit-flex-direction:row;flex-direction:row;-webkit-align-items:center;align-items:center}.wf-live-traffic-filter-detail .wf-live-traffic-filter-item .wf-live-traffic-filter-item-parameters div{padding:0}.wf-live-traffic-filter-detail .wf-live-traffic-filter-item .wf-live-traffic-filter-item-parameters select{font-size:1rem !important}}.wf-filtered-traffic .wf-filtered-traffic-hits{font-size:1.75rem;color:#999999;margin-top:10px}#wf-live-traffic{position:relative;overflow:visible}#wf-live-traffic-legend{white-space:nowrap;background-color:#fff;padding:0.75rem 0px;position:fixed;width:320px;height:17px;top:auto;bottom:0px;right:auto;left:10px;z-index:2000;box-shadow:0px 0px 5px rgba(0,0,0,0.5);padding-left:1rem}@media (min-width: 768px){#wf-live-traffic-legend{left:182px}}@media (max-width: 1330px){#wf-live-traffic-legend{display:none}}#wf-live-traffic-legend-placeholder{display:none;padding:12px}#wf-live-traffic-legend-placeholder.sticky{display:block}#wf-live-traffic-legend ul{margin:0;padding:0}#wf-live-traffic-legend ul:before,#wf-live-traffic-legend ul:after{content:" ";display:table}#wf-live-traffic-legend ul:after{clear:both}#wf-live-traffic-legend ul li{margin:0 1rem 0 0;padding:0;position:relative;float:left;font-size:0.7185rem}@media (min-width: 768px){#wf-live-traffic-legend ul li{font-size:0.8125rem}}#wf-live-traffic-legend ul li+li{margin-left:0.5rem}#wf-live-traffic-legend ul li:before,.wf-live-traffic-hit-type:before{content:'';display:inline-block;margin:3px 6px 0 0;width:12px;height:12px;background-color:#CCCCCC;border-radius:10px;vertical-align:-2px}#wf-live-traffic-legend ul li.wfHuman:before,.wf-live-traffic-hit-type.wfHuman:before{background-color:#16bc9b}#wf-live-traffic-legend ul li.wfNotice:before,.wf-live-traffic-hit-type.wfNotice:before,#wf-live-traffic-legend ul li.wf404:before,.wf-live-traffic-hit-type.wf404:before,#wf-live-traffic-legend ul li.wfFailedLogin:before,.wf-live-traffic-hit-type.wfFailedLogin:before{background-color:#ffd10a}#wf-live-traffic-legend ul li.wfBlocked:before,.wf-live-traffic-hit-type.wfBlocked:before,#wf-live-traffic-legend ul li.wfActionBlocked:before,.wf-live-traffic-hit-type.wfActionBlocked:before{background-color:#d03935}.wfTimeAgo{font-family:Georgia,Times New Roman,Times,serif;color:#999;font-weight:bold;font-style:italic}.wfActEvent{border-bottom:1px solid #CCC;padding:10px 20px;overflow:auto}.wf-pad-small{margin:8px 0}#wf-lt-listings{margin:0 0 0}#wf-lt-listings a{cursor:pointer;text-decoration:none}#wf-lt-listings a:hover{text-decoration:underline}#wf-lt-listings a.button,#wf-lt-listings a.wf-btn{text-decoration:none}[class*="span"]{float:left;min-height:1px;margin-left:30px}.highlighted,.highlighted td,#wf-live-traffic .wf-striped-table .highlighted td{-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}@-moz-keyframes highlighted{0%{opacity:0;background-color:#ffeaa0}100%{opacity:1;background-color:#ffffff}}@-webkit-keyframes highlighted{0%{opacity:0;background-color:#ffeaa0}100%{opacity:1;background-color:#ffffff}}@keyframes highlighted{0%{opacity:0;background-color:#ffeaa0}100%{opacity:1;background-color:#ffffff}}@-moz-keyframes highlightedBlocked{0%{opacity:0;background-color:#ffeaa0}100%{opacity:1;background-color:#fff6f6}}@-webkit-keyframes highlightedBlocked{0%{opacity:0;background-color:#ffeaa0}100%{opacity:1;background-color:#fff6f6}}@keyframes highlightedBlocked{0%{opacity:0;background-color:#ffeaa0}100%{opacity:1;background-color:#fff6f6}}.highlighted,.highlighted td,#wf-live-traffic .wf-striped-table .highlighted td{-webkit-animation-name:highlighted;animation-name:highlighted}.highlighted.wfActionBlocked,.highlighted td.wfActionBlocked,#wf-live-traffic .wf-striped-table .highlighted td.wfActionBlocked{-webkit-animation-name:highlightedBlocked;animation-name:highlightedBlocked}#wf-lt-preset-filters{min-width:250px}#wf-lt-advanced-filters>table{width:100%}#wf-lt-advanced-filters>table>tr>td{vertical-align:top}.wf-lt-url{white-space:nowrap}.wf-live-traffic-filter label{font-weight:normal}#wf-live-traffic .wf-striped-table th,#wf-live-traffic .wf-striped-table td{padding:.5rem .6rem}#wf-live-traffic .wf-striped-table th{white-space:nowrap}#wf-live-traffic .wf-striped-table tbody tr:hover>td{background-color:#e7f5ff}#wf-live-traffic .wf-live-traffic-show-details{font-size:1.5rem;color:#9a9a9a;text-align:center;cursor:hand}#wf-live-traffic .wf-live-traffic-show-details .wf-ion-eye-disabled{display:none}#wf-live-traffic .wf-details-open .wf-live-traffic-show-details .wf-ion-eye-disabled{display:inline-block}#wf-live-traffic .wf-details-open .wf-live-traffic-show-details .wf-ion-eye{display:none}#wf-live-traffic.wf-live-traffic-display-expanded .wf-summary-row{display:none}#wf-live-traffic.wf-live-traffic-display-expanded .wf-live-traffic-activity-detail h2{display:none}#wf-live-traffic.wf-live-traffic-display-expanded .wf-striped-table thead{display:none}#wf-live-traffic .wf-details-hidden .wf-live-traffic-details,#wf-live-traffic .wf-details-visible .wf-live-traffic-details{transition:padding 200ms}#wf-live-traffic .wf-details-hidden .wf-live-traffic-details{padding:0 .6rem}#wf-live-traffic .wf-details-visible .wf-live-traffic-details,#wf-live-traffic.wf-live-traffic-display-expanded .wf-details-hidden .wf-live-traffic-details{padding:.8rem .6rem}#wf-live-traffic.wf-live-traffic-display-expanded .wf-details-hidden .wf-live-traffic-details{border-top:1px solid #e2e2e2}#wf-live-traffic .wf-details-hidden .wf-live-traffic-activity-detail-wrapper,#wf-live-traffic .wf-details-visible .wf-live-traffic-activity-detail-wrapper{transition:opacity 200ms, max-height 200ms ease-out;overflow:hidden}#wf-live-traffic .wf-details-hidden .wf-live-traffic-activity-detail-wrapper{opacity:0;max-height:0px}#wf-live-traffic .wf-details-visible .wf-live-traffic-activity-detail-wrapper,#wf-live-traffic.wf-live-traffic-display-expanded .wf-details-hidden .wf-live-traffic-activity-detail-wrapper{opacity:1;max-height:800px}#wf-live-traffic .wf-block-ip-btn{display:none}#wf-live-traffic-group-by{width:100%}#wf-live-traffic-no-group-by{overflow-x:auto}@media (max-width: 1330px){#wf-live-traffic .wf-summary-row{display:none}#wf-live-traffic .wf-live-traffic-activity-detail h2{display:none}#wf-live-traffic .wf-striped-table thead{display:none}#wf-live-traffic .wf-details-hidden .wf-live-traffic-details{padding:0.8rem 0.6rem}#wf-live-traffic .wf-details-hidden .wf-live-traffic-details{border-top:1px solid #e2e2e2}#wf-live-traffic .wf-details-hidden .wf-live-traffic-activity-detail-wrapper{opacity:1;max-height:300px}#wf-live-traffic-no-group-by .wf-striped-table{table-layout:fixed}}.wf-live-traffic-activity-type{text-align:center;float:left;width:65px}@media (min-width: 768px){.wf-live-traffic-activity-type{width:85px}}@media (min-width: 992px){.wf-live-traffic-activity-type{width:105px}}@media (min-width: 1200px){.wf-live-traffic-activity-type{width:125px}}.wf-live-traffic-activity-type .wf-live-traffic-type-icon{font-size:3rem;color:#CCCCCC}@media (min-width: 768px){.wf-live-traffic-activity-type .wf-live-traffic-type-icon{font-size:4rem}}@media (min-width: 992px){.wf-live-traffic-activity-type .wf-live-traffic-type-icon{font-size:5rem}}@media (min-width: 1200px){.wf-live-traffic-activity-type .wf-live-traffic-type-icon{font-size:6rem}}.wf-live-traffic-activity-type .wf-live-traffic-type-icon.wf-icon-human{color:#16bc9b}.wf-live-traffic-activity-type .wf-live-traffic-type-icon.wf-icon-warning{color:#ffd10a}.wf-live-traffic-activity-type .wf-live-traffic-type-icon.wf-icon-blocked{color:#d03935}.wf-live-traffic-activity-detail{margin:0;margin-left:90px}@media (min-width: 768px){.wf-live-traffic-activity-detail{margin-left:110px}}@media (min-width: 992px){.wf-live-traffic-activity-detail{margin-left:130px}}@media (min-width: 1200px){.wf-live-traffic-activity-detail{margin-left:150px}}.wf-live-traffic-activity-detail h2{margin:0px 0px .5rem}.wf-live-traffic-actions{margin:.5rem 0px 0px}#wf-live-traffic-util-overlay-wrapper{position:fixed;top:32px;right:0px;bottom:0px;left:0px;background-color:rgba(0,0,0,0.5);z-index:3000}#wf-live-traffic-util-overlay-wrapper .wf-live-traffic-util-overlay{position:fixed;top:32px;right:0px;bottom:0px;left:auto;max-width:800px;background-color:#ffffff;overflow:auto}#wf-live-traffic-util-overlay-wrapper .wf-live-traffic-util-overlay-header,#wf-live-traffic-util-overlay-wrapper .wf-live-traffic-util-overlay-body{padding:1rem 1.5rem}#wf-live-traffic-util-overlay-wrapper .wf-live-traffic-util-overlay-body{padding:1rem 1.5rem 1rem 3rem}#wf-live-traffic-util-overlay-wrapper .wf-live-traffic-util-overlay-header{background-color:#e9e9e9;border:1px solid #ffd10a;border-width:10px 0px}#wf-live-traffic-util-overlay-wrapper .wf-live-traffic-util-overlay-body .wf-flex-row{margin:0.6rem 0}#wf-live-traffic-util-overlay-wrapper .wf-live-traffic-actions{display:none}#wf-live-traffic-util-overlay-wrapper .wf-live-traffic-util-overlay-close{position:absolute;top:20px;right:16px;font-size:20px;cursor:pointer}#wf-live-traffic-util-overlay-wrapper .wf-live-traffic-activity-detail div{margin:0px 0px 0.6rem}#wf-live-traffic-util-overlay-wrapper .wf-block-ip-btn{display:inline-block}#wf-live-traffic-options .wf-block-list .wf-option-text .wf-option-title{width:30%}.wf-recent-traffic-table{font-size:.7rem}.wf-recent-traffic-table th,.wf-recent-traffic-table td{vertical-align:top}.wf-recent-traffic-table th{text-align:left;white-space:nowrap}.wf-recent-traffic-table td{word-wrap:break-word;word-break:break-all}.wf-recent-traffic-table .wf-recent-traffic-table-row-border td div{border-top:1px solid #e2e2e2;margin:10px 0}.wf-live-traffic-none{padding:0.5rem 0.6rem}.wf-flag.wf-flag-unspecified{width:16px;height:16px;background:none}.wf-flag.wf-flag-unspecified path{fill:#9f9fa0}table.block-ranges-table{border-collapse:collapse;margin:10px 0 0}table.block-ranges-table tr td{border:1px solid #CCC;border-width:1px 0;padding:10px 0 12px 0}#input-wafStatus,#input-wafStatus option,.wfselect2-container--default{font-size:0.7rem;font-weight:bold}@media (min-width: 768px){#input-wafStatus,#input-wafStatus option,.wfselect2-container--default{font-size:0.8rem}}@media (min-width: 992px){#input-wafStatus,#input-wafStatus option,.wfselect2-container--default{font-size:0.9rem}}.wfselect2-results__options{border-top:1px solid #e2e2e2}.wafStatus-enabled,.wafStatus-learning-mode,.wafStatus-disabled,.wafStatus-enabled.wfselect2-container--default .wfselect2-selection--single,.wafStatus-learning-mode.wfselect2-container--default .wfselect2-selection--single,.wafStatus-disabled.wfselect2-container--default .wfselect2-selection--single{height:40px;border-radius:0;border:0;background-color:#fff;box-shadow:1px 1px 1px 2px rgba(215,215,215,0.35)}.wafStatus-enabled .wfselect2-selection__rendered,.wafStatus-learning-mode .wfselect2-selection__rendered,.wafStatus-disabled .wfselect2-selection__rendered,.wafStatus-enabled.wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__rendered,.wafStatus-learning-mode.wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__rendered,.wafStatus-disabled.wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__rendered{color:#333;line-height:40px}.wafStatus-enabled .wfselect2-selection__arrow,.wafStatus-learning-mode .wfselect2-selection__arrow,.wafStatus-disabled .wfselect2-selection__arrow,.wafStatus-enabled.wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__arrow,.wafStatus-learning-mode.wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__arrow,.wafStatus-disabled.wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__arrow{height:38px}#waf-config-form .waf-config-label{font-size:1.3em}#waf-config-form .wfselect2-container--default .wfselect2-selection--single{padding:0.4rem;text-shadow:0 0 3px #000000;font-weight:bold}#waf-config-form .wfselect2-container .wfselect2-selection--single{height:auto}#waf-config-form .wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__arrow{height:100%;top:0}.wafStatus-enabled.wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__arrow b,.wafStatus-learning-mode.wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__arrow b,.wafStatus-disabled.wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__arrow b{border-color:#333 transparent transparent}.wafStatus-enabled.wfselect2-container--default.wfselect2-container--open .wfselect2-selection--single .wfselect2-selection__arrow b,.wafStatus-learning-mode.wfselect2-container--default.wfselect2-container--open .wfselect2-selection--single .wfselect2-selection__arrow b,.wafStatus-disabled.wfselect2-container--default.wfselect2-container--open .wfselect2-selection--single .wfselect2-selection__arrow b{border-color:transparent transparent #333}#waf-learning-mode-grace-period{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:row;flex-direction:row}#waf-learning-mode-grace-period span{padding:0 0.5rem 0 1rem}#waf-learning-mode-grace-period input{width:auto}#whitelist-form{padding-top:0.5rem}#whitelist-form .wfselect2-container--default .wfselect2-selection--single{display:block;width:100%;height:38px;padding:.5rem 1.25rem;font-size:14px;line-height:1.42857;color:#2b2b2b;background-color:#fff;background-image:none;border:1px solid #ddd;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-transition:border-color ease-in-out 0.15s,box-shadow ease-in-out 0.15s;-o-transition:border-color ease-in-out 0.15s,box-shadow ease-in-out 0.15s;transition:border-color ease-in-out 0.15s,box-shadow ease-in-out 0.15s}#whitelist-form .wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__rendered{color:#2b2b2b;line-height:inherit}#whitelist-form .wfselect2-container--default .wfselect2-selection--single .wfselect2-selection__arrow{height:38px}#whitelist-form-separator{margin:1rem 0}#whitelist-table-controls{margin-bottom:0.5rem}#whitelist-table-controls .wfselect2-container--default{text-align:left !important}#whitelist-table-controls .wf-select-group{-webkit-justify-content:flex-end !important;justify-content:flex-end !important}.whitelist-table-container{overflow-x:auto}table.whitelist-table .whitelist-edit{display:none}table.whitelist-table .edit-mode .whitelist-display{display:none}table.whitelist-table .edit-mode .whitelist-edit{display:block}table.whitelist-table .edit-mode span.whitelist-edit,table.whitelist-table .edit-mode input.whitelist-edit{display:inline}.wf-bulk-action{margin:12px 0}tr.wf-table-filters input{max-width:120px}.wf-waf-status-disabled{padding:2rem 0}.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status .wf-block-labeled-value-value{padding-top:0}.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status .wf-block-labeled-value-value .wf-fa{font-size:8rem}.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status .wf-block-labeled-value-value svg{width:160px}.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status .wf-block-labeled-value-label{font-size:1.3125rem;font-weight:300;line-height:1.5;padding-bottom:0}.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status-full-enabled{background-color:#00709e}.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status-full-enabled .wf-block-labeled-value-value{color:#ffffff}.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status-full-enabled .wf-block-labeled-value-label{color:#ffffff;padding:0}.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status-enabled .wf-block-labeled-value-value{color:#00709e}.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status-enabled .wf-block-labeled-value-value svg{fill:#00709e}.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status-enabled .wf-block-labeled-value-label{color:#00709e}.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status-learning-mode .wf-block-labeled-value-value,.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status-disabled .wf-block-labeled-value-value{color:#9f9fa0}.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status-learning-mode .wf-block-labeled-value-value svg,.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status-disabled .wf-block-labeled-value-value svg{fill:#9f9fa0}.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status-learning-mode .wf-block-labeled-value-label,.wf-block .wf-block-content .wf-block-labeled-value.wf-waf-status-disabled .wf-block-labeled-value-label{color:#9f9fa0}.wf-waf-coverage li{-webkit-align-items:flex-start !important;align-items:flex-start !important}.wf-waf-navigation .wf-block-navigation-option-content,.wf-blocking-status .wf-block-navigation-option-content{padding:1.5rem 0 1.5rem 1.0rem}.wf-waf-navigation .wf-block-navigation-option-content h4,.wf-blocking-status .wf-block-navigation-option-content h4{margin:0 0 0.25rem 0}.wf-waf-navigation .wf-block-navigation-option-content p,.wf-blocking-status .wf-block-navigation-option-content p{margin:0 0 0.45rem 0}.wf-blocking-status>li{-webkit-flex-grow:0 !important;flex-grow:0 !important;-webkit-flex-basis:66.66667% !important;flex-basis:66.66667% !important}.wf-blocking-status>li:first-of-type{-webkit-flex-basis:33.33333% !important;flex-basis:33.33333% !important}.wf-blocking-status-premium>li{-webkit-flex-grow:0 !important;flex-grow:0 !important;-webkit-flex-basis:33.33333% !important;flex-basis:33.33333% !important}ul.wf-option.wf-option-rate-limit *{-webkit-flex-grow:1;flex-grow:1}ul.wf-option.wf-option-rate-limit *:first-child{-webkit-flex-grow:0;flex-grow:0}ul.wf-option.wf-option-rate-limit .wfselect2-container{min-width:100px}@media (min-width: 768px){ul.wf-option.wf-option-rate-limit .wfselect2-container{min-width:140px}}@media (min-width: 992px){ul.wf-option.wf-option-rate-limit .wfselect2-container{min-width:140px}}#waf-rules-wrapper tbody tr:nth-of-type(n+10){display:none}#waf-rules-wrapper.wf-show-all tbody tr:nth-of-type(n+10){display:table-row}#waf-rules-wrapper.wf-show-all #waf-show-all-rules{display:none}.wf-waf-backup-file-list{display:-webkit-flex;display:flex;-webkit-align-items:flex-start;align-items:flex-start;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:row;flex-direction:row}.wf-waf-backup-file-list>*{margin-left:0.5rem !important}.wf-waf-backup-file-list>*:first-child{margin-left:0 !important}#wf-option-loginSecurityEnabled .wf-option-subtitle{font-size:.875rem}.wf-scan-status-disabled{padding:2rem 0}.wf-block .wf-block-content .wf-block-labeled-value.wf-scan-status .wf-block-labeled-value-value{padding-top:0}.wf-block .wf-block-content .wf-block-labeled-value.wf-scan-status .wf-block-labeled-value-value .wf-fa{font-size:8rem}.wf-block .wf-block-content .wf-block-labeled-value.wf-scan-status .wf-block-labeled-value-value svg{width:160px}.wf-block .wf-block-content .wf-block-labeled-value.wf-scan-status .wf-block-labeled-value-label{font-size:1.3125rem;font-weight:300;line-height:1.5;padding-bottom:0}.wf-block .wf-block-content .wf-block-labeled-value.wf-scan-status-full-enabled{background-color:#00709e}.wf-block .wf-block-content .wf-block-labeled-value.wf-scan-status-full-enabled .wf-block-labeled-value-value{color:#ffffff}.wf-block .wf-block-content .wf-block-labeled-value.wf-scan-status-full-enabled .wf-block-labeled-value-label{color:#ffffff;padding:0}.wf-block .wf-block-content .wf-block-labeled-value.wf-scan-status-enabled .wf-block-labeled-value-value{color:#00709e}.wf-block .wf-block-content .wf-block-labeled-value.wf-scan-status-enabled .wf-block-labeled-value-value svg{fill:#00709e}.wf-block .wf-block-content .wf-block-labeled-value.wf-scan-status-enabled .wf-block-labeled-value-label{color:#00709e}.wf-block .wf-block-content .wf-block-labeled-value.wf-scan-status-disabled .wf-block-labeled-value-value{color:#9f9fa0}.wf-block .wf-block-content .wf-block-labeled-value.wf-scan-status-disabled .wf-block-labeled-value-value svg{fill:#9f9fa0}.wf-block .wf-block-content .wf-block-labeled-value.wf-scan-status-disabled .wf-block-labeled-value-label{color:#9f9fa0}.wf-scan-navigation .wf-block-navigation-option-content{padding:1.5rem 0 1.5rem 1.0rem}.wf-scan-navigation .wf-block-navigation-option-content h4{margin:0 0 0.25rem 0}.wf-scan-navigation .wf-block-navigation-option-content p{margin:0 0 0.45rem 0}#wf-scan-starter{-webkit-justify-content:center;justify-content:center}#wf-scan-starter:hover{cursor:unset}#wf-scan-starter:hover a{text-decoration:none}.wf-scanner-progress{display:-webkit-flex;display:flex;-webkit-align-items:flex-start;align-items:flex-start;-webkit-justify-content:space-between;justify-content:space-between;-webkit-flex-direction:row;flex-direction:row;-webkit-flex-wrap:nowrap;flex-wrap:nowrap;margin-top:0.5rem;margin-bottom:0.5rem;background:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB3aWR0aD0iMXB4IiBoZWlnaHQ9IjZweCIgdmlld0JveD0iMCAwIDEgNiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3BhY2U9InByZXNlcnZlIj4KCTxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIGZpbGw9IiNkMWQxZDEiLz48cmVjdCB4PSIwIiB5PSI1IiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBmaWxsPSIjZDFkMWQxIi8+Cjwvc3ZnPg==");background-repeat:repeat-x;background-position:center 24px;overflow-x:auto;overflow-y:hidden}.wf-scanner-progress>.wf-scan-step{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;-webkit-flex-direction:column;flex-direction:column;padding-left:0.5rem;padding-right:0.5rem}.wf-scanner-progress>.wf-scan-step:first-of-type{padding-left:0;background-image:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuMCIgeTE9IjAuNSIgeDI9IjEuMCIgeTI9IjAuNSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIvPjxzdG9wIG9mZnNldD0iNTAlIiBzdG9wLWNvbG9yPSIjZmZmZmZmIi8+PHN0b3Agb2Zmc2V0PSI1MSUiIHN0b3AtY29sb3I9IiNmZmZmZmYiIHN0b3Atb3BhY2l0eT0iMC4wIi8+PHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSIjZmZmZmZmIiBzdG9wLW9wYWNpdHk9IjAuMCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');background-size:100%;background-image:-webkit-gradient(linear, 0% 50%, 100% 50%, color-stop(0%, #ffffff),color-stop(50%, #ffffff),color-stop(51%, rgba(255,255,255,0)),color-stop(100%, rgba(255,255,255,0)));background-image:-moz-linear-gradient(left, #ffffff 0%,#ffffff 50%,rgba(255,255,255,0) 51%,rgba(255,255,255,0) 100%);background-image:-webkit-linear-gradient(left, #ffffff 0%,#ffffff 50%,rgba(255,255,255,0) 51%,rgba(255,255,255,0) 100%);background-image:linear-gradient(to right, #ffffff 0%,#ffffff 50%,rgba(255,255,255,0) 51%,rgba(255,255,255,0) 100%);background-repeat:no-repeat;background-position:left center}.wf-scanner-progress>.wf-scan-step:last-of-type{padding-right:0;background-image:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuMCIgeTE9IjAuNSIgeDI9IjEuMCIgeTI9IjAuNSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIgc3RvcC1vcGFjaXR5PSIwLjAiLz48c3RvcCBvZmZzZXQ9IjQ5JSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIgc3RvcC1vcGFjaXR5PSIwLjAiLz48c3RvcCBvZmZzZXQ9IjUwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');background-size:100%;background-image:-webkit-gradient(linear, 0% 50%, 100% 50%, color-stop(0%, rgba(255,255,255,0)),color-stop(49%, rgba(255,255,255,0)),color-stop(50%, #ffffff),color-stop(100%, #ffffff));background-image:-moz-linear-gradient(left, rgba(255,255,255,0) 0%,rgba(255,255,255,0) 49%,#ffffff 50%,#ffffff 100%);background-image:-webkit-linear-gradient(left, rgba(255,255,255,0) 0%,rgba(255,255,255,0) 49%,#ffffff 50%,#ffffff 100%);background-image:linear-gradient(to right, rgba(255,255,255,0) 0%,rgba(255,255,255,0) 49%,#ffffff 50%,#ffffff 100%);background-repeat:no-repeat;background-position:right center}.wf-scanner-progress>.wf-scan-step>.wf-scan-step-title{font-size:0.7rem;padding-top:0.5rem;white-space:nowrap}.wf-scanner-progress>.wf-scan-step>.wf-scan-step-subtitle{font-size:0.7rem}.wf-scanner-progress>.wf-scan-step>.wf-scan-step-icon>.wf-scan-step-pending,.wf-step-pending{width:50px;height:54px;background:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB3aWR0aD0iMTRweCIgaGVpZ2h0PSIxNHB4IiB2aWV3Qm94PSIwIDAgMTQgMTQiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+Cgk8Y2lyY2xlIGN4PSI3IiBjeT0iNyIgcj0iNyIgZmlsbD0iI2QxZDFkMSIvPgo8L3N2Zz4=");background-repeat:no-repeat;background-position:center center}.wf-scanner-progress>.wf-scan-step>.wf-scan-step-icon>.wf-scan-step-running,.wf-step-running{display:none;background-color:#ffffff !important}.wf-scanner-progress>.wf-scan-step>.wf-scan-step-icon>.wf-scan-step-complete-success,.wf-step-complete-success{display:none;width:50px;height:54px;background:#fff url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj48c3ZnIHdpZHRoPSI1MHB4IiBoZWlnaHQ9IjUwcHgiIHZpZXdCb3g9IjAgMCAxMDAgMTAwIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTk4LjI4NywyMS4wMjVsLTcuODIzLC03LjgxMmMtMS4wNjYsLTEuMDkyIC0yLjUyOCwtMS43MDggLTQuMDU0LC0xLjcwOGMtMS41MjUsMCAtMi45ODgsMC42MTYgLTQuMDUzLDEuNzA4bC00Ni4wMTIsNDYuMDEybC0xOC43MTMsLTE4LjcxMmMtMS4wNjYsLTEuMDkgLTIuNTI5LC0xLjcwNCAtNC4wNTMsLTEuNzA0Yy0xLjUyNSwwIC0yLjk4NywwLjYxNCAtNC4wNTQsMS43MDRsLTcuODEyLDcuODM0Yy0xLjA5MiwxLjA2NSAtMS43MDgsMi41MjggLTEuNzA4LDQuMDUzYzAsMS41MjYgMC42MTYsMi45ODggMS43MDgsNC4wNTRsMzAuNTUxLDMwLjU1MWMxLjA2NywxLjA4OSAyLjUyOSwxLjcwMyA0LjA1NCwxLjcwM2MxLjUyNCwwIDIuOTg2LC0wLjYxNCA0LjA1MywtMS43MDNsNTcuOTE2LC01Ny44NjJjMS4wOTIsLTEuMDY1IDEuNzA4LC0yLjUyOCAxLjcwOCwtNC4wNTNjMCwtMS41MjYgLTAuNjE2LC0yLjk4OCAtMS43MDgsLTQuMDU0bDAsLTAuMDExbDAsMFoiIGZpbGw9IiMwMDcwOWUiLz48L3N2Zz4=");background-repeat:no-repeat;background-position:center center;background-size:80%}.wf-scanner-progress>.wf-scan-step>.wf-scan-step-icon>.wf-scan-step-complete-warning,.wf-step-complete-warning{display:none;width:50px;height:54px;background:#fff url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj48c3ZnIHdpZHRoPSI1MHB4IiBoZWlnaHQ9IjUwcHgiIHZpZXdCb3g9IjAgMCAxMDAgMTAwIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTk5LjA1MSw4Mi44NDJsLTQyLjgxMiwtNzguNDgzYy0wLjYxLC0xLjEzMSAtMS41MTQsLTIuMDc3IC0yLjYxNywtMi43MzdjLTIuMjI3LC0xLjMzNCAtNS4wMTcsLTEuMzM0IC03LjI0NCwwYy0xLjEwNiwwLjY1OSAtMi4wMTMsMS42MDUgLTIuNjI1LDIuNzM3bC00Mi44MDQsNzguNDgzYy0xLjI5OSwyLjE2OCAtMS4yNTYsNC44OTYgMC4xMTEsNy4wMjFjMC42MTQsMS4wNjcgMS41LDEuOTUyIDIuNTY2LDIuNTY2YzEuMDc0LDAuNjI3IDIuMjk3LDAuOTU1IDMuNTQxLDAuOTQ5bDg1LjY0MSwwYzIuNTE3LC0wLjAwOSA0Ljg1MiwtMS4zNDcgNi4xMzIsLTMuNTE1YzEuMzY3LC0yLjEyNSAxLjQxLC00Ljg1MyAwLjExMSwtNy4wMjFsMCwwWm0tNDEuOTA2LC01LjU3NmMwLjAxMSwwLjQ5IC0wLjE4MSwwLjk2NCAtMC41MywxLjMwOGMtMC4zMjUsMC4zNDIgLTAuNzc3LDAuNTM0IC0xLjI0OSwwLjUzMWwtMTAuNzE1LDBjLTAuNDcyLDAuMDAzIC0wLjkyNCwtMC4xODkgLTEuMjQ5LC0wLjUzMWMtMC4zNDksLTAuMzQ0IC0wLjU0MiwtMC44MTggLTAuNTMsLTEuMzA4bDAsLTEwLjU4OGMtMC4wMTIsLTAuNDkgMC4xODEsLTAuOTY0IDAuNTMsLTEuMzA4YzAuMzI1LC0wLjM0MSAwLjc3NywtMC41MzMgMS4yNDksLTAuNTNsMTAuNjk4LDBjMC40NzUsLTAuMDA2IDAuOTMsMC4xODcgMS4yNTgsMC41M2MwLjM0OCwwLjM0NSAwLjU0LDAuODE4IDAuNTMsMS4zMDhsMCwxMC41ODhsMC4wMDgsMFptLTAuMTExLC0yMC44NDJjLTAuMDQ1LDAuMzggLTAuMjYzLDAuNzE4IC0wLjU5LDAuOTE2Yy0wLjM4OSwwLjI1IC0wLjg0NiwwLjM3NSAtMS4zMDgsMC4zNTlsLTEwLjMyMywwYy0wLjQ3LDAuMDEzIC0wLjkzNCwtMC4xMTIgLTEuMzM0LC0wLjM1OWMtMC4zMzgsLTAuMTg1IC0wLjU1MSwtMC41MzkgLTAuNTU2LC0wLjkyNGwtMC45NDksLTI1LjQ2OGMtMC4wMywtMC40NiAwLjE4MSwtMC45MDQgMC41NTYsLTEuMTcyYzAuMzU4LC0wLjM1NSAwLjgzMSwtMC41NzMgMS4zMzQsLTAuNjE2bDEyLjI3MiwwYzAuNTA2LDAuMDQgMC45ODIsMC4yNTggMS4zNDMsMC42MTZjMC4zNTcsMC4yMzIgMC41NjgsMC42MzUgMC41NTYsMS4wNmwtMS4wMDEsMjUuNTg4WiIgZmlsbD0iI2ZjYjIxNCIvPjwvc3ZnPg==");background-repeat:no-repeat;background-position:center center;background-size:80%}.wf-scanner-progress>.wf-scan-step>.wf-scan-step-icon>.wf-scan-step-disabled,.wf-step-disabled{display:none;width:50px;height:54px;background:#fff url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj48c3ZnIHdpZHRoPSI1MHB4IiBoZWlnaHQ9IjUwcHgiIHZpZXdCb3g9IjAgMCAxMDAgMTAwIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTk1Ljg5LDMwLjUyOGMtMi40OTYsLTUuOTQxIC02LjEwOCwtMTEuMzUxIC0xMC42NDIsLTE1LjkzOGMtNC41NzUsLTQuNTM4IC05Ljk5LC04LjE0OCAtMTUuOTQyLC0xMC42M2MtMTIuNDAxLC01LjI4IC0yNi40NDEsLTUuMjggLTM4Ljg0MiwwYy01Ljk2NSwyLjQ4NSAtMTEuMzg5LDYuMTAxIC0xNS45NzIsMTAuNjVjLTQuNTEsNC41ODYgLTguMTAxLDkuOTg5IC0xMC41ODIsMTUuOTE4Yy01LjI4NywxMi40MzIgLTUuMjg3LDI2LjQ5IDAsMzguOTIxYzIuNDk1LDUuOTQyIDYuMTA3LDExLjM1MyAxMC42NDIsMTUuOTM5YzQuNTgzLDQuNTQ4IDEwLjAwNyw4LjE2NSAxNS45NzIsMTAuNjQ5YzEyLjQsNS4yODQgMjYuNDQyLDUuMjg0IDM4Ljg0MiwwYzUuOTY1LC0yLjQ4NCAxMS4zODksLTYuMTAxIDE1Ljk3MiwtMTAuNjQ5YzQuNTM2LC00LjU4NSA4LjE0OSwtOS45OTYgMTAuNjQyLC0xNS45MzljNS4yODcsLTEyLjQzMSA1LjI4NywtMjYuNDg5IDAsLTM4LjkyMWwtMC4wOSwwWm0tNzUuNjA4LDM4Ljg1MWMtNy4zMDIsLTExLjIxMiAtNy42ODksLTI1LjYyIC0wLjk5OCwtMzcuMjA3YzMuMDc1LC01LjM3NSA3LjUyMiwtOS44NDQgMTIuODg3LC0xMi45NWM1LjM3NSwtMy4xMjkgMTEuNDk3LC00Ljc1NCAxNy43MTksLTQuNzAyYzYuOTU1LC0wLjA2IDEzLjc2NiwyLjAwMiAxOS41MTYsNS45MDdsLTQ5LjEyNCw0OC45NTJabTYyLjIwMSwtNS42NDhjLTEuNzU1LDQuMjI4IC00LjMxOCw4LjA3NiAtNy41NDcsMTEuMzI2Yy0zLjI0MywzLjIyOSAtNy4wNzYsNS44MDkgLTExLjI5LDcuNjAxYy00LjM0MywxLjg4MyAtOS4wMzEsMi44NDYgLTEzLjc2NiwyLjgyOWMtNi44NzIsMC4wMDggLTEzLjU5NSwtMi4wMTcgLTE5LjMxNiwtNS44MTdsNDkuMDU0LC00OC44MTNjMy43NDEsNS42ODcgNS43MTEsMTIuMzU0IDUuNjYsMTkuMTU3YzAuMDAzLDQuNzEzIC0wLjk0OCw5LjM3OSAtMi43OTUsMTMuNzE3bDAsMFoiIGZpbGw9IiNkMWQxZDEiLz48L3N2Zz4=");background-repeat:no-repeat;background-position:center center;background-size:80%}.wf-scanner-progress>.wf-scan-step>.wf-scan-step-icon>.wf-scan-step-premium,.wf-step-premium{width:50px;height:54px;background:#fff url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB3aWR0aD0iMjRweCIgaGVpZ2h0PSIzMHB4IiB2aWV3Qm94PSIwIDAgMjQgMzAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KCTxwYXRoIGQ9Ik0yMy45NDksMTQuMjMzYy0wLjM3OSwtMC4zOSAtMC45MDQsLTAuNjA2IC0xLjQ0OCwtMC41OTVsLTAuNjgzLDBsMCwtNC4wOTJjMC4wMzIsLTIuNTM1IC0wLjk4NiwtNC45NzMgLTIuODEyLC02LjczMWMtMS43NTksLTEuODI4IC00LjE5OCwtMi44NDcgLTYuNzM0LC0yLjgxNWMtMi41MzYsLTAuMDMyIC00Ljk3NiwwLjk4NyAtNi43MzQsMi44MTVjLTEuODI2LDEuNzU4IC0yLjg0NCw0LjE5NiAtMi44MTIsNi43MzFsMCw0LjA4OWwtMC42OCwwYy0wLjU0NCwtMC4wMTEgLTEuMDY5LDAuMjA1IC0xLjQ0OCwwLjU5NWMtMC4zOTUsMC4zODIgLTAuNjEyLDAuOTEyIC0wLjU5OCwxLjQ2MWwwLDEyLjI2NmMtMC4wMTEsMC41NDQgMC4yMDQsMS4wNjkgMC41OTUsMS40NDhjMC4zNzksMC4zOTEgMC45MDQsMC42MDYgMS40NDgsMC41OTVsMjAuNDU4LDBjMC4wMDMsMCAwLjAwNiwwIDAuMDEsMGMxLjExNywwIDIuMDM2LC0wLjkxOSAyLjAzNiwtMi4wMzdjMCwtMC4wMDMgMCwtMC4wMDYgMCwtMC4wMDlsMCwtMTIuMjYzYzAuMDExLC0wLjU0NCAtMC4yMDYsLTEuMDY5IC0wLjU5OCwtMS40NDhsMCwtMC4wMVptLTYuMjExLC0wLjU5NWwtMTAuOTE5LDBsMCwtNC4wOTJjLTAuMDIyLC0xLjQ1MSAwLjU1NywtMi44NDggMS41OTksLTMuODU4YzEuMDA5LC0xLjA0MiAyLjQwNywtMS42MjEgMy44NTcsLTEuNTk4YzEuNDUxLC0wLjAyMyAyLjg0OCwwLjU1NiAzLjg1OCwxLjU5OGMxLjA0MiwxLjAwOSAxLjYyMSwyLjQwNyAxLjU5OCwzLjg1OGwwLjAwNyw0LjA5MloiIGZpbGw9IiNkMWQxZDEiLz4KPC9zdmc+");background-repeat:no-repeat;background-position:center center;background-size:40%}.wf-scanner-progress>.wf-scan-step.wf-scan-step-premium>.wf-scan-step-icon>.wf-scan-step-pending{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-premium>.wf-scan-step-icon>.wf-scan-step-running{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-premium>.wf-scan-step-icon>.wf-scan-step-complete-success{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-premium>.wf-scan-step-icon>.wf-scan-step-complete-warning{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-premium>.wf-scan-step-icon>.wf-scan-step-disabled{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-running>.wf-scan-step-icon>.wf-scan-step-pending{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-running>.wf-scan-step-icon>.wf-scan-step-running{display:block}.wf-scanner-progress>.wf-scan-step.wf-scan-step-running>.wf-scan-step-icon>.wf-scan-step-complete-success{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-running>.wf-scan-step-icon>.wf-scan-step-complete-warning{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-running>.wf-scan-step-icon>.wf-scan-step-disabled{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-complete-success>.wf-scan-step-icon>.wf-scan-step-pending{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-complete-success>.wf-scan-step-icon>.wf-scan-step-running{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-complete-success>.wf-scan-step-icon>.wf-scan-step-complete-success{display:block}.wf-scanner-progress>.wf-scan-step.wf-scan-step-complete-success>.wf-scan-step-icon>.wf-scan-step-complete-warning{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-complete-success>.wf-scan-step-icon>.wf-scan-step-disabled{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-complete-warning>.wf-scan-step-icon>.wf-scan-step-pending{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-complete-warning>.wf-scan-step-icon>.wf-scan-step-running{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-complete-warning>.wf-scan-step-icon>.wf-scan-step-complete-success{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-complete-warning>.wf-scan-step-icon>.wf-scan-step-complete-warning{display:block}.wf-scanner-progress>.wf-scan-step.wf-scan-step-complete-warning>.wf-scan-step-icon>.wf-scan-step-disabled{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-disabled>.wf-scan-step-icon>.wf-scan-step-pending{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-disabled>.wf-scan-step-icon>.wf-scan-step-running{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-disabled>.wf-scan-step-icon>.wf-scan-step-complete-success{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-disabled>.wf-scan-step-icon>.wf-scan-step-complete-warning{display:none}.wf-scanner-progress>.wf-scan-step.wf-scan-step-disabled>.wf-scan-step-icon>.wf-scan-step-disabled{display:block}#wf-scan-last-status{font-size:0.75rem;text-align:center}@media (min-width: 768px){#wf-scan-last-status{text-align:left}}#wf-scan-activity-log-controls{-webkit-flex-shrink:0;flex-shrink:0;text-align:center;white-space:nowrap}@media (min-width: 768px){#wf-scan-activity-log-controls{text-align:right}}#wf-scan-activity-log-controls a{text-transform:uppercase;font-size:0.75rem;white-space:nowrap}#wf-scan-toggle-activity-log .wf-scan-activity-log-visible{display:none}#wf-scan-toggle-activity-log .wf-scan-activity-log-hidden{display:inline}#wf-scan-toggle-activity-log.wf-active .wf-scan-activity-log-visible{display:inline}#wf-scan-toggle-activity-log.wf-active .wf-scan-activity-log-hidden{display:none}#wf-scan-running-bar{height:4px;border:1px solid #e2e2e2;background-color:#ffffff;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px}#wf-scan-running-bar-pill{height:4px;background-color:#00709e;width:33.3333%;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;-webkit-animation:wf-scan-running-bar-pill-keyframes 1s linear infinite alternate both;-o-animation:wf-scan-running-bar-pill-keyframes 1s linear infinite alternate both;animation:wf-scan-running-bar-pill-keyframes 1s linear infinite alternate both}@-moz-keyframes wf-scan-running-bar-pill-keyframes{from{margin-left:0%}to{margin-left:66.6667%}}@-webkit-keyframes wf-scan-running-bar-pill-keyframes{from{margin-left:0%}to{margin-left:66.6667%}}@keyframes wf-scan-running-bar-pill-keyframes{from{margin-left:0%}to{margin-left:66.6667%}}#wf-scan-activity-log{display:none;overflow-x:hidden;overflow-y:auto;background-color:#ffffff;box-shadow:0 0 0 1px rgba(200,215,225,0.25),0 1px 2px #e9eff3;padding:0.5rem;height:7rem}#wf-scan-activity-log>li{margin:0;padding:0}#wf-scan-activity-log.wf-active{display:block}.wf-scan-tabs{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;box-shadow:inset 0px 0px 0px 1px #f1f1f1,inset 0px -1px 0px 1px #e2e2e2;margin:0.5rem 0 0 0}.wf-scan-tabs>*{-webkit-flex-grow:0;flex-grow:0;min-width:0}.wf-scan-tabs .wf-tab{border:1px solid #d0d0d0;border-top-right-radius:0.5rem;border-top-left-radius:0.5rem;border-bottom:none;margin:0;margin-left:0.5rem;background:#e6e6e6;color:#333}.wf-scan-tabs .wf-tab:first-of-type{margin-left:0}.wf-scan-tabs .wf-tab a{display:block;padding:0.5rem 1rem;font-size:14px;line-height:24px;text-decoration:none;font-weight:bold;color:#333}.wf-scan-tabs .wf-tab.wf-active,.wf-scan-tabs .wf-tab:hover{border-bottom:1px solid #ffffff;background:#ffffff;color:#00709e;margin-bottom:-1px;-webkit-box-shadow:none;box-shadow:none}.wf-scan-tabs .wf-tab.wf-active a,.wf-scan-tabs .wf-tab:hover a{color:#00709e}.wf-scan-tabs #wf-scan-bulk-buttons{-webkit-flex-grow:1 !important;flex-grow:1 !important;text-align:right}.wf-scan-tab-content{display:none;margin-top:15px}.wf-scan-tab-content.wf-active{display:block}.wf-scan-results{margin:0;margin-top:-1px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;border-left:1px solid #e2e2e2;border-right:1px solid #e2e2e2;border-bottom:1px solid #e2e2e2}.wf-scan-results>.wf-scan-results-stats{margin:0}.wf-scan-results>.wf-scan-results-stats>.wf-block{box-shadow:none;margin:0}.wf-scan-results>.wf-scan-results-stats>.wf-block>.wf-block-content>.wf-block-list>li{border-top:0px;padding:0 1rem}.wf-scan-results>.wf-scan-results-stats>.wf-block>.wf-block-content>.wf-block-list .wf-flex-horizontal>li{font-size:0.75rem;white-space:nowrap;margin:0}.wf-scan-results>.wf-scan-results-stats>.wf-block>.wf-block-content>.wf-block-list .wf-flex-horizontal>li:last-of-type{text-align:right}.wf-scan-results-issues{padding:0;margin:0;display:none}.wf-scan-results-issues.wf-active{display:block}.wf-issue,.wf-issue-site-cleaning{display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:column;flex-direction:column;border-top:1px solid #e2e2e2}.wf-issue:nth-of-type(2n),.wf-issue-site-cleaning:nth-of-type(2n){background-color:#fff}.wf-issue>li,.wf-issue-site-cleaning>li{margin:0}.wf-issue.wf-issue-severity-critical,.wf-issue-site-cleaning.wf-issue-severity-critical{border-left:4px solid #930000}.wf-issue.wf-issue-severity-high,.wf-issue-site-cleaning.wf-issue-severity-high{border-left:4px solid #c10000}.wf-issue.wf-issue-severity-warning,.wf-issue.wf-issue-severity-medium,.wf-issue-site-cleaning.wf-issue-severity-warning,.wf-issue-site-cleaning.wf-issue-severity-medium{border-left:4px solid #fcb214}.wf-issue.wf-issue-severity-low,.wf-issue-site-cleaning.wf-issue-severity-low{border-left:4px solid #3f596b}.wf-issue.wf-issue-severity-good,.wf-issue-site-cleaning.wf-issue-severity-good{border-left:4px solid #16bc9b}.wf-issue>.wf-issue-summary>ul,.wf-issue-site-cleaning>.wf-issue-summary>ul{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:row;flex-direction:row;padding:1.5rem}.wf-issue>.wf-issue-summary>ul>li,.wf-issue-site-cleaning>.wf-issue-summary>ul>li{margin:0;padding:0;padding-left:1.5rem}@media (max-width: 767px){.wf-issue>.wf-issue-summary>ul>li,.wf-issue-site-cleaning>.wf-issue-summary>ul>li{padding-left:0.5rem}}.wf-issue>.wf-issue-summary>ul>li:first-of-type,.wf-issue-site-cleaning>.wf-issue-summary>ul>li:first-of-type{padding-left:0}.wf-issue>.wf-issue-summary>ul>.wf-issue-icon,.wf-issue>.wf-issue-summary>ul>.wf-issue-icon-colored,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-icon,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-icon-colored{text-align:left;-webkit-flex-basis:50px;flex-basis:50px;-webkit-flex-shrink:0;flex-shrink:0}.wf-issue>.wf-issue-summary>ul>.wf-issue-icon>*,.wf-issue>.wf-issue-summary>ul>.wf-issue-icon-colored>*,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-icon>*,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-icon-colored>*{height:40px}.wf-issue>.wf-issue-summary>ul>.wf-issue-icon svg path,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-icon svg path{fill:#9e9e9e}.wf-issue>.wf-issue-summary>ul>.wf-issue-short,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short{-webkit-flex-basis:40%;flex-basis:40%}.wf-issue>.wf-issue-summary>ul>.wf-issue-stats,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-stats{-webkit-flex-basis:25%;flex-basis:25%}.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats{-webkit-flex-grow:1;flex-grow:1}.wf-issue>.wf-issue-summary>ul .wf-issue-severity-critical,.wf-issue>.wf-issue-summary>ul .wf-issue-severity-high,.wf-issue>.wf-issue-summary>ul .wf-issue-severity-medium,.wf-issue>.wf-issue-summary>ul .wf-issue-severity-low,.wf-issue>.wf-issue-summary>ul .wf-issue-severity-warning,.wf-issue-site-cleaning>.wf-issue-summary>ul .wf-issue-severity-critical,.wf-issue-site-cleaning>.wf-issue-summary>ul .wf-issue-severity-high,.wf-issue-site-cleaning>.wf-issue-summary>ul .wf-issue-severity-medium,.wf-issue-site-cleaning>.wf-issue-summary>ul .wf-issue-severity-low,.wf-issue-site-cleaning>.wf-issue-summary>ul .wf-issue-severity-warning{padding-left:18px;position:relative}.wf-issue>.wf-issue-summary>ul .wf-issue-severity-critical:before,.wf-issue>.wf-issue-summary>ul .wf-issue-severity-high:before,.wf-issue>.wf-issue-summary>ul .wf-issue-severity-medium:before,.wf-issue>.wf-issue-summary>ul .wf-issue-severity-low:before,.wf-issue>.wf-issue-summary>ul .wf-issue-severity-warning:before,.wf-issue-site-cleaning>.wf-issue-summary>ul .wf-issue-severity-critical:before,.wf-issue-site-cleaning>.wf-issue-summary>ul .wf-issue-severity-high:before,.wf-issue-site-cleaning>.wf-issue-summary>ul .wf-issue-severity-medium:before,.wf-issue-site-cleaning>.wf-issue-summary>ul .wf-issue-severity-low:before,.wf-issue-site-cleaning>.wf-issue-summary>ul .wf-issue-severity-warning:before{content:'';display:block;position:absolute;top:50%;left:0;margin-top:-5px;border:5px solid #9f9fa0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px}.wf-issue>.wf-issue-summary>ul .wf-issue-severity-critical:before,.wf-issue-site-cleaning>.wf-issue-summary>ul .wf-issue-severity-critical:before{border-color:#930000}.wf-issue>.wf-issue-summary>ul .wf-issue-severity-high:before,.wf-issue-site-cleaning>.wf-issue-summary>ul .wf-issue-severity-high:before{border-color:#c10000}.wf-issue>.wf-issue-summary>ul .wf-issue-severity-medium:before,.wf-issue>.wf-issue-summary>ul .wf-issue-severity-warning:before,.wf-issue-site-cleaning>.wf-issue-summary>ul .wf-issue-severity-medium:before,.wf-issue-site-cleaning>.wf-issue-summary>ul .wf-issue-severity-warning:before{border-color:#fcb214}.wf-issue>.wf-issue-summary>ul .wf-issue-severity-low:before,.wf-issue-site-cleaning>.wf-issue-summary>ul .wf-issue-severity-low:before{border-color:#3f596b}.wf-issue>.wf-issue-summary>ul>.wf-issue-controls,.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-controls,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls{-webkit-flex-grow:1;flex-grow:1;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-end;justify-content:flex-end;-webkit-flex-direction:row;flex-direction:row}.wf-issue>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control,.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;-webkit-flex-direction:column;flex-direction:column;padding-left:2rem;text-decoration:none}.wf-issue>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control:first-of-type,.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control:first-of-type,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control:first-of-type,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control:first-of-type{padding-left:0}.wf-issue>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control>.wf-issue-control-icon,.wf-issue>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control .wf-issue-control-icon-inactive,.wf-issue>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control .wf-issue-control-icon-active,.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control>.wf-issue-control-icon,.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control .wf-issue-control-icon-inactive,.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control .wf-issue-control-icon-active,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control>.wf-issue-control-icon,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control .wf-issue-control-icon-inactive,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control .wf-issue-control-icon-active,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control>.wf-issue-control-icon,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control .wf-issue-control-icon-inactive,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control .wf-issue-control-icon-active{height:20px}.wf-issue>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control>.wf-issue-control-icon path,.wf-issue>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control .wf-issue-control-icon-inactive path,.wf-issue>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control .wf-issue-control-icon-active path,.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control>.wf-issue-control-icon path,.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control .wf-issue-control-icon-inactive path,.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control .wf-issue-control-icon-active path,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control>.wf-issue-control-icon path,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control .wf-issue-control-icon-inactive path,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control .wf-issue-control-icon-active path,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control>.wf-issue-control-icon path,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control .wf-issue-control-icon-inactive path,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control .wf-issue-control-icon-active path{fill:#9e9e9e;fill-rule:nonzero}.wf-issue>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control>.wf-issue-control-label,.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control>.wf-issue-control-label,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control>.wf-issue-control-label,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control>.wf-issue-control-label{padding-top:0.65rem;font-size:0.7rem;font-weight:500;text-transform:uppercase;color:#9e9e9e}.wf-issue>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control:hover>.wf-issue-control-icon path,.wf-issue>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control:hover .wf-issue-control-icon-inactive path,.wf-issue>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control:hover .wf-issue-control-icon-active path,.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control:hover>.wf-issue-control-icon path,.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control:hover .wf-issue-control-icon-inactive path,.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control:hover .wf-issue-control-icon-active path,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control:hover>.wf-issue-control-icon path,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control:hover .wf-issue-control-icon-inactive path,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control:hover .wf-issue-control-icon-active path,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control:hover>.wf-issue-control-icon path,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control:hover .wf-issue-control-icon-inactive path,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control:hover .wf-issue-control-icon-active path{fill:#00709e}.wf-issue>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control:hover>.wf-issue-control-label,.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control:hover>.wf-issue-control-label,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-controls>.wf-issue-control:hover>.wf-issue-control-label,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls>.wf-issue-control:hover>.wf-issue-control-label{color:#00709e}.wf-issue>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls,.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short-stats>.wf-issue-controls{margin-top:1rem;-webkit-justify-content:flex-start;justify-content:flex-start}.wf-issue .wf-issue-control-icon-active,.wf-issue-site-cleaning .wf-issue-control-icon-active{display:none}.wf-issue .wf-issue-control-icon-inactive,.wf-issue-site-cleaning .wf-issue-control-icon-inactive{display:block}.wf-issue>.wf-issue-detail,.wf-issue-site-cleaning>.wf-issue-detail{display:none;padding:1.5rem;border-top:1px solid #e2e2e2}.wf-issue>.wf-issue-detail .wf-issue-detail-spacer,.wf-issue-site-cleaning>.wf-issue-detail .wf-issue-detail-spacer{height:1rem;margin:0;padding:0}.wf-issue>.wf-issue-detail .wf-issue-detail-controls,.wf-issue-site-cleaning>.wf-issue-detail .wf-issue-detail-controls{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:row;flex-direction:row;margin:0;margin-top:1rem}.wf-issue>.wf-issue-detail .wf-issue-detail-controls>*,.wf-issue-site-cleaning>.wf-issue-detail .wf-issue-detail-controls>*{margin-left:1rem}.wf-issue>.wf-issue-detail .wf-issue-detail-controls>*:first-of-type,.wf-issue-site-cleaning>.wf-issue-detail .wf-issue-detail-controls>*:first-of-type{margin-left:0}@media (max-width: 767px){.wf-issue>.wf-issue-detail .wf-issue-detail-controls,.wf-issue-site-cleaning>.wf-issue-detail .wf-issue-detail-controls{-webkit-align-items:flex-start;align-items:flex-start;-webkit-flex-direction:column;flex-direction:column}.wf-issue>.wf-issue-detail .wf-issue-detail-controls>*,.wf-issue-site-cleaning>.wf-issue-detail .wf-issue-detail-controls>*{margin-left:0;margin-top:0.5rem}.wf-issue>.wf-issue-detail .wf-issue-detail-controls>*:first-of-type,.wf-issue-site-cleaning>.wf-issue-detail .wf-issue-detail-controls>*:first-of-type{margin-top:0}}.wf-issue.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-show-details>.wf-issue-control-icon path,.wf-issue.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-show-details .wf-issue-control-icon-inactive path,.wf-issue.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-show-details .wf-issue-control-icon-active path,.wf-issue-site-cleaning.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-show-details>.wf-issue-control-icon path,.wf-issue-site-cleaning.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-show-details .wf-issue-control-icon-inactive path,.wf-issue-site-cleaning.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-show-details .wf-issue-control-icon-active path{fill:#00709e}.wf-issue.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-show-details>.wf-issue-control-label,.wf-issue-site-cleaning.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-show-details>.wf-issue-control-label{color:#00709e}.wf-issue.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-icon-inactive,.wf-issue-site-cleaning.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-icon-inactive{display:none}.wf-issue.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-icon-active,.wf-issue-site-cleaning.wf-active>.wf-issue-summary>ul>.wf-issue-controls .wf-issue-control-icon-active{display:block}.wf-issue.wf-active>.wf-issue-detail,.wf-issue-site-cleaning.wf-active>.wf-issue-detail{display:block}.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short{-webkit-flex-basis:auto;flex-basis:auto}.wf-issue-site-cleaning>.wf-issue-summary>ul>.wf-issue-short p{padding:0;margin:0}.wf-option-scan-signatures>.wf-option-disclosure{-webkit-flex-grow:1;flex-grow:1;text-align:right}.wf-option-scan-signatures>.wf-option-disclosure>svg{transition:transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275)}#wf-scan-additional-signatures{display:none;margin-left:3rem;padding-left:30px;padding-bottom:1rem}#wf-scan-additional-signatures>h4{margin:0 0 0.5rem 0}#wf-scan-additional-signatures>textarea{width:300px;height:80px}.wf-scan-type-enabled{padding:1rem 0.5rem}.wf-scan-type-enabled>li:first-of-type{padding-right:1.5rem}.wf-scan-type-controls{display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:column;flex-direction:column;margin:0 -0.5rem}.wf-scan-type{display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-justify-content:center;justify-content:center;-webkit-flex-direction:row;flex-direction:row;min-width:700px}@media (max-width: 767px){.wf-scan-type{-webkit-justify-content:flex-start;justify-content:flex-start}}.wf-scan-type>li{-webkit-flex-grow:1;flex-grow:1;-webkit-flex-shrink:0;flex-shrink:0;-webkit-flex-basis:25%;flex-basis:25%;display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-justify-content:center;justify-content:center;max-width:25%;padding:0.5rem}@media (min-width: 768px){.wf-scan-type>li{-webkit-flex-shrink:1;flex-shrink:1}}.wf-scan-type>li>ul.wf-scan-type-option{-webkit-flex-grow:1;flex-grow:1;margin:0;padding:0;border:1px solid #d9d9d9;min-height:100%;cursor:pointer}.wf-scan-type>li>ul.wf-scan-type-option.wf-scan-type-option-custom{cursor:inherit}.wf-scan-type>li>ul.wf-scan-type-option>.wf-scan-type-option-name{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;-webkit-flex-direction:row;flex-direction:row;border-bottom:2px solid #d9d9d9;padding:0.5rem 1rem}.wf-scan-type>li>ul.wf-scan-type-option>.wf-scan-type-option-name .wf-option-checkbox{margin-right:0.5rem;width:20px;height:20px;min-width:20px;min-height:20px;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;line-height:20px !important;background-color:#ffffff;box-shadow:0px 0px 0px 1px rgba(185,185,185,0.75);color:#ffffff !important;font-size:25px !important}.wf-scan-type>li>ul.wf-scan-type-option>.wf-scan-type-option-name span{font-weight:400;font-size:0.95rem}.wf-scan-type>li>ul.wf-scan-type-option>.wf-scan-type-option-description{padding:1rem}.wf-scan-type>li>ul.wf-scan-type-option.wf-active>.wf-scan-type-option-name{background-color:#00709e}.wf-scan-type>li>ul.wf-scan-type-option.wf-active>.wf-scan-type-option-name .wf-option-checkbox{color:#00709e !important}.wf-scan-type>li>ul.wf-scan-type-option.wf-active>.wf-scan-type-option-name span{color:#ffffff}.wf-scan-scheduling-manual{display:none;margin-left:3rem;padding-left:30px}.wf-scan-scheduling-manual.wf-active{display:block}.wf-scan-scheduling-manual>li{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:row;flex-direction:row}.wf-scan-scheduling-manual .wf-scan-scheduling-manual-presets-label{padding-right:1rem}.wf-scan-scheduling-manual .wf-scan-scheduling-manual-presets{display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:row;flex-direction:row;margin:0;padding:0}.wf-scan-scheduling-manual .wf-scan-scheduling-manual-presets>li{margin:0;padding:0.5rem 0.7rem;text-transform:uppercase;cursor:pointer;color:#aaa;font-weight:400;border-top:1px solid #bfbfbf;border-bottom:1px solid #bfbfbf;border-right:1px solid #bfbfbf}.wf-scan-scheduling-manual .wf-scan-scheduling-manual-presets>li:first-of-type{border-left:1px solid #bfbfbf;-moz-border-radius-topleft:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px}.wf-scan-scheduling-manual .wf-scan-scheduling-manual-presets>li:last-of-type{-moz-border-radius-topright:6px;-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-moz-border-radius-bottomright:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px}.wf-scan-scheduling-manual .wf-scan-scheduling-manual-presets>li.wf-active{color:#ffffff;background-color:#00709e}.wf-scan-scheduling-manual-preset-options .wfselect2-container{min-width:100px}.wf-scan-scheduling-manual-preset-options:not(.wf-active),.wf-scan-scheduling-manual-custom-options:not(.wf-active){display:none !important}.wf-scan-scheduling-manual-custom-options{padding-bottom:1rem}.wf-schedule-times-wrapper{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between;-webkit-flex-direction:row;flex-direction:row;margin-top:1rem}@media (min-width: 768px){.wf-schedule-times-wrapper{margin-top:0.25rem}}.wf-schedule-times-wrapper:first-of-type{margin-top:0}@media (min-width: 768px){.wf-schedule-times-wrapper:first-of-type{margin-top:1rem}}.wf-schedule-times-wrapper>*{-webkit-flex-grow:1;flex-grow:1;min-width:0}.wf-schedule-times-wrapper>*:first-child{-webkit-flex-grow:0;flex-grow:0;min-width:initial;padding-right:0.25rem}.wf-schedule-times-wrapper .wf-schedule-period{font-weight:500;padding:0.5rem 0.7rem}.wf-schedule-times{display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:row;flex-direction:row}.wf-schedule-times>li{margin:0;padding:0.5rem 0.7rem;text-transform:uppercase;cursor:pointer;color:#aaa;font-weight:400;border-top:1px solid #bfbfbf;border-bottom:1px solid #bfbfbf;border-right:1px solid #bfbfbf}.wf-schedule-times>li:first-of-type{border-left:1px solid #bfbfbf;-moz-border-radius-topleft:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px}.wf-schedule-times>li:last-of-type{-moz-border-radius-topright:6px;-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-moz-border-radius-bottomright:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px}.wf-schedule-times>li.wf-active{color:#ffffff;background-color:#00709e}.wf-issue-control-ignore-menu{position:absolute;z-index:9999;background-color:#ffffff;border:1px solid #bfbfbf}.wf-issue-control-ignore-menu>li{padding:0.5rem 1rem;margin:0;border-top:1px solid #bfbfbf;cursor:pointer}.wf-issue-control-ignore-menu>li:hover{color:#ffffff;background-color:#00709e}.wf-issue-control-ignore-menu>li:first-of-type{border-top:0}#wf-scan-failed.wf-alert.wf-alert-danger{background-color:#ffe470;border-color:#ffd10a;border-radius:0}#wf-scan-failed.wf-alert.wf-alert-danger pre{white-space:normal}#wf-scan-failed.wf-alert.wf-alert-danger svg{width:50px;height:50px;margin-right:1rem}#wf-scan-failed.wf-alert.wf-alert-danger svg path{fill:#da9603}#wf-scan-failed.wf-alert.wf-alert-danger h4{margin:0}#wf-scan-failed.wf-alert.wf-alert-danger p{margin-top:0.25rem;margin-bottom:0}#wf-scan-failed.wf-alert.wf-alert-danger .wf-btn.wf-btn-default{border-color:#ffffff;background-color:#ffffff;color:#000000}#wf-site-cleaning-bottom h3{color:#00709e;font-weight:300;font-size:1.5rem;margin:1rem 0}#wf-site-cleaning-bottom p{max-width:750px}#wordfenceRightRail img{max-width:100%}#wordfenceRightRail ul{list-style-type:none;margin:0;margin-top:15px}#wordfenceRightRail .center{text-align:center}#wordfenceRightRail .button-primary{text-align:center;text-transform:uppercase;font-weight:bold;background-color:#00709e}.wordfenceRightRail img{width:100%}.wordfenceRightRailLiveTraffic,.wordfenceRightRailOptions,.wordfenceRightRailDiagnostics{margin-left:1055px}.wordfenceRightRailBlockedIPs,.wordfenceRightRailWAF,.wordfenceRightRailCountryBlocking,.wordfenceRightRailScanSchedule{margin-left:950px}.wordfenceRightRail ul{list-style-type:none;margin:0}.wordfenceRightRail .center{text-align:center}.wordfenceRightRail .button-primary{text-align:center;text-transform:uppercase;font-weight:bold;background-color:#00709e}.wordfenceWrap.wordfence-community{min-height:760px}#wfTwoFactorQRCodeTable{width:175px;height:175px;margin:0 auto}@media (min-width: 500px){#wfTwoFactorQRCodeTable{width:256px;height:256px}}#wfTwoFactorRecoveryCodes{list-style-type:none}#wfTwoFactorRecoveryCodes li{font-family:monospace;text-align:center}#wfTwoFactorDownload .dashicons{line-height:26px}.wf-twofactor-delete{font-size:1.5rem}.wf-twofactor-delete a{text-decoration:none;color:#333}.wf-twofactor-delete a i{font-size:1.5rem}.wf-table.wf-table-twofactor>tbody>tr>td{vertical-align:middle}.wf-form-twofactor{max-width:400px}.wf-form-twofactor .wf-radio label{padding-left:0}#twofactor .wf-block-list>li{padding:.8rem 1.5rem;min-height:0px}#twofactor .wf-block-list .wf-form-control{margin:0px 0px}.wf-block-list .wf-block-list-title{font-weight:bold;font-size:0.9rem}.wf-block-list .wf-block-list-subtitle{font-weight:bold;font-size:0.85rem;color:#008cc1}#wfTwoFacUsers{margin:0 auto 1.5rem}#wf-tools-two-factor #wf-two-factor-img1,#wf-tools-two-factor #wf-two-factor-img2,#wf-all-options #wf-two-factor-img1,#wf-all-options #wf-two-factor-img2{display:inline}#wf-tools-two-factor #wf-two-factor-img1,#wf-all-options #wf-two-factor-img1{max-width:316px}#wf-tools-two-factor #wf-two-factor-img2,#wf-all-options #wf-two-factor-img2{max-width:270px}#wfUsername{max-width:568px}@media screen and (max-width: 782px){#wf-tools-two-factor #wf-two-factor-img1,#wf-tools-two-factor #wf-two-factor-img2,#wf-all-options #wf-two-factor-img1,#wf-all-options #wf-two-factor-img2{display:block;margin:0px auto 20px}}fieldset{padding:0;margin:0;border:0;min-width:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:bold}label.wf-plain{font-weight:normal}label.wf-control-label.wf-disabled{pointer-events:none}input[type="search"]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type="radio"],input[type="checkbox"]{margin-top:1px \9;line-height:normal}input[type="file"]{display:block}input[type="range"]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:1.5rem;font-size:14px;line-height:1.42857;color:#555}.wf-form-control{display:block;width:100%;height:38px;padding:.5rem 1.25rem;font-size:14px;line-height:1.42857;color:#555;background-color:#fff;background-image:none;border:1px solid #ddd;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-transition:border-color ease-in-out 0.15s,box-shadow ease-in-out 0.15s;-o-transition:border-color ease-in-out 0.15s,box-shadow ease-in-out 0.15s;transition:border-color ease-in-out 0.15s,box-shadow ease-in-out 0.15s}.wf-form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6)}.wf-form-control::-moz-placeholder{color:#bfbfbf;opacity:1}.wf-form-control:-ms-input-placeholder{color:#bfbfbf}.wf-form-control::-webkit-input-placeholder{color:#bfbfbf}.wf-form-control::-ms-expand{border:0;background-color:transparent}.wf-form-control[disabled],.wf-form-control[readonly],fieldset[disabled] .wf-form-control{background-color:#e2e2e2;opacity:1}.wf-form-control[disabled],.wf-form-control[readonly],fieldset[disabled] .wf-form-control{cursor:not-allowed;pointer-events:none}textarea.wf-form-control{height:auto}input[type="search"]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio: 0){input[type="date"].wf-form-control,input[type="time"].wf-form-control,input[type="datetime-local"].wf-form-control,input[type="month"].wf-form-control{line-height:38px}input[type="date"].wf-input-sm,.wf-input-group-sm input[type="date"],input[type="time"].wf-input-sm,.wf-input-group-sm input[type="time"],input[type="datetime-local"].wf-input-sm,.wf-input-group-sm input[type="datetime-local"],input[type="month"].wf-input-sm,.wf-input-group-sm input[type="month"]{line-height:30px}input[type="date"].wf-input-lg,.wf-input-group-lg input[type="date"],input[type="time"].wf-input-lg,.wf-input-group-lg input[type="time"],input[type="datetime-local"].wf-input-lg,.wf-input-group-lg input[type="datetime-local"],input[type="month"].wf-input-lg,.wf-input-group-lg input[type="month"]{line-height:46px}}.wf-form-group{margin-bottom:8px}.wf-form-group.wf-sub-group label{color:#666666;font-weight:normal;padding-left:20px}.wf-form-group.wf-focus{border-left:4px solid #11967a;padding-bottom:8px;background-color:#e5e5e5}.wf-form-group.wf-focus label{margin-left:-4px}.wf-radio,.wf-checkbox{position:relative;display:block;margin-top:10px;margin-bottom:10px}.wf-radio label,.wf-checkbox label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:normal;cursor:pointer}.wf-radio input[type="radio"],.wf-radio-inline input[type="radio"],.wf-checkbox input[type="checkbox"],.wf-checkbox-inline input[type="checkbox"]{margin-top:4px \9}.wf-radio-offset{padding-left:29px}@media (min-width: 768px){.wf-radio-offset{padding-left:20px}}.wf-radio+.wf-radio,.wf-checkbox+.wf-checkbox{margin-top:-5px}.wf-radio-inline,.wf-checkbox-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;vertical-align:middle;font-weight:normal;cursor:pointer}.wf-radio-inline+.wf-radio-inline,.wf-checkbox-inline+.wf-checkbox-inline{margin-top:0;margin-left:10px}input[type="radio"][disabled],input[type="radio"][readonly],input[type="radio"].wf-disabled,fieldset[disabled] input[type="radio"],input[type="checkbox"][disabled],input[type="checkbox"][readonly],input[type="checkbox"].wf-disabled,fieldset[disabled] input[type="checkbox"]{cursor:not-allowed;pointer-events:none}.wf-radio-inline.wf-disabled,fieldset[disabled] .wf-radio-inline,.wf-checkbox-inline.wf-disabled,fieldset[disabled] .wf-checkbox-inline{cursor:not-allowed}.wf-radio.wf-disabled label,fieldset[disabled] .wf-radio label,.wf-checkbox.wf-disabled label,fieldset[disabled] .wf-checkbox label{cursor:not-allowed;pointer-events:none}.wf-form-control-static{padding-top:1.5rem;padding-bottom:1.5rem;margin:0;line-height:1}.wf-form-control-static.wf-input-lg,.wf-form-control-static.wf-input-sm{padding-left:0;padding-right:0}.wf-input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.wf-input-sm{height:30px;line-height:30px}textarea.wf-input-sm,select[multiple].wf-input-sm{height:auto}.wf-form-group-sm .wf-form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.wf-form-group-sm select.wf-form-control{height:30px;line-height:30px}.wf-form-group-sm textarea.wf-form-control,.wf-form-group-sm select[multiple].wf-form-control{height:auto}.wf-form-group-sm .wf-form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.wf-input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.33333;border-radius:6px}select.wf-input-lg{height:46px;line-height:46px}textarea.wf-input-lg,select[multiple].wf-input-lg{height:auto}.wf-form-group-lg .wf-form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.33333;border-radius:6px}.wf-form-group-lg select.wf-form-control{height:46px;line-height:46px}.wf-form-group-lg textarea.wf-form-control,.wf-form-group-lg select[multiple].wf-form-control{height:auto}.wf-form-group-lg .wf-form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.33333}.wf-has-feedback{position:relative}.wf-has-feedback .wf-form-control{padding-right:47.5px}.wf-form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:38px;height:38px;line-height:38px;text-align:center;pointer-events:none}.wf-input-lg+.wf-form-control-feedback,.wf-input-group-lg+.wf-form-control-feedback,.wf-form-group-lg .wf-form-control+.wf-form-control-feedback{width:46px;height:46px;line-height:46px}.wf-input-sm+.wf-form-control-feedback,.wf-input-group-sm+.wf-form-control-feedback,.wf-form-group-sm .wf-form-control+.wf-form-control-feedback{width:30px;height:30px;line-height:30px}.wf-has-success .wf-help-block,.wf-has-success .wf-control-label,.wf-has-success .wf-radio,.wf-has-success .wf-checkbox,.wf-has-success .wf-radio-inline,.wf-has-success .wf-checkbox-inline,.wf-has-success.wf-radio label,.wf-has-success.wf-checkbox label,.wf-has-success.wf-radio-inline label,.wf-has-success.wf-checkbox-inline label{color:#3c763d}.wf-has-success .wf-form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.wf-has-success .wf-form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #67b168}.wf-has-success .wf-input-group-addon{color:#3c763d;border-color:#3c763d;background-color:#dff0d8}.wf-has-success .wf-form-control-feedback{color:#3c763d}.wf-has-warning .wf-help-block,.wf-has-warning .wf-control-label,.wf-has-warning .wf-radio,.wf-has-warning .wf-checkbox,.wf-has-warning .wf-radio-inline,.wf-has-warning .wf-checkbox-inline,.wf-has-warning.wf-radio label,.wf-has-warning.wf-checkbox label,.wf-has-warning.wf-radio-inline label,.wf-has-warning.wf-checkbox-inline label{color:#8a6d3b}.wf-has-warning .wf-form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.wf-has-warning .wf-form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #c0a16b}.wf-has-warning .wf-input-group-addon{color:#8a6d3b;border-color:#8a6d3b;background-color:#fcf8e3}.wf-has-warning .wf-form-control-feedback{color:#8a6d3b}.wf-has-error .wf-help-block,.wf-has-error .wf-control-label,.wf-has-error .wf-radio,.wf-has-error .wf-checkbox,.wf-has-error .wf-radio-inline,.wf-has-error .wf-checkbox-inline,.wf-has-error.wf-radio label,.wf-has-error.wf-checkbox label,.wf-has-error.wf-radio-inline label,.wf-has-error.wf-checkbox-inline label{color:#a94442}.wf-has-error .wf-form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.wf-has-error .wf-form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #ce8483}.wf-has-error .wf-input-group-addon{color:#a94442;border-color:#a94442;background-color:#f2dede}.wf-has-error .wf-form-control-feedback{color:#a94442}.wf-has-feedback label ~ .wf-form-control-feedback{top:25px}.wf-has-feedback label.wf-sr-only ~ .wf-form-control-feedback{top:0}.wf-help-block{display:block;margin-top:5px;color:#737373}@media (min-width: 768px){.wf-form-inline .wf-form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.wf-form-inline .wf-form-control{display:inline-block;width:auto;vertical-align:middle}.wf-form-inline .wf-form-control-static{display:inline-block}.wf-form-inline .wf-input-group{display:inline-table;vertical-align:middle}.wf-form-inline .wf-input-group .wf-input-group-addon,.wf-form-inline .wf-input-group .wf-input-group-btn,.wf-form-inline .wf-input-group .wf-form-control{width:auto}.wf-form-inline .wf-input-group>.wf-form-control{width:100%}.wf-form-inline .wf-control-label{margin-bottom:0;vertical-align:middle}.wf-form-inline .wf-radio,.wf-form-inline .wf-checkbox{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.wf-form-inline .wf-radio label,.wf-form-inline .wf-checkbox label{padding-left:0}.wf-form-inline .wf-radio input[type="radio"],.wf-form-inline .wf-checkbox input[type="checkbox"]{position:relative;margin-left:0}.wf-form-inline .wf-has-feedback .wf-form-control-feedback{top:0}}.wf-form-horizontal .wf-radio,.wf-form-horizontal .wf-checkbox,.wf-form-horizontal .wf-radio-inline,.wf-form-horizontal .wf-checkbox-inline{margin-top:0;margin-bottom:0;padding-top:1.5rem}.wf-form-horizontal .wf-radio,.wf-form-horizontal .wf-checkbox{min-height:29px}.wf-form-horizontal .wf-form-group{margin-left:-15px;margin-right:-15px}.wf-form-horizontal .wf-form-group:before,.wf-form-horizontal .wf-form-group:after{content:" ";display:table}.wf-form-horizontal .wf-form-group:after{clear:both}@media (min-width: 768px){.wf-form-horizontal .wf-control-label{text-align:right;margin-bottom:0;padding-top:1.5rem}}.wf-form-horizontal .wf-has-feedback .wf-form-control-feedback{right:15px}@media (min-width: 768px){.wf-form-horizontal .wf-form-group-lg .wf-control-label{padding-top:11px;font-size:18px}}@media (min-width: 768px){.wf-form-horizontal .wf-form-group-sm .wf-control-label{padding-top:6px;font-size:12px}}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status .wf-block-labeled-value-value,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status .wf-block-labeled-value-value{padding-top:0}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status .wf-block-labeled-value-value .wf-fa,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status .wf-block-labeled-value-value .wf-fa{font-size:8rem}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status .wf-block-labeled-value-value svg,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status .wf-block-labeled-value-value svg{width:140px}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status .wf-block-labeled-value-label,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status .wf-block-labeled-value-label{font-size:1.3125rem;font-weight:300;line-height:1.5;padding-bottom:0}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-full-enabled,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-full-enabled{background-color:#00709e}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-full-enabled .wf-block-labeled-value-value,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-full-enabled .wf-block-labeled-value-value{color:#ffffff}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-full-enabled .wf-block-labeled-value-label,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-full-enabled .wf-block-labeled-value-label{color:#ffffff;padding:0}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-enabled .wf-block-labeled-value-value,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-enabled .wf-block-labeled-value-value{color:#11967a}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-enabled .wf-block-labeled-value-value svg,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-enabled .wf-block-labeled-value-value svg{fill:#11967a}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-enabled .wf-block-labeled-value-label,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-enabled .wf-block-labeled-value-label{color:#11967a}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-learning-mode .wf-block-labeled-value-value,#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-disabled .wf-block-labeled-value-value,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-learning-mode .wf-block-labeled-value-value,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-disabled .wf-block-labeled-value-value{color:#9f9fa0}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-learning-mode .wf-block-labeled-value-value svg,#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-disabled .wf-block-labeled-value-value svg,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-learning-mode .wf-block-labeled-value-value svg,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-disabled .wf-block-labeled-value-value svg{fill:#9f9fa0}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-learning-mode .wf-block-labeled-value-label,#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-disabled .wf-block-labeled-value-label,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-learning-mode .wf-block-labeled-value-label,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-global-status-disabled .wf-block-labeled-value-label{color:#9f9fa0}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status .wf-block-labeled-value-value .wf-fa,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status .wf-block-labeled-value-value .wf-fa{font-size:7rem}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status .wf-block-labeled-value-value svg,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status .wf-block-labeled-value-value svg{width:120px}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status .wf-block-labeled-value-label,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status .wf-block-labeled-value-label{font-size:1.15rem;font-weight:300}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status-premium .wf-block-labeled-value-value,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status-premium .wf-block-labeled-value-value{color:#00709e}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status-premium .wf-block-labeled-value-value svg,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status-premium .wf-block-labeled-value-value svg{fill:#00709e}#wf-dashboard .wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status-premium .wf-block-labeled-value-label,#wf-global-options .wf-block .wf-block-content .wf-block-labeled-value.wf-protection-status-premium .wf-block-labeled-value-label{color:#00709e}.wf-dashboard-item{position:relative;margin:0 auto 1rem;padding:0 1rem;box-sizing:border-box;background:#fff;box-shadow:0 0 0 1px rgba(200,215,225,0.5),0 1px 2px #e9eff3}.wf-dashboard-item .wf-dashboard-item-inner{min-height:44px;padding:1rem 0;width:100%;box-sizing:border-box;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between;position:relative}.wf-dashboard-item .wf-dashboard-item-inner .wf-dashboard-item-content{max-width:75%}.wf-dashboard-item .wf-dashboard-item-inner .wf-dashboard-item-content .wf-dashboard-item-title{font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:0.875rem;width:100%}.wf-dashboard-item .wf-dashboard-item-inner .wf-dashboard-item-content .wf-dashboard-item-subtitle{margin-top:.125rem;margin-bottom:.125rem;font-size:.575rem;color:#4f748e}.wf-dashboard-item .wf-dashboard-item-inner .wf-dashboard-item-action{position:absolute;top:0;right:0;height:100%;background:none;border:0;outline:0;width:48px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;vertical-align:middle;transition:transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275),color 0.2s ease-in}.wf-dashboard-item .wf-dashboard-item-inner .wf-dashboard-item-action.wf-dashboard-item-action-text{width:auto}.wf-dashboard-item .wf-dashboard-item-inner .wf-dashboard-item-action.wf-dashboard-item-action-text.wf-dashboard-item-action-text-success{color:#11967a}.wf-dashboard-item .wf-dashboard-item-inner .wf-dashboard-item-action.wf-dashboard-item-action-text.wf-dashboard-item-action-text-warning{color:#930000}.wf-dashboard-item .wf-dashboard-item-inner .wf-dashboard-item-action.wf-dashboard-item-action-text.wf-dashboard-item-action-text-warning a{color:#930000}.wf-dashboard-item .wf-dashboard-item-inner .wf-dashboard-item-action .wf-dashboard-item-action-chevron{background:url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJjaGV2cm9uLW9iamVjdCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiCgkgd2lkdGg9IjI0cHgiIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAyNCAyNCIKCSB4bWw6c3BhY2U9InByZXNlcnZlIj4KPHBhdGggaWQ9ImNoZXZyb24iIGQ9Ik0yMCA5bC04IDgtOC04IDEuNDE0LTEuNDE0TDEyIDE0LjE3Mmw2LjU4Ni02LjU4NiIvPgo8L3N2Zz4K");background-repeat:no-repeat;background-position:center center;width:24px;height:24px;fill:#87a6bc}.wf-dashboard-item .wf-dashboard-item-inner .wf-dashboard-item-action .wf-dashboard-item-action-checkbox{background-image:url(../images/checkbox.png);background-repeat:no-repeat;background-position:left center;width:29px;height:29px}.wf-dashboard-item .wf-dashboard-item-inner .wf-dashboard-item-action .wf-dashboard-item-action-checkbox.checked{background-position:right center}.wf-dashboard-item .wf-dashboard-item-extra{display:none;margin:0 -1rem;padding:0 1rem}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list{margin:0 -1rem;padding:0;list-style:none}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list.wf-dashboard-item-list-striped>li:nth-of-type(odd){background-color:#f9f9f9}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list.wf-dashboard-item-list-striped>li:nth-of-type(odd).wf-notification{border-left:4px solid #f9f9f9}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list.wf-dashboard-item-list-striped>li:nth-of-type(odd).wf-notification.wf-notification-warning{border-left:4px solid #fcb214}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list.wf-dashboard-item-list-striped>li:nth-of-type(odd).wf-notification.wf-notification-critical{border-left:4px solid #930000}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list.wf-dashboard-item-list-striped>li:nth-of-type(even){background-color:#ffffff}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list.wf-dashboard-item-list-striped>li:nth-of-type(even).wf-notification{border-left:4px solid #ffffff}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list.wf-dashboard-item-list-striped>li:nth-of-type(even).wf-notification.wf-notification-warning{border-left:4px solid #fcb214}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list.wf-dashboard-item-list-striped>li:nth-of-type(even).wf-notification.wf-notification-critical{border-left:4px solid #930000}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list>li{display:block;min-height:44px;padding:0 1rem;margin:0;border-top:1px solid #eeeeee;box-sizing:border-box;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list>li>*:first-child{-webkit-flex-grow:1;flex-grow:1;min-width:0}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list.wf-dashboard-item-list-horizontal{box-sizing:border-box;margin-top:-1px;display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-align-content:flex-start;align-content:flex-start;-webkit-justify-content:space-between;justify-content:space-between;-webkit-flex-wrap:wrap;flex-wrap:wrap}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list.wf-dashboard-item-list-horizontal>li{-webkit-flex-grow:1;flex-grow:1;-webkit-flex-basis:100%;flex-basis:100%;border-left:1px solid #eeeeee}@media (min-width: 768px){.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list.wf-dashboard-item-list-horizontal>li{-webkit-flex-basis:50%;flex-basis:50%}}@media (min-width: 992px){.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list.wf-dashboard-item-list-horizontal>li{-webkit-flex-basis:25%;flex-basis:25%}}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list.wf-dashboard-item-list-horizontal>*:first-child{border-left:0}@media (min-width: 768px){.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list.wf-dashboard-item-list-horizontal.wf-dashboard-item-list-equal>li{max-width:50%}}@media (min-width: 992px){.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list.wf-dashboard-item-list-horizontal.wf-dashboard-item-list-equal>li{max-width:25%}}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list .wf-dashboard-item-list-state{text-align:center}@media (min-width: 1200px){.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list .wf-dashboard-item-list-state{text-align:left}}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list .wf-dashboard-item-list-state-enabled .fa{color:#11967a}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list .wf-dashboard-item-list-state-disabled .fa{color:#525355}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list .wf-dashboard-item-list-state-premium{color:#9f9fa0}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list .wf-dashboard-item-list-dismiss{padding-left:2rem;font-size:1.25rem}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-list .wf-dashboard-item-list-dismiss a{color:#525355}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-labeled-count{box-sizing:border-box;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between;-webkit-flex-direction:column;flex-direction:column}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-labeled-count-count{font-size:3rem;line-height:3rem;color:#9f9fa0;padding:1rem}.wf-dashboard-item .wf-dashboard-item-extra .wf-dashboard-item-labeled-count-label{font-size:0.75rem;color:#9f9fa0;padding:0 1rem 1rem 1rem}.wf-dashboard-item.active .wf-dashboard-item-extra{display:block}.wf-dashboard-item.wf-dashboard-item-left .wf-dashboard-item-content{margin-left:48px}.wf-dashboard-item.wf-dashboard-item-left .wf-dashboard-item-action{right:auto;left:0px}.wf-dashboard-item.disabled .wf-dashboard-item-content .wf-dashboard-item-title{color:#aaaaaa}.wf-dashboard-item.disabled .wf-dashboard-item-content .wf-dashboard-item-subtitle{color:#8ea6be}.wf-notifications-empty{font-size:0.9rem;color:#9f9fa0}.wf-dashboard-graph-wrapper{width:100%}.wf-dashboard-badge{display:inline-block;min-width:10px;padding:3px 7px;margin-left:0.5rem;font-size:12px;font-weight:bold;color:#fff;line-height:1;vertical-align:middle;white-space:nowrap;text-align:center;background-color:#fcb214;border-radius:10px}.wf-dashboard-badge:empty{display:none}.wf-btn .wf-dashboard-badge{position:relative;top:-1px}.wf-btn-xs .wf-dashboard-badge,.wf-btn-group-xs>.wf-btn .wf-dashboard-badge,.wf-btn-group-xs>.wf-btn .wf-dashboard-badge{top:0;padding:1px 5px}.wf-list-group-item.active>.wf-dashboard-badge,.wf-nav-pills>.active>a>.wf-dashboard-badge{color:#00709e;background-color:#fff}.wf-list-group-item>.wf-dashboard-badge{float:right}.wf-list-group-item>.wf-dashboard-badge+.wf-dashboard-badge{margin-right:5px}.wf-nav-pills>li>a>.wf-dashboard-badge{margin-left:3px}.wf-dashboard-toggle-btns{text-align:center}.wf-dashboard-toggle-btns .wf-pagination{margin:1rem 1rem 0.5rem 1rem}.wf-dashboard-show-more{position:relative;font-size:14px;color:#959595;text-align:center;line-height:1rem;background:#ffffff;width:60%;margin:20px auto 0 auto}.wf-dashboard-show-more:before{display:inline-block;content:"";position:absolute;height:1px;background:#dddddd;top:50%;width:100%;left:0;right:0}.wf-dashboard-show-more a{display:inline-block;position:relative;padding:0 10px;background-color:#ffffff}.wf-ips,.wf-recent-logins,.wf-countries{max-height:30rem;overflow-y:hidden;margin-bottom:20px}.wf-ips .wf-table,.wf-recent-logins .wf-table,.wf-countries .wf-table{margin-bottom:0}.wf-dashboard-last-updated{font-style:italic;font-size:0.6rem;text-align:center;padding-bottom:1rem;margin:0}.wf-dashboard-navigation .wf-block-navigation-option-content{padding:1rem 0 1rem 1rem}@media (min-width: 768px){.wf-dashboard-navigation .wf-block-navigation-option-content{padding:1.5rem 0 1.5rem 1rem}}.wf-dashboard-navigation .wf-block-navigation-option-content h4{margin:0 0 0.25rem 0}.wf-dashboard-navigation .wf-block-navigation-option-content p{margin:0 0 0.45rem 0}.wf-blocks-summary{width:100%;margin:1rem 0;border-spacing:0}.wf-blocks-summary>thead>tr>th,.wf-blocks-summary>tbody>tr>th,.wf-blocks-summary>tr>th{font-weight:600;padding:0.25rem 0.25rem;white-space:nowrap}@media (min-width: 768px){.wf-blocks-summary>thead>tr>th,.wf-blocks-summary>tbody>tr>th,.wf-blocks-summary>tr>th{padding:0.25rem 1rem}}.wf-blocks-summary>thead>tr>th.wf-premium,.wf-blocks-summary>tbody>tr>th.wf-premium,.wf-blocks-summary>tr>th.wf-premium{border-top:2px solid #00709e;border-left:2px solid #00709e;border-right:2px solid #00709e;border-top-left-radius:0.5rem;border-top-right-radius:0.5rem;color:#aaa}.wf-blocks-summary>thead>tr>th,.wf-blocks-summary>tr>th{text-align:center}.wf-blocks-summary>thead>tr>th:first-child,.wf-blocks-summary>tbody>tr>th{text-align:right}.wf-blocks-summary>tbody>tr>td,.wf-blocks-summary>tfoot>tr>td,.wf-blocks-summary>tr>td{text-align:center;padding:0.25rem 0.25rem}@media (min-width: 768px){.wf-blocks-summary>tbody>tr>td,.wf-blocks-summary>tfoot>tr>td,.wf-blocks-summary>tr>td{padding:0.25rem 1rem}}.wf-blocks-summary>tbody>tr>td.wf-premium,.wf-blocks-summary>tfoot>tr>td.wf-premium,.wf-blocks-summary>tr>td.wf-premium{border-left:2px solid #00709e;border-right:2px solid #00709e;color:#aaa}.wf-blocks-summary>tfoot>tr>td.wf-premium,.wf-blocks-summary>tr:last-child>td.wf-premium{border-bottom:2px solid #00709e;border-bottom-left-radius:0.5rem;border-bottom-right-radius:0.5rem;background-color:#00709e;color:#fff}#howGetIPs-trusted-proxies{display:none}ul.wf-option.wf-option-howgetips .wf-option-howgetips-details{display:-webkit-flex;display:flex;-webkit-align-items:flex-start;align-items:flex-start;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:column;flex-direction:column;font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:0.8rem;margin-top:0.5rem}.wf-central-dashboard{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-align-content:stretch;align-content:stretch;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-wrap:nowrap;flex-wrap:nowrap}.wf-central-dashboard .wf-central-dashboard-logo{width:80px;min-width:80px;margin:10px 0}.wf-central-dashboard .wf-central-dashboard-copy{padding-left:20px}@media (min-width: 768px){.wf-central-dashboard{-webkit-flex-direction:row;flex-direction:row;-webkit-align-items:center;align-items:center}}table.wf-table{background-color:transparent;border-collapse:collapse;border-spacing:0}table.wf-table td,table.wf-table th{padding:0}.wf-table caption{padding-top:8px;padding-bottom:8px;color:#777;text-align:left}.wf-table th{text-align:left}.wf-table{width:100%;max-width:100%;margin-bottom:20px}.wf-table>thead>tr>th,.wf-table>thead>tr>td,.wf-table>tbody>tr>th,.wf-table>tbody>tr>td,.wf-table>tfoot>tr>th,.wf-table>tfoot>tr>td{padding:8px;line-height:1.42857;vertical-align:top;border-top:1px solid #ddd}.wf-table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.wf-table>caption+thead>tr:first-child>th,.wf-table>caption+thead>tr:first-child>td,.wf-table>colgroup+thead>tr:first-child>th,.wf-table>colgroup+thead>tr:first-child>td,.wf-table>thead:first-child>tr:first-child>th,.wf-table>thead:first-child>tr:first-child>td{border-top:0}.wf-table>tbody+tbody{border-top:2px solid #ddd}.wf-table .wf-table{background-color:#fff}.wf-table-condensed>thead>tr>th,.wf-table-condensed>thead>tr>td,.wf-table-condensed>tbody>tr>th,.wf-table-condensed>tbody>tr>td,.wf-table-condensed>tfoot>tr>th,.wf-table-condensed>tfoot>tr>td{padding:5px}.wf-table-bordered{border:1px solid #ddd}.wf-table-bordered>thead>tr>th,.wf-table-bordered>thead>tr>td,.wf-table-bordered>tbody>tr>th,.wf-table-bordered>tbody>tr>td,.wf-table-bordered>tfoot>tr>th,.wf-table-bordered>tfoot>tr>td{border:1px solid #ddd}.wf-table-bordered>thead>tr>th,.wf-table-bordered>thead>tr>td{border-bottom-width:2px}.wf-table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.wf-table-hover>tbody>tr:hover{background-color:#f5f5f5}table.wf-table col[class*="col-"]{position:static;float:none;display:table-column}table.wf-table td[class*="col-"],table.wf-table th[class*="col-"]{position:static;float:none;display:table-cell}.wf-table>thead>tr>td.active,.wf-table>thead>tr>th.active,.wf-table>thead>tr.active>td,.wf-table>thead>tr.active>th,.wf-table>tbody>tr>td.active,.wf-table>tbody>tr>th.active,.wf-table>tbody>tr.active>td,.wf-table>tbody>tr.active>th,.wf-table>tfoot>tr>td.active,.wf-table>tfoot>tr>th.active,.wf-table>tfoot>tr.active>td,.wf-table>tfoot>tr.active>th{background-color:#f5f5f5}.wf-table-hover>tbody>tr>td.active:hover,.wf-table-hover>tbody>tr>th.active:hover,.wf-table-hover>tbody>tr.active:hover>td,.wf-table-hover>tbody>tr:hover>.active,.wf-table-hover>tbody>tr.active:hover>th{background-color:#e8e8e8}.wf-table>thead>tr>td.success,.wf-table>thead>tr>th.success,.wf-table>thead>tr.success>td,.wf-table>thead>tr.success>th,.wf-table>tbody>tr>td.success,.wf-table>tbody>tr>th.success,.wf-table>tbody>tr.success>td,.wf-table>tbody>tr.success>th,.wf-table>tfoot>tr>td.success,.wf-table>tfoot>tr>th.success,.wf-table>tfoot>tr.success>td,.wf-table>tfoot>tr.success>th{background-color:#dff0d8}.wf-table-hover>tbody>tr>td.success:hover,.wf-table-hover>tbody>tr>th.success:hover,.wf-table-hover>tbody>tr.success:hover>td,.wf-table-hover>tbody>tr:hover>.success,.wf-table-hover>tbody>tr.success:hover>th{background-color:#d0e9c6}.wf-table>thead>tr>td.info,.wf-table>thead>tr>th.info,.wf-table>thead>tr.info>td,.wf-table>thead>tr.info>th,.wf-table>tbody>tr>td.info,.wf-table>tbody>tr>th.info,.wf-table>tbody>tr.info>td,.wf-table>tbody>tr.info>th,.wf-table>tfoot>tr>td.info,.wf-table>tfoot>tr>th.info,.wf-table>tfoot>tr.info>td,.wf-table>tfoot>tr.info>th{background-color:#d9edf7}.wf-table-hover>tbody>tr>td.info:hover,.wf-table-hover>tbody>tr>th.info:hover,.wf-table-hover>tbody>tr.info:hover>td,.wf-table-hover>tbody>tr:hover>.info,.wf-table-hover>tbody>tr.info:hover>th{background-color:#c4e3f3}.wf-table>thead>tr>td.warning,.wf-table>thead>tr>th.warning,.wf-table>thead>tr.warning>td,.wf-table>thead>tr.warning>th,.wf-table>tbody>tr>td.warning,.wf-table>tbody>tr>th.warning,.wf-table>tbody>tr.warning>td,.wf-table>tbody>tr.warning>th,.wf-table>tfoot>tr>td.warning,.wf-table>tfoot>tr>th.warning,.wf-table>tfoot>tr.warning>td,.wf-table>tfoot>tr.warning>th{background-color:#fcf8e3}.wf-table-hover>tbody>tr>td.warning:hover,.wf-table-hover>tbody>tr>th.warning:hover,.wf-table-hover>tbody>tr.warning:hover>td,.wf-table-hover>tbody>tr:hover>.warning,.wf-table-hover>tbody>tr.warning:hover>th{background-color:#faf2cc}.wf-table>thead>tr>td.danger,.wf-table>thead>tr>th.danger,.wf-table>thead>tr.danger>td,.wf-table>thead>tr.danger>th,.wf-table>tbody>tr>td.danger,.wf-table>tbody>tr>th.danger,.wf-table>tbody>tr.danger>td,.wf-table>tbody>tr.danger>th,.wf-table>tfoot>tr>td.danger,.wf-table>tfoot>tr>th.danger,.wf-table>tfoot>tr.danger>td,.wf-table>tfoot>tr.danger>th{background-color:#f2dede}.wf-table-hover>tbody>tr>td.danger:hover,.wf-table-hover>tbody>tr>th.danger:hover,.wf-table-hover>tbody>tr.danger:hover>td,.wf-table-hover>tbody>tr:hover>.danger,.wf-table-hover>tbody>tr.danger:hover>th{background-color:#ebcccc}.wf-table-responsive{overflow-x:auto;min-height:0.01%}@media screen and (max-width: 767px){.wf-table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.wf-table-responsive>.wf-table{margin-bottom:0}.wf-table-responsive>.wf-table>thead>tr>th,.wf-table-responsive>.wf-table>thead>tr>td,.wf-table-responsive>.wf-table>tbody>tr>th,.wf-table-responsive>.wf-table>tbody>tr>td,.wf-table-responsive>.wf-table>tfoot>tr>th,.wf-table-responsive>.wf-table>tfoot>tr>td{white-space:nowrap}.wf-table-responsive>.wf-table-bordered{border:0}.wf-table-responsive>.wf-table-bordered>thead>tr>th:first-child,.wf-table-responsive>.wf-table-bordered>thead>tr>td:first-child,.wf-table-responsive>.wf-table-bordered>tbody>tr>th:first-child,.wf-table-responsive>.wf-table-bordered>tbody>tr>td:first-child,.wf-table-responsive>.wf-table-bordered>tfoot>tr>th:first-child,.wf-table-responsive>.wf-table-bordered>tfoot>tr>td:first-child{border-left:0}.wf-table-responsive>.wf-table-bordered>thead>tr>th:last-child,.wf-table-responsive>.wf-table-bordered>thead>tr>td:last-child,.wf-table-responsive>.wf-table-bordered>tbody>tr>th:last-child,.wf-table-responsive>.wf-table-bordered>tbody>tr>td:last-child,.wf-table-responsive>.wf-table-bordered>tfoot>tr>th:last-child,.wf-table-responsive>.wf-table-bordered>tfoot>tr>td:last-child{border-right:0}.wf-table-responsive>.wf-table-bordered>tbody>tr:last-child>th,.wf-table-responsive>.wf-table-bordered>tbody>tr:last-child>td,.wf-table-responsive>.wf-table-bordered>tfoot>tr:last-child>th,.wf-table-responsive>.wf-table-bordered>tfoot>tr:last-child>td{border-bottom:0}}.wf-sortable{position:relative;padding-right:2rem !important}.wf-sortable .wf-sorted-ascending,.wf-sortable .wf-sorted-descending{display:none;position:absolute;right:1rem;top:50%;transform:translateY(-50%)}.wf-sortable.wf-unsorted:hover .wf-sorted-ascending{display:block}.wf-sortable.wf-unsorted,.wf-sortable.wf-sorted-ascending,.wf-sortable.wf-sorted-descending{cursor:pointer}.wf-sortable.wf-unsorted:hover,.wf-sortable.wf-sorted-ascending:hover,.wf-sortable.wf-sorted-descending:hover{background-color:#e0e0e0}.wf-sortable.wf-sorted-ascending,.wf-sortable.wf-sorted-descending{background-color:#e0e0e0}.wf-sortable.wf-sorted-ascending .wf-sorted-ascending{display:block}.wf-sortable.wf-sorted-descending .wf-sorted-descending{display:block}.wf-nav{margin-bottom:0;padding-left:0;list-style:none}.wf-nav:before,.wf-nav:after{content:" ";display:table}.wf-nav:after{clear:both}.wf-nav>li{position:relative;display:block}.wf-nav>li>a{position:relative;display:block;padding:8px 12px}.wf-nav>li>a:hover,.wf-nav>li>a:focus{text-decoration:none;background-color:#e2e2e2}.wf-nav>li.wf-disabled>a{color:#777}.wf-nav>li.wf-disabled>a:hover,.wf-nav>li.wf-disabled>a:focus{color:#777;text-decoration:none;background-color:transparent;cursor:not-allowed}.wf-nav .wf-open>a,.wf-nav .wf-open>a:hover,.wf-nav .wf-open>a:focus{background-color:#e2e2e2;border-color:#00709e}.wf-nav>li>a>img{max-width:none}.wf-nav-tabs{border-bottom:1px solid #d0d0d0}.wf-nav-tabs>li{float:left;margin-bottom:-1px}.wf-nav-tabs>li>a{margin-right:2px;line-height:1.42857;border:1px solid transparent;border-radius:4px 4px 0 0}.wf-nav-tabs>li>a:hover{border-color:#e2e2e2 #e2e2e2 #d0d0d0}.wf-nav-tabs>li.wf-active>a,.wf-nav-tabs>li.wf-active>a:hover,.wf-nav-tabs>li.wf-active>a:focus{color:#555;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default}.wf-nav-pills>li{float:left}.wf-nav-pills>li>a{border-radius:4px;text-decoration:none;position:relative;display:block;padding:8px 12px}.wf-nav-pills>li>a:hover,.wf-nav-pills>li>a:focus{text-decoration:none !important;background-color:#e2e2e2}.wf-nav-pills>li+li{margin-left:2px}.wf-nav-pills>li.wf-active>a,.wf-nav-pills>li.wf-active>a:hover,.wf-nav-pills>li.wf-active>a:focus{color:#fff;background-color:#00709e}.wf-nav-pills.wf-nav-pills-bordered>li>a{border:1px solid #e2e2e2}.wf-nav-pills.wf-nav-pills-connected>li>a{border-radius:0;border-right-width:0px}.wf-nav-pills.wf-nav-pills-connected>li+li{margin-left:0}.wf-nav-pills.wf-nav-pills-connected>li.active+li>a{border-left-width:0px}.wf-nav-pills.wf-nav-pills-connected>li:first-of-type>a{-moz-border-radius:4px 0 0 4px;-webkit-border-radius:4px;border-radius:4px 0 0 4px}.wf-nav-pills.wf-nav-pills-connected>li:last-of-type>a{-moz-border-radius:0 4px 4px 0;-webkit-border-radius:0;border-radius:0 4px 4px 0;border-right-width:1px}.wf-nav-stacked>li{float:none}.wf-nav-stacked>li+li{margin-top:2px;margin-left:0}.wf-nav-justified,.wf-nav-tabs.wf-nav-justified{width:100%}.wf-nav-justified>li,.wf-nav-tabs.wf-nav-justified>li{float:none}.wf-nav-justified>li>a,.wf-nav-tabs.wf-nav-justified>li>a{text-align:center;margin-bottom:5px}.wf-nav-justified>.wf-dropdown .wf-dropdown-menu{top:auto;left:auto}@media (min-width: 768px){.wf-nav-justified>li,.wf-nav-tabs.wf-nav-justified>li{display:table-cell;width:1%}.wf-nav-justified>li>a,.wf-nav-tabs.wf-nav-justified>li>a{margin-bottom:0}}.wf-nav-tabs-justified,.wf-nav-tabs.wf-nav-justified{border-bottom:0}.wf-nav-tabs-justified>li>a,.wf-nav-tabs.wf-nav-justified>li>a{margin-right:0;border-radius:4px}.wf-nav-tabs-justified>.wf-active>a,.wf-nav-tabs.wf-nav-justified>.wf-active>a,.wf-nav-tabs-justified>.wf-active>a:hover,.wf-nav-tabs.wf-nav-justified>.wf-active>a:hover,.wf-nav-tabs-justified>.wf-active>a:focus,.wf-nav-tabs.wf-nav-justified>.wf-active>a:focus{border:1px solid #ddd}@media (min-width: 768px){.wf-nav-tabs-justified>li>a,.wf-nav-tabs.wf-nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.wf-nav-tabs-justified>.wf-active>a,.wf-nav-tabs.wf-nav-justified>.wf-active>a,.wf-nav-tabs-justified>.wf-active>a:hover,.wf-nav-tabs.wf-nav-justified>.wf-active>a:hover,.wf-nav-tabs-justified>.wf-active>a:focus,.wf-nav-tabs.wf-nav-justified>.wf-active>a:focus{border-bottom-color:#fff}}.wf-tab-content>.wf-tab-pane{display:none}.wf-tab-content>.wf-active{display:block}.wf-nav-tabs .wf-dropdown-menu{margin-top:-1px;-moz-border-radius-topleft:0;-webkit-border-top-left-radius:0;border-top-left-radius:0;-moz-border-radius-topright:0;-webkit-border-top-right-radius:0;border-top-right-radius:0}.wf-navbar-brand{float:left;padding:12px 8px;font-size:18px;line-height:20px;margin:10px 0 0 0}.wf-navbar-brand:hover,.wf-navbar-brand:focus{text-decoration:none}.wf-navbar-brand>img{display:block}@media (min-width: 768px){.navbar>.container .wf-navbar-brand,.navbar>.container-fluid .wf-navbar-brand{margin-left:-8px}}.wf-caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid \9;border-right:4px solid transparent;border-left:4px solid transparent}.wf-dropup,.wf-dropdown{position:relative}.wf-dropdown-toggle:focus{outline:0}.wf-dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;font-size:14px;text-align:left;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,0.175);box-shadow:0 6px 12px rgba(0,0,0,0.175);background-clip:padding-box}.wf-dropdown-menu .wf-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.wf-dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:normal;line-height:1.42857;color:#333;text-decoration:none;white-space:nowrap}.wf-dropdown-menu>li>a:hover,.wf-dropdown-menu>li>a:focus{text-decoration:none;color:#262626;background-color:#f5f5f5}.wf-dropdown-menu>.wf-active>a,.wf-dropdown-menu>.wf-active>a:hover,.wf-dropdown-menu>.wf-active>a:focus{color:#fff;text-decoration:none;outline:0;background-color:#00709e}.wf-dropdown-menu>.wf-disabled>a,.wf-dropdown-menu>.wf-disabled>a:hover,.wf-dropdown-menu>.wf-disabled>a:focus{color:#777}.wf-dropdown-menu>.wf-disabled>a:hover,.wf-dropdown-menu>.wf-disabled>a:focus{text-decoration:none;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);cursor:not-allowed}.wf-open>.wf-dropdown-menu{display:block}.wf-open>a{outline:0}.wf-dropdown-menu-right{left:auto;right:0}.wf-dropdown-menu-left{left:0;right:auto}.wf-dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857;color:#777;white-space:nowrap}.wf-dropdown-backdrop{position:fixed;left:0;right:0;bottom:0;top:0;z-index:990}.wf-pull-right>.wf-dropdown-menu{right:0;left:auto}.wf-dropup .wf-caret,.wf-navbar-fixed-bottom .wf-dropdown .wf-caret{border-top:0;border-bottom:4px dashed;border-bottom:4px solid \9;content:""}.wf-dropup .wf-dropdown-menu,.wf-navbar-fixed-bottom .wf-dropdown .wf-dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width: 768px){.wf-navbar-right .wf-dropdown-menu{right:0;left:auto}.wf-navbar-right .wf-dropdown-menu-left{left:0;right:auto}}.wf-mobile-dropdown{border:1px solid #ccc;margin-left:.5em;padding:5px 10px;font-size:14px;line-height:24px;margin:10px 10px 0 0;background:#f1f1f1;color:#000;font-weight:600;text-decoration:none}.wf-blocks-table tbody tr.wf-editing,.wf-blocks-table tbody tr.wf-editing td{background-color:#fffbd8}.wf-blocked-countries-section{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-align-content:stretch;align-content:stretch;-webkit-flex-wrap:nowrap;flex-wrap:nowrap}.wf-blocked-countries-section-title{font-size:1.1rem;padding-right:0.5rem}.wf-blocked-countries-section-spacer{-webkit-flex-basis:30px;flex-basis:30px;height:1px;background:#aaa}.wf-blocked-countries-section-options{margin-bottom:0;margin-top:0;padding-left:0.5rem;list-style:none;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-align-content:stretch;align-content:stretch;-webkit-flex-wrap:nowrap;flex-wrap:nowrap}.wf-blocked-countries-section-options li{padding:0;margin:0;color:#777}.wf-blocked-countries-section-options li a{padding:2px 4px;text-decoration:none;color:#777}.wf-blocked-countries-section-options li a.active-section{background-color:#777;color:#e2e2e2}.wf-option-bypass-redirect .wf-option-title,.wf-option-bypass-cookie .wf-option-title{-webkit-align-self:flex-start;align-self:flex-start}.wf-option-bypass-redirect *,.wf-option-bypass-cookie *{-webkit-flex-grow:1;flex-grow:1}.wf-option-bypass-redirect *:first-child,.wf-option-bypass-cookie *:first-child{-webkit-flex-grow:0;flex-grow:0}.wf-country-block-map{width:300px}@media (min-width: 768px){.wf-country-block-map{width:500px}}@media (min-width: 992px){.wf-country-block-map{width:700px}}@media (min-width: 1200px){.wf-country-block-map{width:700px}}#wf-create-block{width:100%}#wf-create-block th{white-space:nowrap}#wf-create-block td{width:100%}#wf-create-block td.wf-block-type{width:auto}@media (min-width: 768px){#wf-create-block{width:500px}}@media (min-width: 992px){#wf-create-block{width:700px}}@media (min-width: 1200px){#wf-create-block{width:700px}}#wf-create-block .wf-block-add-country select{width:240px}@media (min-width: 768px){#wf-create-block .wf-block-add-country select{width:280px}}@media (min-width: 992px){#wf-create-block .wf-block-add-country select{width:320px}}#wf-create-block .wf-block-add-country .wfselect2-container--default,#wf-create-block .wf-block-add-country .wfselect2-container--default .wfselect2-selection--multiple{border-color:#e2e2e2}#wf-create-block .wf-block-add-country .wfselect2-container--default .wfselect2-selection__choice,#wf-create-block .wf-block-add-country .wfselect2-container--default .wfselect2-selection--multiple .wfselect2-selection__choice{background-color:#ffffff;border-color:#e2e2e2;padding:0.5rem}#wf-create-block .wf-block-add-country .wfselect2-container--default .wfselect2-search__field,#wf-create-block .wf-block-add-country .wfselect2-container--default .wfselect2-selection--multiple .wfselect2-search__field{margin-right:5px;margin-top:5px;padding:0.5rem 0}#wfcolorbox .wf-country-selector-controls,.wf-drawer .wf-country-selector-controls{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between;-webkit-align-content:stretch;align-content:stretch;-webkit-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-flex-shrink:0;flex-shrink:0}#wfcolorbox .wf-country-selector-controls .wf-country-selector-section-options,.wf-drawer .wf-country-selector-controls .wf-country-selector-section-options{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between;-webkit-align-content:stretch;align-content:stretch;-webkit-flex-wrap:nowrap;flex-wrap:nowrap}#wfcolorbox .wf-country-selector-controls .wf-country-selector-section-options>li,.wf-drawer .wf-country-selector-controls .wf-country-selector-section-options>li{border:1px solid #ffffff;border-radius:4px;padding:0.25rem;background-color:#ffffff}#wfcolorbox .wf-country-selector-controls .wf-country-selector-section-options>li:hover,#wfcolorbox .wf-country-selector-controls .wf-country-selector-section-options>li:focus,.wf-drawer .wf-country-selector-controls .wf-country-selector-section-options>li:hover,.wf-drawer .wf-country-selector-controls .wf-country-selector-section-options>li:focus{background-color:#00709e;border-color:#00709e}#wfcolorbox .wf-country-selector-controls .wf-country-selector-section-options>li:hover>a,#wfcolorbox .wf-country-selector-controls .wf-country-selector-section-options>li:focus>a,.wf-drawer .wf-country-selector-controls .wf-country-selector-section-options>li:hover>a,.wf-drawer .wf-country-selector-controls .wf-country-selector-section-options>li:focus>a{color:#ffffff}#wfcolorbox .wf-country-selector-controls .wf-country-selector-section-options>li>a,.wf-drawer .wf-country-selector-controls .wf-country-selector-section-options>li>a{text-decoration:none;color:#525355}#wfcolorbox .wf-country-selector-options .wf-blocked-countries,.wf-drawer .wf-country-selector-options .wf-blocked-countries{margin-bottom:0;margin-top:1rem;list-style:none;margin-left:-6px;display:-webkit-flex;display:flex;-webkit-align-items:stretch;align-items:stretch;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-align-content:stretch;align-content:stretch;-webkit-flex-wrap:wrap;flex-wrap:wrap}#wfcolorbox .wf-country-selector-options .wf-blocked-countries>li,.wf-drawer .wf-country-selector-options .wf-blocked-countries>li{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:center;justify-content:center;margin:0px 0px 2px 6px;text-align:center;border:1px solid #e2e2e2;border-radius:4px;padding:8px 12px;background-color:#ffffff;-webkit-flex-basis:38%;flex-basis:38%}@media (min-width: 768px){#wfcolorbox .wf-country-selector-options .wf-blocked-countries>li,.wf-drawer .wf-country-selector-options .wf-blocked-countries>li{-webkit-flex-basis:20%;flex-basis:20%}}@media (min-width: 992px){#wfcolorbox .wf-country-selector-options .wf-blocked-countries>li,.wf-drawer .wf-country-selector-options .wf-blocked-countries>li{-webkit-flex-basis:15%;flex-basis:15%}}@media (min-width: 1200px){#wfcolorbox .wf-country-selector-options .wf-blocked-countries>li,.wf-drawer .wf-country-selector-options .wf-blocked-countries>li{-webkit-flex-basis:10%;flex-basis:10%}}#wfcolorbox .wf-country-selector-options .wf-blocked-countries>li:hover,#wfcolorbox .wf-country-selector-options .wf-blocked-countries>li:focus,.wf-drawer .wf-country-selector-options .wf-blocked-countries>li:hover,.wf-drawer .wf-country-selector-options .wf-blocked-countries>li:focus{text-decoration:none;background-color:#e2e2e2}#wfcolorbox .wf-country-selector-options .wf-blocked-countries>li.disabled>a,.wf-drawer .wf-country-selector-options .wf-blocked-countries>li.disabled>a{color:#777}#wfcolorbox .wf-country-selector-options .wf-blocked-countries>li.disabled>a:hover,#wfcolorbox .wf-country-selector-options .wf-blocked-countries>li.disabled>a:focus,.wf-drawer .wf-country-selector-options .wf-blocked-countries>li.disabled>a:hover,.wf-drawer .wf-country-selector-options .wf-blocked-countries>li.disabled>a:focus{color:#777;text-decoration:none;background-color:transparent;cursor:not-allowed}#wfcolorbox .wf-country-selector-options .wf-blocked-countries>li>a,.wf-drawer .wf-country-selector-options .wf-blocked-countries>li>a{text-decoration:none;position:relative;display:block}#wfcolorbox .wf-country-selector-options .wf-blocked-countries>li.wf-active,#wfcolorbox .wf-country-selector-options .wf-blocked-countries>li.wf-active:hover,#wfcolorbox .wf-country-selector-options .wf-blocked-countries>li.wf-active:focus,.wf-drawer .wf-country-selector-options .wf-blocked-countries>li.wf-active,.wf-drawer .wf-country-selector-options .wf-blocked-countries>li.wf-active:hover,.wf-drawer .wf-country-selector-options .wf-blocked-countries>li.wf-active:focus{background-color:#00709e;border-color:#00709e}#wfcolorbox .wf-country-selector-options .wf-blocked-countries>li.wf-active>a,#wfcolorbox .wf-country-selector-options .wf-blocked-countries>li.wf-active:hover>a,#wfcolorbox .wf-country-selector-options .wf-blocked-countries>li.wf-active:focus>a,.wf-drawer .wf-country-selector-options .wf-blocked-countries>li.wf-active>a,.wf-drawer .wf-country-selector-options .wf-blocked-countries>li.wf-active:hover>a,.wf-drawer .wf-country-selector-options .wf-blocked-countries>li.wf-active:focus>a{color:#fff}#wfcolorbox .wf-country-selector-options .wf-blocked-countries>li.text-only,.wf-drawer .wf-country-selector-options .wf-blocked-countries>li.text-only{position:relative;display:block;padding:8px 12px}#wfcolorbox .wf-country-selector-options .wf-blocked-countries>li>a>img,.wf-drawer .wf-country-selector-options .wf-blocked-countries>li>a>img{max-width:none}.wf-tag-selected{background-color:#ffffff;border:1px solid #e2e2e2;border-radius:4px;cursor:default;float:left;margin-right:5px !important;margin-top:5px !important;list-style:none;padding:0.5rem !important}.wf-destroy-tag-selected{color:#999;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.wf-destroy-tag-selected:hover{text-decoration:none}.wf-tags-show-hide-more{float:left;margin-right:5px;margin-top:5px;list-style:none;padding:0.5rem}.wf-select2-hide-tags .wfselect2-selection__choice{display:none}.wf-country-selector-outer-wrapper{position:relative;-webkit-flex-grow:1;flex-grow:1}.wf-country-selector-outer-wrapper .wf-country-selector-inner-wrapper{position:absolute;top:0px;right:0px;bottom:0px;left:0px;overflow-x:hidden;overflow-y:auto}table.wf-dataTable{width:auto;max-width:800px;clear:both;border-collapse:collapse;border-spacing:0}table.wf-dataTable>thead th,table.wf-dataTable>tfoot th{font-weight:bold}table.wf-dataTable>thead th,table.wf-dataTable>thead td{cursor:pointer;text-align:left;font-size:11px;border:1px solid #ccc;padding:8px 4px 5px 9px;text-transform:uppercase}table.wf-dataTable>thead th:active,table.wf-dataTable>thead td:active{outline:none}table.wf-dataTable>tfoot th,table.wf-dataTable>tfoot td{padding:10px 18px 6px 18px;border-top:1px solid #111}table.wf-dataTable>thead .sorting,table.wf-dataTable>thead .sorting_asc,table.wf-dataTable>thead .sorting_desc{cursor:pointer;*cursor:hand}table.wf-dataTable>thead .sorting,table.wf-dataTable>thead .sorting_asc,table.wf-dataTable>thead .sorting_desc,table.wf-dataTable>thead .sorting_asc_disabled,table.wf-dataTable>thead .sorting_desc_disabled{background-repeat:no-repeat;background-position:center right}table.wf-dataTable>thead .sorting{background-image:url(../images/sort_both.png)}table.wf-dataTable>thead .sorting_asc{background-image:url(../images/sort_asc.png)}table.wf-dataTable>thead .sorting_desc{background-image:url(../images/sort_desc.png)}table.wf-dataTable>thead .sorting_asc_disabled{background-image:url(../images/sort_asc_disabled.png)}table.wf-dataTable>thead .sorting_desc_disabled{background-image:url(../images/sort_desc_disabled.png)}table.wf-dataTable>tbody>tr{background-color:#ffffff}table.wf-dataTable>tbody>tr.selected{background-color:#B0BED9}table.wf-dataTable>tbody>tr>th,table.wf-dataTable>tbody>tr>td{padding:5px 8px}table.wf-dataTable.row-border>tbody>tr>th,table.wf-dataTable.row-border>tbody>tr>td,table.wf-dataTable.display>tbody>tr>th,table.wf-dataTable.display>tbody>tr>td{border:1px solid #cccccc}table.wf-dataTable.row-border>tbody>tr:first-child>th,table.wf-dataTable.row-border>tbody>tr:first-child>td,table.wf-dataTable.display>tbody>tr:first-child>th,table.wf-dataTable.display>tbody>tr:first-child>td{border-top:none}table.wf-dataTable.cell-border>tbody>tr>th,table.wf-dataTable.cell-border>tbody>tr>td{border-top:1px solid #ddd;border-right:1px solid #ddd}table.wf-dataTable.cell-border>tbody>tr>th:first-child,table.wf-dataTable.cell-border>tbody>tr>td:first-child{border-left:1px solid #ddd}table.wf-dataTable.cell-border>tbody>tr:first-child>th,table.wf-dataTable.cell-border>tbody>tr:first-child>td{border-top:none}table.wf-dataTable.stripe>tbody>tr.odd,table.wf-dataTable.display>tbody>tr.odd{background-color:#f9f9f9}table.wf-dataTable.stripe>tbody>tr.odd.selected,table.wf-dataTable.display>tbody>tr.odd.selected{background-color:#acbad4}table.wf-dataTable.hover>tbody>tr:hover,table.wf-dataTable.display>tbody>tr:hover{background-color:#f6f6f6}table.wf-dataTable.hover>tbody>tr:hover.selected,table.wf-dataTable.display>tbody>tr:hover.selected{background-color:#aab7d1}table.wf-dataTable.order-column>tbody>tr>.sorting_1,table.wf-dataTable.order-column>tbody>tr>.sorting_2,table.wf-dataTable.order-column>tbody>tr>.sorting_3,table.wf-dataTable.display tbody>tr>.sorting_1,table.wf-dataTable.display>tbody>tr>.sorting_2,table.wf-dataTable.display>tbody>tr>.sorting_3{background-color:#fafafa}table.wf-dataTable.order-column>tbody>tr.selected>.sorting_1,table.wf-dataTable.order-column>tbody>tr.selected>.sorting_2,table.wf-dataTable.order-column>tbody>tr.selected>.sorting_3,table.wf-dataTable.display>tbody>tr.selected>.sorting_1,table.wf-dataTable.display>tbody>tr.selected>.sorting_2,table.wf-dataTable.display>tbody>tr.selected>.sorting_3{background-color:#acbad5}table.wf-dataTable.display>tbody>tr.odd>.sorting_1,table.wf-dataTable.order-column.stripe>tbody>tr.odd>.sorting_1{background-color:#f1f1f1}table.wf-dataTable.display>tbody>tr.odd>.sorting_2,table.wf-dataTable.order-column.stripe>tbody>tr.odd>.sorting_2{background-color:#f3f3f3}table.wf-dataTable.display>tbody>tr.odd>.sorting_3,table.wf-dataTable.order-column.stripe>tbody>tr.odd>.sorting_3{background-color:whitesmoke}table.wf-dataTable.display>tbody>tr.odd.selected>.sorting_1,table.wf-dataTable.order-column.stripe>tbody>tr.odd.selected>.sorting_1{background-color:#a6b4cd}table.wf-dataTable.display>tbody>tr.odd.selected>.sorting_2,table.wf-dataTable.order-column.stripe>tbody>tr.odd.selected>.sorting_2{background-color:#a8b5cf}table.wf-dataTable.display>tbody>tr.odd.selected>.sorting_3,table.wf-dataTable.order-column.stripe>tbody>tr.odd.selected>.sorting_3{background-color:#a9b7d1}table.wf-dataTable.display>tbody>tr.even>.sorting_1,table.wf-dataTable.order-column.stripe>tbody>tr.even>.sorting_1{background-color:#fafafa}table.wf-dataTable.display>tbody>tr.even>.sorting_2,table.wf-dataTable.order-column.stripe>tbody>tr.even>.sorting_2{background-color:#fcfcfc}table.wf-dataTable.display>tbody>tr.even>.sorting_3,table.wf-dataTable.order-column.stripe>tbody>tr.even>.sorting_3{background-color:#fefefe}table.wf-dataTable.display>tbody>tr.even.selected>.sorting_1,table.wf-dataTable.order-column.stripe>tbody>tr.even.selected>.sorting_1{background-color:#acbad5}table.wf-dataTable.display>tbody>tr.even.selected>.sorting_2,table.wf-dataTable.order-column.stripe>tbody>tr.even.selected>.sorting_2{background-color:#aebcd6}table.wf-dataTable.display>tbody>tr.even.selected>.sorting_3,table.wf-dataTable.order-column.stripe>tbody>tr.even.selected>.sorting_3{background-color:#afbdd8}table.wf-dataTable.display>tbody>tr:hover>.sorting_1,table.wf-dataTable.order-column.hover>tbody>tr:hover>.sorting_1{background-color:#eaeaea}table.wf-dataTable.display>tbody>tr:hover>.sorting_2,table.wf-dataTable.order-column.hover>tbody>tr:hover>.sorting_2{background-color:#ececec}table.wf-dataTable.display>tbody>tr:hover>.sorting_3,table.wf-dataTable.order-column.hover>tbody>tr:hover>.sorting_3{background-color:#efefef}table.wf-dataTable.display>tbody>tr:hover.selected>.sorting_1,table.wf-dataTable.order-column.hover>tbody>tr:hover.selected>.sorting_1{background-color:#a2aec7}table.wf-dataTable.display>tbody>tr:hover.selected>.sorting_2,table.wf-dataTable.order-column.hover>tbody>tr:hover.selected>.sorting_2{background-color:#a3b0c9}table.wf-dataTable.display>tbody>tr:hover.selected>.sorting_3,table.wf-dataTable.order-column.hover>tbody>tr:hover.selected>.sorting_3{background-color:#a5b2cb}table.wf-dataTable.no-footer{border-bottom:1px solid #111}table.wf-dataTable.nowrap th,table.wf-dataTable.nowrap td{white-space:nowrap}table.wf-dataTable.compact thead th,table.wf-dataTable.compact thead td{padding:4px 17px 4px 4px}table.wf-dataTable.compact tfoot th,table.wf-dataTable.compact tfoot td{padding:4px}table.wf-dataTable.compact>tbody>tr>th,table.wf-dataTable.compact>tbody>tr>td{padding:4px}table.wf-dataTable th.dt-left,table.wf-dataTable td.dt-left{text-align:left}table.wf-dataTable th.dt-center,table.wf-dataTable td.dt-center,table.wf-dataTable td.dataTables_empty{text-align:center}table.wf-dataTable th.dt-right,table.wf-dataTable td.dt-right{text-align:right}table.wf-dataTable th.dt-justify,table.wf-dataTable td.dt-justify{text-align:justify}table.wf-dataTable th.dt-nowrap,table.wf-dataTable td.dt-nowrap{white-space:nowrap}table.wf-dataTable thead th.dt-head-left,table.wf-dataTable thead td.dt-head-left,table.wf-dataTable tfoot th.dt-head-left,table.wf-dataTable tfoot td.dt-head-left{text-align:left}table.wf-dataTable thead th.dt-head-center,table.wf-dataTable thead td.dt-head-center,table.wf-dataTable tfoot th.dt-head-center,table.wf-dataTable tfoot td.dt-head-center{text-align:center}table.wf-dataTable thead th.dt-head-right,table.wf-dataTable thead td.dt-head-right,table.wf-dataTable tfoot th.dt-head-right,table.wf-dataTable tfoot td.dt-head-right{text-align:right}table.wf-dataTable thead th.dt-head-justify,table.wf-dataTable thead td.dt-head-justify,table.wf-dataTable tfoot th.dt-head-justify,table.wf-dataTable tfoot td.dt-head-justify{text-align:justify}table.wf-dataTable thead th.dt-head-nowrap,table.wf-dataTable thead td.dt-head-nowrap,table.wf-dataTable tfoot th.dt-head-nowrap,table.wf-dataTable tfoot td.dt-head-nowrap{white-space:nowrap}table.wf-dataTable>tbody>tr>th.dt-body-left,table.wf-dataTable>tbody>tr>td.dt-body-left{text-align:left}table.wf-dataTable>tbody>tr>th.dt-body-center,table.wf-dataTable>tbody>tr>td.dt-body-center{text-align:center}table.wf-dataTable>tbody>tr>th.dt-body-right,table.wf-dataTable>tbody>tr>td.dt-body-right{text-align:right}table.wf-dataTable>tbody>tr>th.dt-body-justify,table.wf-dataTable>tbody>tr>td.dt-body-justify{text-align:justify}table.wf-dataTable>tbody>tr>th.dt-body-nowrap,table.wf-dataTable>tbody>tr>td.dt-body-nowrap{white-space:nowrap}table.wf-dataTable table.dataTable,table.wf-dataTable th,table.wf-dataTable td{-webkit-box-sizing:content-box;box-sizing:content-box}.wf-dataTables_wrapper{position:relative;clear:both;*zoom:1;zoom:1}.wf-dataTables_wrapper .dataTables_length{float:left}.wf-dataTables_wrapper .dataTables_filter{float:right;text-align:right}.wf-dataTables_wrapper .dataTables_filter input{margin-left:0.5em}.wf-dataTables_wrapper .dataTables_info{clear:both;float:left;padding-top:0.755em}.wf-dataTables_wrapper .dataTables_paginate{float:right;text-align:right;padding-top:0.25em}.wf-dataTables_wrapper .dataTables_paginate .paginate_button{box-sizing:border-box;display:inline-block;min-width:1.5em;padding:0.5em 1em;margin-left:2px;text-align:center;text-decoration:none !important;cursor:pointer;*cursor:hand;color:#333 !important;border:1px solid transparent;border-radius:2px}.wf-dataTables_wrapper .dataTables_paginate .paginate_button.current,.wf-dataTables_wrapper .dataTables_paginate .paginate_button.current:hover{color:#333 !important;border:1px solid #979797;background-color:white;background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #fff), color-stop(100%, #dcdcdc));background:-webkit-linear-gradient(top, #fff 0%, #dcdcdc 100%);background:-moz-linear-gradient(top, #fff 0%, #dcdcdc 100%);background:-ms-linear-gradient(top, #fff 0%, #dcdcdc 100%);background:-o-linear-gradient(top, #fff 0%, #dcdcdc 100%);background:linear-gradient(to bottom, #ffffff 0%,#dcdcdc 100%)}.wf-dataTables_wrapper .dataTables_paginate .paginate_button.disabled,.wf-dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover,.wf-dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active{cursor:default;color:#666 !important;border:1px solid transparent;background:transparent;box-shadow:none}.wf-dataTables_wrapper .dataTables_paginate .paginate_button:hover{color:white !important;border:1px solid #111;background-color:#585858;background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #585858), color-stop(100%, #111));background:-webkit-linear-gradient(top, #585858 0%, #111 100%);background:-moz-linear-gradient(top, #585858 0%, #111 100%);background:-ms-linear-gradient(top, #585858 0%, #111 100%);background:-o-linear-gradient(top, #585858 0%, #111 100%);background:linear-gradient(to bottom, #585858 0%,#111111 100%)}.wf-dataTables_wrapper .dataTables_paginate .paginate_button:active{outline:none;background-color:#2b2b2b;background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #2b2b2b), color-stop(100%, #0c0c0c));background:-webkit-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:-moz-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:-ms-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:-o-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);background:linear-gradient(to bottom, #2b2b2b 0%,#0c0c0c 100%);box-shadow:inset 0 0 3px #111}.wf-dataTables_wrapper .dataTables_paginate .ellipsis{padding:0 1em}.wf-dataTables_wrapper .dataTables_processing{position:absolute;top:50%;left:50%;width:100%;height:40px;margin-left:-50%;margin-top:-25px;padding-top:20px;text-align:center;font-size:1.2em;background-color:white;background:-webkit-gradient(linear, left top, right top, color-stop(0%, rgba(255,255,255,0)), color-stop(25%, rgba(255,255,255,0.9)), color-stop(75%, rgba(255,255,255,0.9)), color-stop(100%, rgba(255,255,255,0)));background:-webkit-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);background:-moz-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);background:-ms-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);background:-o-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 25%, rgba(255,255,255,0.9) 75%, rgba(255,255,255,0) 100%);background:linear-gradient(to right, rgba(255,255,255,0) 0%,rgba(255,255,255,0.9) 25%,rgba(255,255,255,0.9) 75%,rgba(255,255,255,0) 100%)}.wf-dataTables_wrapper .dataTables_length,.wf-dataTables_wrapper .dataTables_filter,.wf-dataTables_wrapper .dataTables_info,.wf-dataTables_wrapper .dataTables_processing,.wf-dataTables_wrapper .dataTables_paginate{color:#333}.wf-dataTables_wrapper .dataTables_scroll{clear:both}.wf-dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody{*margin-top:-1px;-webkit-overflow-scrolling:touch}.wf-dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody th,.wf-dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody td{vertical-align:middle}.wf-dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody th>div.dataTables_sizing,.wf-dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody td>div.dataTables_sizing{height:0;overflow:hidden;margin:0 !important;padding:0 !important}.wf-dataTables_wrapper.no-footer .dataTables_scrollBody{border-bottom:1px solid #111}.wf-dataTables_wrapper.no-footer div.dataTables_scrollHead table,.wf-dataTables_wrapper.no-footer div.dataTables_scrollBody table{border-bottom:none}.wf-dataTables_wrapper:after{visibility:hidden;display:block;content:"";clear:both;height:0}@media screen and (max-width: 767px){.wf-dataTables_wrapper .dataTables_info,.wf-dataTables_wrapper .dataTables_paginate{float:none;text-align:center}.wf-dataTables_wrapper .dataTables_paginate{margin-top:0.5em}}@media screen and (max-width: 640px){.wf-dataTables_wrapper .dataTables_length,.wf-dataTables_wrapper .dataTables_filter{float:none;text-align:center}.wf-dataTables_wrapper .dataTables_filter{margin-top:0.5em}}.wf-alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.wf-alert h4{margin-top:0;color:inherit}.wf-alert .wf-alert-link{font-weight:bold}.wf-alert>p,.wf-alert>ul{margin-bottom:0}.wf-alert>p+p{margin-top:5px}.wf-alert-dismissable,.wf-alert-dismissible{padding-right:35px}.wf-alert-dismissable .close,.wf-alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.wf-alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#3c763d}.wf-alert-success hr{border-top-color:#c9e2b3}.wf-alert-success .alert-link{color:#2b542c}.wf-alert-info{background-color:#d9edf7;border-color:#bce8f1;color:#31708f}.wf-alert-info hr{border-top-color:#a6e1ec}.wf-alert-info .alert-link{color:#245269}.wf-alert-warning{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}.wf-alert-warning hr{border-top-color:#f7e1b5}.wf-alert-warning .alert-link{color:#66512c}.wf-alert-danger{background-color:#f2dede;border-color:#ebccd1;color:#a94442}.wf-alert-danger hr{border-top-color:#e4b9c0}.wf-alert-danger .alert-link{color:#843534}#wf-tools-whois #wfrawhtml .wf-flex-row{margin:.5rem 0 1rem}#wf-tools-whois #wfrawhtml .wf-flex-row a.wf-flex-row-1{color:#444;text-decoration:none}#wf-tools-whois #wfrawhtml .wf-flex-row a.wf-flex-row-1:hover{color:#00a0d2;text-decoration:underline}.wf-diagnostic-fail.wf-block .wf-block-header .wf-block-header-content .wf-block-title{color:#d0514c}.wf-diagnostic-fail.wf-block .wf-block-header .wf-block-header-content .wf-block-title:before{content:'\f100';font-family:"Ionicons";display:inline-block;margin:0 .4rem 0 0}#wf-diagnostics .wf-block{margin:0 auto 0.5rem}#wf-diagnostics-other-tests .wf-btn-sm,#wf-diagnostics-other-tests .wf-btn-group-sm>.wf-btn{padding:2px 10px;vertical-align:top}.wf-support-block{padding:1rem 0}.wf-support-block>h4{margin:0;padding:0 0 1rem 0}.wf-support-block>h4>a{text-decoration:none;font-size:1.3125rem;line-height:1.5;font-weight:300}.wf-support-block>p{margin:0;padding:0}.wf-support-block>ul{display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:flex-start;justify-content:flex-start;-webkit-flex-direction:row;flex-direction:row;-webkit-flex-wrap:wrap;flex-wrap:wrap;margin:0;padding:0}.wf-support-block>ul>li{margin:0;padding:1rem 1rem 1rem 0}.wf-support-block>ul>li>a{text-decoration:none;font-size:.875rem;line-height:1.3125;font-weight:normal}.wf-support-top-block,.wf-support-missing-block{padding:1.5rem 0}.wf-support-top-block>h4,.wf-support-missing-block>h4{margin:0;padding:0}.wf-support-top-block>ol>li,.wf-support-missing-block>ol>li{margin:0.75rem 0;padding:0}.wf-support-top-block>ol>li>a,.wf-support-missing-block>ol>li>a{text-decoration:none;font-size:.875rem;line-height:1.3125;font-weight:normal}#wf-gdpr-banner{position:relative;z-index:3006;background-color:#fcb214;font-family:Roboto,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:.875rem;color:#2d2d2d;line-height:1.3125;font-weight:normal;display:-webkit-flex;display:flex;-webkit-align-items:center;align-items:center;-webkit-justify-content:space-between;justify-content:space-between;-webkit-flex-direction:row;flex-direction:row;margin:0 0 0 -20px;padding:0}#wf-gdpr-banner>li{margin:0;padding:0.5rem 1rem}#wf-toupp-required-overlay::after{position:absolute;z-index:3004;top:0;right:0;width:0;height:0;background:rgba(241,241,241,0.6);content:'';opacity:0;-webkit-transition:opacity 0.5s,width 0.1s 0.5s,height 0.1s 0.5s;-o-transition:opacity 0.5s,width 0.1s 0.5s,height 0.1s 0.5s;transition:opacity 0.5s,width 0.1s 0.5s,height 0.1s 0.5s}.wf-toupp-required #wf-toupp-required-overlay::after{width:100%;height:100%;opacity:1;-webkit-transition:opacity 0.5s;-o-transition:opacity 0.5s;transition:opacity 0.5s}#wf-toupp-required-message{display:none;position:fixed;z-index:3005;left:0;width:100%;top:50%;transform:translateY(-50%);text-align:center;color:#666666;opacity:0;-webkit-transition:opacity 0.5s,width 0.1s 0.5s,height 0.1s 0.5s;-o-transition:opacity 0.5s,width 0.1s 0.5s,height 0.1s 0.5s;transition:opacity 0.5s,width 0.1s 0.5s,height 0.1s 0.5s}#wf-toupp-required-message #wf-toupp-required-message-inner{background-color:#00709e;color:#fff;overflow:hidden;max-width:550px;margin:0 auto;padding:20px}#wf-toupp-required-message #wf-toupp-required-message-inner h2{font-size:2.0rem}#wf-toupp-required-message #wf-toupp-required-message-inner h2 .wf-toupp-required-header{line-height:2.4rem}#wf-toupp-required-message #wf-toupp-required-message-inner p{font-size:1rem}#wf-toupp-required-message #wf-toupp-required-message-inner p:first-child{margin-top:0}#wf-toupp-required-message #wf-toupp-required-message-inner p:last-child{margin-bottom:0}#wf-toupp-required-message #wf-toupp-required-message-inner small{font-size:0.9rem;font-weight:normal;margin-top:12px;display:block}.wf-toupp-required #wf-toupp-required-message{display:block;opacity:1;-webkit-transition:opacity 0.5s;transition:opacity 0.5s}.wf-flag-{background-position:-0px -0px !important}.wf-flag-ad{background-position:-16px -0px !important}.wf-flag-ae{background-position:-32px -0px !important}.wf-flag-af{background-position:-48px -0px !important}.wf-flag-ag{background-position:-64px -0px !important}.wf-flag-ai{background-position:-80px -0px !important}.wf-flag-al{background-position:-96px -0px !important}.wf-flag-am{background-position:-112px -0px !important}.wf-flag-an{background-position:-128px -0px !important}.wf-flag-ao{background-position:-144px -0px !important}.wf-flag-ap{background-position:-160px -0px !important}.wf-flag-aq{background-position:-176px -0px !important}.wf-flag-ar{background-position:-0px -11px !important}.wf-flag-as{background-position:-16px -11px !important}.wf-flag-at{background-position:-32px -11px !important}.wf-flag-au{background-position:-48px -11px !important}.wf-flag-aw{background-position:-64px -11px !important}.wf-flag-ax{background-position:-80px -11px !important}.wf-flag-az{background-position:-96px -11px !important}.wf-flag-ba{background-position:-112px -11px !important}.wf-flag-bb{background-position:-128px -11px !important}.wf-flag-bd{background-position:-144px -11px !important}.wf-flag-be{background-position:-160px -11px !important}.wf-flag-bf{background-position:-176px -11px !important}.wf-flag-bg{background-position:-0px -22px !important}.wf-flag-bh{background-position:-16px -22px !important}.wf-flag-bi{background-position:-32px -22px !important}.wf-flag-bj{background-position:-48px -22px !important}.wf-flag-bl{background-position:-64px -22px !important}.wf-flag-bm{background-position:-80px -22px !important}.wf-flag-bn{background-position:-96px -22px !important}.wf-flag-bo{background-position:-112px -22px !important}.wf-flag-bq{background-position:-128px -22px !important}.wf-flag-br{background-position:-144px -22px !important}.wf-flag-bs{background-position:-160px -22px !important}.wf-flag-bt{background-position:-176px -22px !important}.wf-flag-bv{background-position:-0px -33px !important}.wf-flag-bw{background-position:-16px -33px !important}.wf-flag-by{background-position:-32px -33px !important}.wf-flag-bz{background-position:-48px -33px !important}.wf-flag-ca{background-position:-64px -33px !important}.wf-flag-cc{background-position:-80px -33px !important}.wf-flag-cd{background-position:-96px -33px !important}.wf-flag-cf{background-position:-112px -33px !important}.wf-flag-cg{background-position:-128px -33px !important}.wf-flag-ch{background-position:-144px -33px !important}.wf-flag-ci{background-position:-160px -33px !important}.wf-flag-ck{background-position:-176px -33px !important}.wf-flag-cl{background-position:-0px -44px !important}.wf-flag-cm{background-position:-16px -44px !important}.wf-flag-cn{background-position:-32px -44px !important}.wf-flag-co{background-position:-48px -44px !important}.wf-flag-cr{background-position:-64px -44px !important}.wf-flag-cs{background-position:-80px -44px !important}.wf-flag-cu{background-position:-96px -44px !important}.wf-flag-cv{background-position:-112px -44px !important}.wf-flag-cw{background-position:-128px -44px !important}.wf-flag-cx{background-position:-144px -44px !important}.wf-flag-cy{background-position:-160px -44px !important}.wf-flag-cz{background-position:-176px -44px !important}.wf-flag-de{background-position:-0px -55px !important}.wf-flag-dj{background-position:-16px -55px !important}.wf-flag-dk{background-position:-32px -55px !important}.wf-flag-dm{background-position:-48px -55px !important}.wf-flag-do{background-position:-64px -55px !important}.wf-flag-dz{background-position:-80px -55px !important}.wf-flag-ec{background-position:-96px -55px !important}.wf-flag-ee{background-position:-112px -55px !important}.wf-flag-eg{background-position:-128px -55px !important}.wf-flag-eh{background-position:-144px -55px !important}.wf-flag-england{background-position:-160px -55px !important}.wf-flag-er{background-position:-176px -55px !important}.wf-flag-es{background-position:-0px -66px !important}.wf-flag-et{background-position:-16px -66px !important}.wf-flag-eu{background-position:-32px -66px !important}.wf-flag-fam{background-position:-48px -66px !important}.wf-flag-fi{background-position:-64px -66px !important}.wf-flag-fj{background-position:-80px -66px !important}.wf-flag-fk{background-position:-96px -66px !important}.wf-flag-fm{background-position:-112px -66px !important}.wf-flag-fo{background-position:-128px -66px !important}.wf-flag-fr{background-position:-144px -66px !important}.wf-flag-ga{background-position:-160px -66px !important}.wf-flag-gb{background-position:-176px -66px !important}.wf-flag-gd{background-position:-0px -77px !important}.wf-flag-ge{background-position:-16px -77px !important}.wf-flag-gf{background-position:-32px -77px !important}.wf-flag-gg{background-position:-48px -77px !important}.wf-flag-gh{background-position:-64px -77px !important}.wf-flag-gi{background-position:-80px -77px !important}.wf-flag-gl{background-position:-96px -77px !important}.wf-flag-gm{background-position:-112px -77px !important}.wf-flag-gn{background-position:-128px -77px !important}.wf-flag-gp{background-position:-144px -77px !important}.wf-flag-gq{background-position:-160px -77px !important}.wf-flag-gr{background-position:-176px -77px !important}.wf-flag-gs{background-position:-0px -88px !important}.wf-flag-gt{background-position:-16px -88px !important}.wf-flag-gu{background-position:-32px -88px !important}.wf-flag-gw{background-position:-48px -88px !important}.wf-flag-gy{background-position:-64px -88px !important}.wf-flag-hk{background-position:-80px -88px !important}.wf-flag-hm{background-position:-96px -88px !important}.wf-flag-hn{background-position:-112px -88px !important}.wf-flag-hr{background-position:-128px -88px !important}.wf-flag-ht{background-position:-144px -88px !important}.wf-flag-hu{background-position:-160px -88px !important}.wf-flag-id{background-position:-176px -88px !important}.wf-flag-ie{background-position:-0px -99px !important}.wf-flag-il{background-position:-16px -99px !important}.wf-flag-im{background-position:-32px -99px !important}.wf-flag-in{background-position:-48px -99px !important}.wf-flag-io{background-position:-64px -99px !important}.wf-flag-iq{background-position:-80px -99px !important}.wf-flag-ir{background-position:-96px -99px !important}.wf-flag-is{background-position:-112px -99px !important}.wf-flag-it{background-position:-128px -99px !important}.wf-flag-je{background-position:-144px -99px !important}.wf-flag-jm{background-position:-160px -99px !important}.wf-flag-jo{background-position:-176px -99px !important}.wf-flag-jp{background-position:-0px -110px !important}.wf-flag-ke{background-position:-16px -110px !important}.wf-flag-kg{background-position:-32px -110px !important}.wf-flag-kh{background-position:-48px -110px !important}.wf-flag-ki{background-position:-64px -110px !important}.wf-flag-km{background-position:-80px -110px !important}.wf-flag-kn{background-position:-96px -110px !important}.wf-flag-kp{background-position:-112px -110px !important}.wf-flag-kr{background-position:-128px -110px !important}.wf-flag-kw{background-position:-144px -110px !important}.wf-flag-ky{background-position:-160px -110px !important}.wf-flag-kz{background-position:-176px -110px !important}.wf-flag-la{background-position:-0px -121px !important}.wf-flag-lb{background-position:-16px -121px !important}.wf-flag-lc{background-position:-32px -121px !important}.wf-flag-li{background-position:-48px -121px !important}.wf-flag-lk{background-position:-64px -121px !important}.wf-flag-lr{background-position:-80px -121px !important}.wf-flag-ls{background-position:-96px -121px !important}.wf-flag-lt{background-position:-112px -121px !important}.wf-flag-lu{background-position:-128px -121px !important}.wf-flag-lv{background-position:-144px -121px !important}.wf-flag-ly{background-position:-160px -121px !important}.wf-flag-ma{background-position:-176px -121px !important}.wf-flag-mc{background-position:-0px -132px !important}.wf-flag-md{background-position:-16px -132px !important}.wf-flag-me{background-position:-32px -132px !important}.wf-flag-mf{background-position:-48px -132px !important}.wf-flag-mg{background-position:-64px -132px !important}.wf-flag-mh{background-position:-80px -132px !important}.wf-flag-mk{background-position:-96px -132px !important}.wf-flag-ml{background-position:-112px -132px !important}.wf-flag-mm{background-position:-128px -132px !important}.wf-flag-mn{background-position:-144px -132px !important}.wf-flag-mo{background-position:-160px -132px !important}.wf-flag-mp{background-position:-176px -132px !important}.wf-flag-mq{background-position:-0px -143px !important}.wf-flag-mr{background-position:-16px -143px !important}.wf-flag-ms{background-position:-32px -143px !important}.wf-flag-mt{background-position:-48px -143px !important}.wf-flag-mu{background-position:-64px -143px !important}.wf-flag-mv{background-position:-80px -143px !important}.wf-flag-mw{background-position:-96px -143px !important}.wf-flag-mx{background-position:-112px -143px !important}.wf-flag-my{background-position:-128px -143px !important}.wf-flag-mz{background-position:-144px -143px !important}.wf-flag-na{background-position:-160px -143px !important}.wf-flag-nc{background-position:-176px -143px !important}.wf-flag-ne{background-position:-0px -154px !important}.wf-flag-nf{background-position:-16px -154px !important}.wf-flag-ng{background-position:-32px -154px !important}.wf-flag-ni{background-position:-48px -154px !important}.wf-flag-nl{background-position:-64px -154px !important}.wf-flag-no{background-position:-80px -154px !important}.wf-flag-np{background-position:-96px -154px !important}.wf-flag-nr{background-position:-112px -154px !important}.wf-flag-nu{background-position:-128px -154px !important}.wf-flag-nz{background-position:-144px -154px !important}.wf-flag-om{background-position:-160px -154px !important}.wf-flag-pa{background-position:-176px -154px !important}.wf-flag-pe{background-position:-0px -165px !important}.wf-flag-pf{background-position:-16px -165px !important}.wf-flag-pg{background-position:-32px -165px !important}.wf-flag-ph{background-position:-48px -165px !important}.wf-flag-pk{background-position:-64px -165px !important}.wf-flag-pl{background-position:-80px -165px !important}.wf-flag-pm{background-position:-96px -165px !important}.wf-flag-pn{background-position:-112px -165px !important}.wf-flag-pr{background-position:-128px -165px !important}.wf-flag-ps{background-position:-144px -165px !important}.wf-flag-pt{background-position:-160px -165px !important}.wf-flag-pw{background-position:-176px -165px !important}.wf-flag-py{background-position:-0px -176px !important}.wf-flag-qa{background-position:-16px -176px !important}.wf-flag-re{background-position:-32px -176px !important}.wf-flag-ro{background-position:-48px -176px !important}.wf-flag-rs{background-position:-64px -176px !important}.wf-flag-ru{background-position:-80px -176px !important}.wf-flag-rw{background-position:-96px -176px !important}.wf-flag-sa{background-position:-112px -176px !important}.wf-flag-sb{background-position:-128px -176px !important}.wf-flag-sc{background-position:-144px -176px !important}.wf-flag-scotland{background-position:-160px -176px !important}.wf-flag-sd{background-position:-176px -176px !important}.wf-flag-se{background-position:-0px -187px !important}.wf-flag-sg{background-position:-16px -187px !important}.wf-flag-sh{background-position:-32px -187px !important}.wf-flag-si{background-position:-48px -187px !important}.wf-flag-sj{background-position:-64px -187px !important}.wf-flag-sk{background-position:-80px -187px !important}.wf-flag-sl{background-position:-96px -187px !important}.wf-flag-sm{background-position:-112px -187px !important}.wf-flag-sn{background-position:-128px -187px !important}.wf-flag-so{background-position:-144px -187px !important}.wf-flag-sr{background-position:-160px -187px !important}.wf-flag-ss{background-position:-176px -187px !important}.wf-flag-st{background-position:-0px -198px !important}.wf-flag-sv{background-position:-16px -198px !important}.wf-flag-sx{background-position:-32px -198px !important}.wf-flag-sy{background-position:-48px -198px !important}.wf-flag-sz{background-position:-64px -198px !important}.wf-flag-tc{background-position:-80px -198px !important}.wf-flag-td{background-position:-96px -198px !important}.wf-flag-tf{background-position:-112px -198px !important}.wf-flag-tg{background-position:-128px -198px !important}.wf-flag-th{background-position:-144px -198px !important}.wf-flag-tj{background-position:-160px -198px !important}.wf-flag-tk{background-position:-176px -198px !important}.wf-flag-tl{background-position:-0px -209px !important}.wf-flag-tm{background-position:-16px -209px !important}.wf-flag-tn{background-position:-32px -209px !important}.wf-flag-to{background-position:-48px -209px !important}.wf-flag-tr{background-position:-64px -209px !important}.wf-flag-tt{background-position:-80px -209px !important}.wf-flag-tv{background-position:-96px -209px !important}.wf-flag-tw{background-position:-112px -209px !important}.wf-flag-tz{background-position:-128px -209px !important}.wf-flag-ua{background-position:-144px -209px !important}.wf-flag-ug{background-position:-160px -209px !important}.wf-flag-uk{background-position:-176px -209px !important}.wf-flag-um{background-position:-0px -220px !important}.wf-flag-un{background-position:-16px -220px !important}.wf-flag-us{background-position:-32px -220px !important}.wf-flag-uy{background-position:-48px -220px !important}.wf-flag-uz{background-position:-64px -220px !important}.wf-flag-va{background-position:-80px -220px !important}.wf-flag-vc{background-position:-96px -220px !important}.wf-flag-ve{background-position:-112px -220px !important}.wf-flag-vg{background-position:-128px -220px !important}.wf-flag-vi{background-position:-144px -220px !important}.wf-flag-vn{background-position:-160px -220px !important}.wf-flag-vu{background-position:-176px -220px !important}.wf-flag-wales{background-position:-0px -231px !important}.wf-flag-wf{background-position:-16px -231px !important}.wf-flag-ws{background-position:-32px -231px !important}.wf-flag-xk{background-position:-48px -231px !important}.wf-flag-ye{background-position:-64px -231px !important}.wf-flag-yt{background-position:-80px -231px !important}.wf-flag-za{background-position:-96px -231px !important}.wf-flag-zm{background-position:-112px -231px !important}.wf-flag-zw{background-position:-128px -231px !important}#wf-central-progress li{display:-webkit-flex;display:flex;-webkit-align-items:flex-start;align-items:flex-start;padding:8px 1.5rem}#wf-central-progress li .wf-central-progress-icon{display:-webkit-flex;display:flex;-webkit-flex-grow:0;flex-grow:0}#wf-central-progress li .wf-central-progress-content{display:-webkit-flex;display:flex;-webkit-flex-grow:1;flex-grow:1;margin:3px 20px 0px}#wf-central-progress li .wf-step-pending,#wf-central-progress li .wf-step-running,#wf-central-progress li .wf-step-complete-success,#wf-central-progress li .wf-step-complete-warning{display:none}#wf-central-progress li.pending{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=40);opacity:.4}#wf-central-progress li.pending .wf-step-pending{display:block}#wf-central-progress li.running .wf-step-running{display:block}#wf-central-progress li.complete-success .wf-step-complete-success{display:block}#wf-central-progress li.complete-warning .wf-step-complete-warning{display:block}.wf-central-connected .wf-flex-row{align-items:stretch}.wf-central-connected .wf-flex-row .wf-flex-row-1{width:50%}.wf-central-connected .wf-flex-row .wf-flex-row-1:first-child{margin-right:5px}.wf-central-connected .wf-flex-row .wf-flex-row-1:last-child{margin-left:5px}@media (max-width: 768px){.wf-central-connected .wf-flex-row{-webkit-flex-direction:column !important;flex-direction:column !important}.wf-central-connected .wf-flex-row .wf-flex-row-1{width:100%;margin:0 0 10px !important}}
|
css/{phpinfo.1546968199.css → phpinfo.1549315000.css}
RENAMED
File without changes
|
css/{wf-adminbar.1546968199.css → wf-adminbar.1549315000.css}
RENAMED
File without changes
|
css/{wf-colorbox.1546968199.css → wf-colorbox.1549315000.css}
RENAMED
File without changes
|
css/{wf-font-awesome.1546968199.css → wf-font-awesome.1549315000.css}
RENAMED
File without changes
|
css/wf-global.1549315000.css
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
a.wfhelp{margin:0 3px 0 3px;text-decoration:none;display:inline-block;vertical-align:middle;font:normal normal normal 14px/1 FontAwesome;text-rendering:auto;-webkit-font-smoothing:antialiased}a.wfhelp:before{content:'\f29c'}
|
css/{wf-ionicons.1546968199.css → wf-ionicons.1549315000.css}
RENAMED
File without changes
|
css/{wf-onboarding.1546968199.css → wf-onboarding.1549315000.css}
RENAMED
File without changes
|
css/{wf-roboto-font.1546968199.css → wf-roboto-font.1549315000.css}
RENAMED
File without changes
|
css/{wfselect2.min.1546968199.css → wfselect2.min.1549315000.css}
RENAMED
File without changes
|
css/{wordfenceBox.1546968199.css → wordfenceBox.1549315000.css}
RENAMED
File without changes
|
images/wf-central-logo.svg
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 150 150"><defs><style>.cls-1{fill:#3f5a6b;}.cls-2{fill:#00719e;}</style></defs><title>wordfence-central-icon</title><path class="cls-1" d="M133.11,60.11A14.89,14.89,0,1,0,148,75,14.91,14.91,0,0,0,133.11,60.11Z"/><path class="cls-1" d="M16.89,60.11A14.89,14.89,0,1,0,31.78,75,14.91,14.91,0,0,0,16.89,60.11Z"/><path class="cls-1" d="M89.89,16.89A14.89,14.89,0,1,0,75,31.78,14.91,14.91,0,0,0,89.89,16.89Z"/><path class="cls-1" d="M60.11,133.11A14.89,14.89,0,1,0,75,118.22,14.91,14.91,0,0,0,60.11,133.11Z"/><path class="cls-2" d="M109.71,87.3c.33-.92.62-1.86.87-2.81s.47-1.92.65-2.88l-4.49-5.2c0-1,0-1.94,0-2.9l4.49-5.22a36.63,36.63,0,0,0-1.54-5.68l-6.5-2.26c-.32-.61-.68-1.2-1-1.79-.14-.24-.26-.48-.41-.71L103,51.09a37.14,37.14,0,0,0-4.16-4.16l-6.76,1.29c-.2-.13-.43-.24-.64-.37-.61-.37-1.23-.74-1.88-1.08L87.3,40.29c-.92-.33-1.86-.62-2.81-.87s-1.92-.47-2.88-.65l-5.2,4.49c-1,0-1.94,0-2.9,0l-5.22-4.49a36.63,36.63,0,0,0-5.68,1.54l-2.26,6.5c-.61.32-1.2.68-1.79,1-.24.14-.48.26-.71.41L51.09,47a37.14,37.14,0,0,0-4.16,4.16l1.29,6.76c-.13.2-.24.43-.37.64-.37.61-.74,1.23-1.08,1.88L40.29,62.7c-.32.92-.62,1.86-.87,2.81s-.47,1.92-.65,2.88l4.49,5.2c0,1,0,1.94,0,2.9l-4.49,5.22a37.78,37.78,0,0,0,1.54,5.68l6.5,2.26c.32.61.68,1.2,1,1.79.14.23.26.48.41.71L47,98.91a37.14,37.14,0,0,0,4.16,4.16l6.76-1.29c.2.13.43.24.64.37.61.37,1.23.74,1.88,1.08l2.27,6.48c.92.32,1.86.62,2.81.87s1.92.47,2.88.65l5.2-4.49c1,0,1.94,0,2.9,0l5.22,4.49a36.63,36.63,0,0,0,5.68-1.54l2.26-6.5c.61-.32,1.2-.68,1.79-1,.23-.14.48-.26.71-.41L98.91,103a37.14,37.14,0,0,0,4.16-4.16l-1.29-6.76c.13-.2.24-.43.37-.64.37-.61.74-1.23,1.08-1.88Zm-7.46-5a28.27,28.27,0,1,1-1.93-19.62A28,28,0,0,1,102.25,82.26Z"/><path class="cls-2" d="M81.07,52.25c-.77-.2-1.54-.37-2.3-.49A23.61,23.61,0,0,0,52.25,68.94c-.2.76-.36,1.53-.49,2.29A23.61,23.61,0,0,0,68.94,97.75c.76.2,1.53.36,2.29.49a23.55,23.55,0,0,0,27-19.47,23,23,0,0,0,0-7.5A23.52,23.52,0,0,0,81.07,52.25Z"/></svg>
|
js/{Chart.bundle.min.1546968199.js → Chart.bundle.min.1549315000.js}
RENAMED
File without changes
|
js/{admin.1546968199.js → admin.1549315000.js}
RENAMED
@@ -1747,8 +1747,8 @@
|
|
1747 |
issuesDOM.sort(function(a, b) {
|
1748 |
var severityA = $(a).data('issueSeverity');
|
1749 |
var severityB = $(b).data('issueSeverity');
|
1750 |
-
if (severityA
|
1751 |
-
else if (severityA
|
1752 |
|
1753 |
var typeA = $(a).data('issueType');
|
1754 |
var typeB = $(b).data('issueType');
|
1747 |
issuesDOM.sort(function(a, b) {
|
1748 |
var severityA = $(a).data('issueSeverity');
|
1749 |
var severityB = $(b).data('issueSeverity');
|
1750 |
+
if (severityA > severityB) { return -1; }
|
1751 |
+
else if (severityA < severityB) { return 1; }
|
1752 |
|
1753 |
var typeA = $(a).data('issueType');
|
1754 |
var typeB = $(b).data('issueType');
|
js/{admin.ajaxWatcher.1546968199.js → admin.ajaxWatcher.1549315000.js}
RENAMED
File without changes
|
js/{admin.liveTraffic.1546968199.js → admin.liveTraffic.1549315000.js}
RENAMED
File without changes
|
js/{date.1546968199.js → date.1549315000.js}
RENAMED
File without changes
|
js/{jquery-ui-timepicker-addon.1546968199.js → jquery-ui-timepicker-addon.1549315000.js}
RENAMED
File without changes
|
js/{jquery.colorbox-min.1546968199.js → jquery.colorbox-min.1549315000.js}
RENAMED
File without changes
|
js/{jquery.colorbox.1546968199.js → jquery.colorbox.1549315000.js}
RENAMED
File without changes
|
js/{jquery.dataTables.min.1546968199.js → jquery.dataTables.min.1549315000.js}
RENAMED
File without changes
|
js/{jquery.qrcode.min.1546968199.js → jquery.qrcode.min.1549315000.js}
RENAMED
File without changes
|
js/{jquery.tmpl.min.1546968199.js → jquery.tmpl.min.1549315000.js}
RENAMED
File without changes
|
js/{jquery.tools.min.1546968199.js → jquery.tools.min.1549315000.js}
RENAMED
File without changes
|
js/{knockout-3.3.0.1546968199.js → knockout-3.3.0.1549315000.js}
RENAMED
File without changes
|
js/{perf.1546968199.js → perf.1549315000.js}
RENAMED
File without changes
|
js/{wfdashboard.1546968199.js → wfdashboard.1549315000.js}
RENAMED
File without changes
|
js/{wfdropdown.1546968199.js → wfdropdown.1549315000.js}
RENAMED
File without changes
|
js/{wfglobal.1546968199.js → wfglobal.1549315000.js}
RENAMED
File without changes
|
js/{wfpopover.1546968199.js → wfpopover.1549315000.js}
RENAMED
File without changes
|
js/{wfselect2.min.1546968199.js → wfselect2.min.1549315000.js}
RENAMED
File without changes
|
lib/dashboard/widget_notifications.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php if (!defined('WORDFENCE_VERSION')) { exit; } ?>
|
2 |
<div class="wf-row">
|
3 |
-
<div class="wf-col-xs-12">
|
4 |
<div class="wf-dashboard-item active">
|
5 |
<div class="wf-dashboard-item-inner">
|
6 |
<div class="wf-dashboard-item-content">
|
@@ -28,6 +28,68 @@
|
|
28 |
</div>
|
29 |
</div>
|
30 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
</div>
|
32 |
<script type="application/javascript">
|
33 |
(function($) {
|
@@ -51,4 +113,4 @@
|
|
51 |
});
|
52 |
});
|
53 |
})(jQuery);
|
54 |
-
</script>
|
1 |
<?php if (!defined('WORDFENCE_VERSION')) { exit; } ?>
|
2 |
<div class="wf-row">
|
3 |
+
<div class="wf-col-xs-12 <?php if (wfCentral::isSupported() && wfConfig::get('showWfCentralUI', false)): ?>wf-col-lg-6 wf-col-lg-half-padding-right<?php else: ?>wf-col-lg-12<?php endif ?>">
|
4 |
<div class="wf-dashboard-item active">
|
5 |
<div class="wf-dashboard-item-inner">
|
6 |
<div class="wf-dashboard-item-content">
|
28 |
</div>
|
29 |
</div>
|
30 |
</div>
|
31 |
+
<?php if (wfCentral::isSupported() && wfConfig::get('showWfCentralUI', false)): ?>
|
32 |
+
<div class="wf-col-xs-12 wf-col-lg-6 wf-col-lg-half-padding-left">
|
33 |
+
<div class="wf-dashboard-item active">
|
34 |
+
<?php if ($d->wordfenceCentralConnected): ?>
|
35 |
+
<div class="wf-dashboard-item-inner">
|
36 |
+
<div class="wf-dashboard-item-content">
|
37 |
+
<div class="wf-dashboard-item-title">
|
38 |
+
<strong>Wordfence Central Activated</strong>
|
39 |
+
</div>
|
40 |
+
</div>
|
41 |
+
</div>
|
42 |
+
<div class="wf-dashboard-item-extra">
|
43 |
+
<ul class="wf-dashboard-item-list">
|
44 |
+
<li>
|
45 |
+
<div class="wf-row">
|
46 |
+
<p class="wf-col-md-9">
|
47 |
+
<?php printf(__('Connected by %s on %s', 'wordfence'), esc_html($d->wordfenceCentralConnectEmail), esc_html(date_i18n(get_option('date_format'), $d->wordfenceCentralConnectTime))) ?>
|
48 |
+
|
49 |
+
</p>
|
50 |
+
<p class="wf-col-md-3 wf-right-md wf-right-lg">
|
51 |
+
<a href="admin.php?page=WordfenceCentral"><strong><?php _e('Disconnect', 'wordfence') ?></strong></a>
|
52 |
+
</p>
|
53 |
+
</div>
|
54 |
+
</li>
|
55 |
+
</ul>
|
56 |
+
</div>
|
57 |
+
|
58 |
+
<?php elseif ($d->wordfenceCentralDisconnected): ?>
|
59 |
+
<div class="wf-dashboard-item-inner">
|
60 |
+
<div class="wf-dashboard-item-content">
|
61 |
+
<div class="wf-dashboard-item-title">
|
62 |
+
<strong><?php _e('Wordfence Central Deactivated', 'wordfence') ?></strong>
|
63 |
+
</div>
|
64 |
+
</div>
|
65 |
+
</div>
|
66 |
+
|
67 |
+
<div class="wf-dashboard-item-extra">
|
68 |
+
<ul class="wf-dashboard-item-list">
|
69 |
+
<li>
|
70 |
+
<div class="wf-row">
|
71 |
+
<p class="wf-col-md-9">
|
72 |
+
Disconnected by <?php echo esc_html($d->wordfenceCentralDisconnectEmail) ?> on <?php echo esc_html(date_i18n(get_option('date_format'), $d->wordfenceCentralDisconnectTime)) ?>
|
73 |
+
</p>
|
74 |
+
<p class="wf-col-md-3 wf-right-md wf-right-lg">
|
75 |
+
<a href="<?php echo esc_url(WORDFENCE_CENTRAL_URL_SEC) ?>"><strong><?php _e('Visit Cental', 'wordfence') ?></strong></a>
|
76 |
+
</p>
|
77 |
+
</div>
|
78 |
+
</li>
|
79 |
+
</ul>
|
80 |
+
</div>
|
81 |
+
<?php else: ?>
|
82 |
+
<div class="wf-central-dashboard">
|
83 |
+
<img class="wf-central-dashboard-logo" src="<?php echo wfUtils::getBaseURL() ?>/images/wf-central-logo.svg" alt="Wordfence Central">
|
84 |
+
<div class="wf-central-dashboard-copy">
|
85 |
+
<p><?php _e('Wordfence Central allows you to manage Wordfence on multiple sites from one location. It makes security monitoring and configuring Wordfence easier.', 'wordfence') ?></p>
|
86 |
+
<p><a href="https://www.wordfence.com/help/central"><?php _e('Get Started', 'wordfence') ?></a></p>
|
87 |
+
</div>
|
88 |
+
</div>
|
89 |
+
<?php endif ?>
|
90 |
+
</div>
|
91 |
+
</div>
|
92 |
+
<?php endif ?>
|
93 |
</div>
|
94 |
<script type="application/javascript">
|
95 |
(function($) {
|
113 |
});
|
114 |
});
|
115 |
})(jQuery);
|
116 |
+
</script>
|
lib/email_newIssues.php
CHANGED
@@ -28,10 +28,26 @@
|
|
28 |
</div>
|
29 |
<?php endif ?>
|
30 |
|
31 |
-
<?php
|
32 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
|
34 |
-
|
|
|
|
|
|
|
35 |
<p>* <?php echo htmlspecialchars($i['shortMsg']) ?></p>
|
36 |
<?php
|
37 |
if ((isset($i['tmplData']['wpRemoved']) && $i['tmplData']['wpRemoved']) || (isset($i['tmplData']['abandoned']) && $i['tmplData']['abandoned'])) {
|
@@ -43,24 +59,28 @@
|
|
43 |
echo '</p>';
|
44 |
}
|
45 |
}
|
46 |
-
|
|
|
|
|
|
|
|
|
|
|
47 |
echo '<p>';
|
48 |
-
if (isset($i['tmplData']['vulnerable']) && $i['tmplData']['vulnerable']) {
|
49 |
-
echo '<strong>' . __('Update includes security-related fixes.', 'wordfence') . '</strong> ';
|
50 |
-
if (isset($i['tmplData']['vulnerabilityLink'])) {
|
51 |
-
echo '<a href="' . $i['tmplData']['vulnerabilityLink'] . '" target="_blank" rel="nofollow noreferrer noopener">' . __('Vulnerability Information', 'wordfence') . '</a> ';
|
52 |
-
}
|
53 |
-
}
|
54 |
-
echo $i['tmplData']['wpURL'] . '/#developers</p>';
|
55 |
}
|
56 |
-
|
57 |
-
echo '<
|
58 |
if (isset($i['tmplData']['vulnerabilityLink'])) {
|
59 |
echo ' <a href="' . $i['tmplData']['vulnerabilityLink'] . '" target="_blank" rel="nofollow noreferrer noopener">' . __('Vulnerability Information', 'wordfence') . '</a>';
|
60 |
}
|
|
|
|
|
|
|
|
|
|
|
61 |
echo '</p>';
|
62 |
}
|
63 |
-
?>
|
|
|
64 |
<?php if (!empty($i['tmplData']['badURL'])): ?>
|
65 |
<p><img src="<?php echo WORDFENCE_API_URL_BASE_NONSEC . "?" . http_build_query(array(
|
66 |
'v' => wfUtils::getWPVersion(),
|
@@ -71,21 +91,8 @@
|
|
71 |
), '', '&') ?>" alt="" /></p>
|
72 |
<?php endif ?>
|
73 |
|
74 |
-
<?php } }
|
75 |
-
|
76 |
-
<?php if($level == 2 && $totalWarningIssues > 0){ ?>
|
77 |
-
<p><?php _e('Warnings:', 'wordfence'); ?></p>
|
78 |
-
|
79 |
-
<?php foreach($issues as $i){ if($i['severity'] == 2){ ?>
|
80 |
-
<p>* <?php echo htmlspecialchars($i['shortMsg']) ?></p>
|
81 |
-
<?php if ($i['type'] == 'coreUnknown'): ?>
|
82 |
-
<p><?php _e('The core files scan has not run because this version is not currently indexed by Wordfence. New WordPress versions may take up to a day to be indexed.', 'wordfence'); ?></p>
|
83 |
-
<?php endif ?>
|
84 |
-
<?php if (isset($i['tmplData']['wpURL'])): ?>
|
85 |
-
<p><?php echo $i['tmplData']['wpURL']; ?>/#developers</p>
|
86 |
-
<?php endif ?>
|
87 |
-
|
88 |
-
<?php } } } ?>
|
89 |
|
90 |
<?php if ($issuesNotShown > 0) { ?>
|
91 |
<p><?php printf(($issuesNotShown == 1 ? __('%d issue was omitted from this email.', 'wordfence') : __('%d issues were omitted from this email.', 'wordfence')), $issuesNotShown); echo ' '; _e('View every issue:', 'wordfence'); ?> <a href="<?php echo esc_attr(wfUtils::wpAdminURL('admin.php?page=WordfenceScan')); ?>"><?php echo esc_html(wfUtils::wpAdminURL('admin.php?page=WordfenceScan')); ?></a></p>
|
28 |
</div>
|
29 |
<?php endif ?>
|
30 |
|
31 |
+
<?php
|
32 |
+
$severitySections = array(
|
33 |
+
wfIssues::SEVERITY_CRITICAL => __('Critical Problems:', 'wordfence'),
|
34 |
+
wfIssues::SEVERITY_HIGH => __('High Severity Problems:', 'wordfence'),
|
35 |
+
wfIssues::SEVERITY_MEDIUM => __('Medium Severity Problems:', 'wordfence'),
|
36 |
+
wfIssues::SEVERITY_LOW => __('Low Severity Problems:', 'wordfence'),
|
37 |
+
);
|
38 |
+
?>
|
39 |
+
|
40 |
+
<?php
|
41 |
+
foreach ($severitySections as $severityLevel => $severityLabel):
|
42 |
+
if ($severityLevel < $level) {
|
43 |
+
continue;
|
44 |
+
}
|
45 |
+
$hasIssuesAtSeverity = false;
|
46 |
|
47 |
+
foreach($issues as $i){ if($i['severity'] == $severityLevel){ ?>
|
48 |
+
<?php if (!$hasIssuesAtSeverity): $hasIssuesAtSeverity = true; ?>
|
49 |
+
<p><?php echo $severityLabel ?></p>
|
50 |
+
<?php endif ?>
|
51 |
<p>* <?php echo htmlspecialchars($i['shortMsg']) ?></p>
|
52 |
<?php
|
53 |
if ((isset($i['tmplData']['wpRemoved']) && $i['tmplData']['wpRemoved']) || (isset($i['tmplData']['abandoned']) && $i['tmplData']['abandoned'])) {
|
59 |
echo '</p>';
|
60 |
}
|
61 |
}
|
62 |
+
if ($i['type'] == 'coreUnknown') {
|
63 |
+
echo '<p>' . __('The core files scan has not run because this version is not currently indexed by Wordfence. New WordPress versions may take up to a day to be indexed.', 'wordfence') . '</p>';
|
64 |
+
}
|
65 |
+
|
66 |
+
$showWPParagraph = !empty($i['tmplData']['vulnerable']) || isset($i['tmplData']['wpURL']);
|
67 |
+
if ($showWPParagraph) {
|
68 |
echo '<p>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
}
|
70 |
+
if (!empty($i['tmplData']['vulnerable'])) {
|
71 |
+
echo '<strong>' . __('Update includes security-related fixes.', 'wordfence') . '</strong>';
|
72 |
if (isset($i['tmplData']['vulnerabilityLink'])) {
|
73 |
echo ' <a href="' . $i['tmplData']['vulnerabilityLink'] . '" target="_blank" rel="nofollow noreferrer noopener">' . __('Vulnerability Information', 'wordfence') . '</a>';
|
74 |
}
|
75 |
+
}
|
76 |
+
if (isset($i['tmplData']['wpURL'])) {
|
77 |
+
echo $i['tmplData']['wpURL'] . '/#developers';
|
78 |
+
}
|
79 |
+
if ($showWPParagraph) {
|
80 |
echo '</p>';
|
81 |
}
|
82 |
+
?>
|
83 |
+
|
84 |
<?php if (!empty($i['tmplData']['badURL'])): ?>
|
85 |
<p><img src="<?php echo WORDFENCE_API_URL_BASE_NONSEC . "?" . http_build_query(array(
|
86 |
'v' => wfUtils::getWPVersion(),
|
91 |
), '', '&') ?>" alt="" /></p>
|
92 |
<?php endif ?>
|
93 |
|
94 |
+
<?php } } ?>
|
95 |
+
<?php endforeach; ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
|
97 |
<?php if ($issuesNotShown > 0) { ?>
|
98 |
<p><?php printf(($issuesNotShown == 1 ? __('%d issue was omitted from this email.', 'wordfence') : __('%d issues were omitted from this email.', 'wordfence')), $issuesNotShown); echo ' '; _e('View every issue:', 'wordfence'); ?> <a href="<?php echo esc_attr(wfUtils::wpAdminURL('admin.php?page=WordfenceScan')); ?>"><?php echo esc_html(wfUtils::wpAdminURL('admin.php?page=WordfenceScan')); ?></a></p>
|
lib/menu_options.php
CHANGED
@@ -87,8 +87,7 @@ if (isset($_GET['source']) && wfPage::isValidPage($_GET['source'])) {
|
|
87 |
'wf-option-notification-scanStatus' => __('Scan Status', 'wordfence'),
|
88 |
'wf-option-alertOn-update' => __('Email me when Wordfence is automatically updated', 'wordfence'),
|
89 |
'wf-option-alertOn-wordfenceDeactivated' => __('Email me if Wordfence is deactivated', 'wordfence'),
|
90 |
-
'wf-option-alertOn-
|
91 |
-
'wf-option-alertOn-warnings' => __('Alert on warnings', 'wordfence'),
|
92 |
'wf-option-alertOn-block' => __('Alert when an IP address is blocked', 'wordfence'),
|
93 |
'wf-option-alertOn-loginLockout' => __('Alert when someone is locked out from login', 'wordfence'),
|
94 |
'wf-option-alertOn-lostPasswdForm' => __('Alert when the "lost password" form is used for a valid user', 'wordfence'),
|
@@ -134,7 +133,6 @@ if (isset($_GET['source']) && wfPage::isValidPage($_GET['source'])) {
|
|
134 |
'wf-option-max404Crawlers' => __('If a crawler\'s pages not found (404s) exceed', 'wordfence'),
|
135 |
'wf-option-maxRequestsHumans' => __('If a human\'s page views exceed', 'wordfence'),
|
136 |
'wf-option-max404Humans' => __('If a human\'s pages not found (404s) exceed', 'wordfence'),
|
137 |
-
'wf-option-maxScanHits' => __('If 404s for known vulnerable URLs exceed', 'wordfence'),
|
138 |
'wf-option-blockedTime' => __('How long is an IP address blocked when it breaks a rule', 'wordfence'),
|
139 |
'wf-option-allowed404s' => __('Whitelisted 404 URLs', 'wordfence'),
|
140 |
'wf-option-wafWhitelist' => __('Web Application Firewall Whitelisted URLs', 'wordfence'),
|
87 |
'wf-option-notification-scanStatus' => __('Scan Status', 'wordfence'),
|
88 |
'wf-option-alertOn-update' => __('Email me when Wordfence is automatically updated', 'wordfence'),
|
89 |
'wf-option-alertOn-wordfenceDeactivated' => __('Email me if Wordfence is deactivated', 'wordfence'),
|
90 |
+
'wf-option-alertOn-scanIssues' => __('Alert me with scan results for issues of this severity level', 'wordfence'),
|
|
|
91 |
'wf-option-alertOn-block' => __('Alert when an IP address is blocked', 'wordfence'),
|
92 |
'wf-option-alertOn-loginLockout' => __('Alert when someone is locked out from login', 'wordfence'),
|
93 |
'wf-option-alertOn-lostPasswdForm' => __('Alert when the "lost password" form is used for a valid user', 'wordfence'),
|
133 |
'wf-option-max404Crawlers' => __('If a crawler\'s pages not found (404s) exceed', 'wordfence'),
|
134 |
'wf-option-maxRequestsHumans' => __('If a human\'s page views exceed', 'wordfence'),
|
135 |
'wf-option-max404Humans' => __('If a human\'s pages not found (404s) exceed', 'wordfence'),
|
|
|
136 |
'wf-option-blockedTime' => __('How long is an IP address blocked when it breaks a rule', 'wordfence'),
|
137 |
'wf-option-allowed404s' => __('Whitelisted 404 URLs', 'wordfence'),
|
138 |
'wf-option-wafWhitelist' => __('Web Application Firewall Whitelisted URLs', 'wordfence'),
|
lib/menu_tools_diagnostic.php
CHANGED
@@ -178,18 +178,7 @@ if (!isset($sendingDiagnosticEmail)) {
|
|
178 |
<?php
|
179 |
$howGet = wfConfig::get('howGetIPs', false);
|
180 |
list($currentIP, $currentServerVarForIP) = wfUtils::getIPAndServerVariable();
|
181 |
-
$howGetHasErrors =
|
182 |
-
foreach (array(
|
183 |
-
'REMOTE_ADDR' => 'REMOTE_ADDR',
|
184 |
-
'HTTP_CF_CONNECTING_IP' => 'CF-Connecting-IP',
|
185 |
-
'HTTP_X_REAL_IP' => 'X-Real-IP',
|
186 |
-
'HTTP_X_FORWARDED_FOR' => 'X-Forwarded-For',
|
187 |
-
) as $variable => $label) {
|
188 |
-
if (!($currentServerVarForIP && $currentServerVarForIP === $variable) && $howGet === $variable) {
|
189 |
-
$howGetHasErrors = true;
|
190 |
-
break;
|
191 |
-
}
|
192 |
-
}
|
193 |
?>
|
194 |
<div class="wf-block<?php echo ($howGetHasErrors ? ' wf-diagnostic-fail' : '') . (wfPersistenceController::shared()->isActive('wf-diagnostics-client-ip') ? ' wf-active' : '') ?>" data-persistence-key="<?php echo esc_attr('wf-diagnostics-client-ip') ?>">
|
195 |
<div class="wf-block-header">
|
@@ -215,50 +204,25 @@ if (!isset($sendingDiagnosticEmail)) {
|
|
215 |
</tbody>
|
216 |
<tbody>
|
217 |
<?php
|
218 |
-
$
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
) as $variable => $label): ?>
|
226 |
<tr>
|
227 |
-
<td><?php echo $
|
228 |
<td><?php
|
229 |
-
if (!
|
230 |
_e('(not set)', 'wordfence');
|
|
|
|
|
|
|
231 |
} else {
|
232 |
-
|
233 |
-
$trustedProxies = explode("\n", wfConfig::get('howGetIPs_trusted_proxies', ''));
|
234 |
-
$items = preg_replace('/[\s,]/', '', explode(',', $_SERVER[$variable]));
|
235 |
-
$items = array_reverse($items);
|
236 |
-
$output = '';
|
237 |
-
$markedSelectedAddress = false;
|
238 |
-
foreach ($items as $index => $i) {
|
239 |
-
foreach ($trustedProxies as $proxy) {
|
240 |
-
if (!empty($proxy)) {
|
241 |
-
if (wfUtils::subnetContainsIP($proxy, $i) && $index < count($items) - 1) {
|
242 |
-
$output = esc_html($i) . ', ' . $output;
|
243 |
-
continue 2;
|
244 |
-
}
|
245 |
-
}
|
246 |
-
}
|
247 |
-
|
248 |
-
if (!$markedSelectedAddress) {
|
249 |
-
$output = '<strong>' . esc_html($i) . '</strong>, ' . $output;
|
250 |
-
$markedSelectedAddress = true;
|
251 |
-
} else {
|
252 |
-
$output = esc_html($i) . ', ' . $output;
|
253 |
-
}
|
254 |
-
}
|
255 |
-
|
256 |
-
echo substr($output, 0, -2);
|
257 |
-
} else {
|
258 |
-
echo esc_html($_SERVER[$variable]);
|
259 |
-
}
|
260 |
}
|
261 |
-
|
262 |
<?php if ($currentServerVarForIP && $currentServerVarForIP === $variable): ?>
|
263 |
<td class="wf-result-success"><?php _e('In use', 'wordfence'); ?></td>
|
264 |
<?php elseif ($howGet === $variable): ?>
|
178 |
<?php
|
179 |
$howGet = wfConfig::get('howGetIPs', false);
|
180 |
list($currentIP, $currentServerVarForIP) = wfUtils::getIPAndServerVariable();
|
181 |
+
$howGetHasErrors = $howGet && (! $currentServerVarForIP || $howGet !== $currentServerVarForIP);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
182 |
?>
|
183 |
<div class="wf-block<?php echo ($howGetHasErrors ? ' wf-diagnostic-fail' : '') . (wfPersistenceController::shared()->isActive('wf-diagnostics-client-ip') ? ' wf-active' : '') ?>" data-persistence-key="<?php echo esc_attr('wf-diagnostics-client-ip') ?>">
|
184 |
<div class="wf-block-header">
|
204 |
</tbody>
|
205 |
<tbody>
|
206 |
<?php
|
207 |
+
$serverVariables = array(
|
208 |
+
'REMOTE_ADDR' => 'REMOTE_ADDR',
|
209 |
+
'HTTP_CF_CONNECTING_IP' => 'CF-Connecting-IP',
|
210 |
+
'HTTP_X_REAL_IP' => 'X-Real-IP',
|
211 |
+
'HTTP_X_FORWARDED_FOR' => 'X-Forwarded-For',
|
212 |
+
);
|
213 |
+
foreach (wfUtils::getAllServerVariableIPs() as $variable => $ip): ?>
|
|
|
214 |
<tr>
|
215 |
+
<td><?php echo isset($serverVariables[$variable]) ? $serverVariables[$variable] : $variable ?></td>
|
216 |
<td><?php
|
217 |
+
if (! $ip) {
|
218 |
_e('(not set)', 'wordfence');
|
219 |
+
} elseif (is_array($ip)) {
|
220 |
+
$output = array_map('esc_html', $ip);
|
221 |
+
echo str_replace($currentIP, "<strong>{$currentIP}</strong>", implode(', ', $output));
|
222 |
} else {
|
223 |
+
echo esc_html($ip);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
224 |
}
|
225 |
+
?></td>
|
226 |
<?php if ($currentServerVarForIP && $currentServerVarForIP === $variable): ?>
|
227 |
<td class="wf-result-success"><?php _e('In use', 'wordfence'); ?></td>
|
228 |
<?php elseif ($howGet === $variable): ?>
|
lib/menu_tools_livetraffic.php
CHANGED
@@ -42,14 +42,14 @@ if (!wfConfig::liveTrafficEnabled($overridden)):
|
|
42 |
<div id="wordfenceLiveActivitySecurityOnly"><p>
|
43 |
<strong><?php _e('Traffic logging mode: Security-related traffic only', 'wordfence') ?><?php
|
44 |
if ($overridden) {
|
45 |
-
|
46 |
} ?>.</strong> <?php _e('Login and firewall activity will appear below.', 'wordfence') ?></p>
|
47 |
</div>
|
48 |
<?php else: ?>
|
49 |
<div id="wordfenceLiveActivityAll"><p>
|
50 |
<strong><?php _e('Traffic logging mode: All traffic', 'wordfence') ?><?php
|
51 |
if ($overridden) {
|
52 |
-
|
53 |
} ?>.</strong> <?php _e('Regular traffic and security-related traffic will appear below.', 'wordfence') ?></p>
|
54 |
</div>
|
55 |
<?php endif; ?>
|
42 |
<div id="wordfenceLiveActivitySecurityOnly"><p>
|
43 |
<strong><?php _e('Traffic logging mode: Security-related traffic only', 'wordfence') ?><?php
|
44 |
if ($overridden) {
|
45 |
+
printf(__(' (host setting <a href="%s" class="wfhelp" target="_blank" rel="noopener noreferrer"></a>)', 'wordfence'), wfSupportController::supportURL(wfSupportController::ITEM_TOOLS_LIVE_TRAFFIC_OPTION_ENABLE));
|
46 |
} ?>.</strong> <?php _e('Login and firewall activity will appear below.', 'wordfence') ?></p>
|
47 |
</div>
|
48 |
<?php else: ?>
|
49 |
<div id="wordfenceLiveActivityAll"><p>
|
50 |
<strong><?php _e('Traffic logging mode: All traffic', 'wordfence') ?><?php
|
51 |
if ($overridden) {
|
52 |
+
printf(__(' (host setting <a href="%s" class="wfhelp" target="_blank" rel="noopener noreferrer"></a>)', 'wordfence'), wfSupportController::supportURL(wfSupportController::ITEM_TOOLS_LIVE_TRAFFIC_OPTION_ENABLE));
|
53 |
} ?>.</strong> <?php _e('Regular traffic and security-related traffic will appear below.', 'wordfence') ?></p>
|
54 |
</div>
|
55 |
<?php endif; ?>
|
lib/menu_wordfence_central.php
ADDED
@@ -0,0 +1,287 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if (!defined('WORDFENCE_VERSION')) {
|
3 |
+
exit;
|
4 |
+
}
|
5 |
+
/**
|
6 |
+
* @var string $subpage
|
7 |
+
*/
|
8 |
+
|
9 |
+
$stepContent = array(
|
10 |
+
1 => __('Testing initial communication with Wordfence Central.', 'wordfence'),
|
11 |
+
2 => __('Passing public key to Wordfence Central.', 'wordfence'),
|
12 |
+
3 => __('Testing public key authentication with Wordfence Central.', 'wordfence'),
|
13 |
+
4 => __('Testing that Wordfence Central is able to communicate with this site.', 'wordfence'),
|
14 |
+
5 => __('Retrieving access token using authorization grant.', 'wordfence'),
|
15 |
+
6 => __('Redirecting back to Wordfence Central.', 'wordfence'),
|
16 |
+
);
|
17 |
+
$connected = wfConfig::get('wordfenceCentralConnected');
|
18 |
+
$partialConnection = wfConfig::get('wordfenceCentralSiteID');
|
19 |
+
|
20 |
+
?>
|
21 |
+
<?php
|
22 |
+
if (wfOnboardingController::shouldShowAttempt3()) {
|
23 |
+
echo wfView::create('onboarding/disabled-overlay')->render();
|
24 |
+
echo wfView::create('onboarding/banner')->render();
|
25 |
+
} else if (wfConfig::get('touppPromptNeeded')) {
|
26 |
+
echo wfView::create('gdpr/disabled-overlay')->render();
|
27 |
+
echo wfView::create('gdpr/banner')->render();
|
28 |
+
}
|
29 |
+
?>
|
30 |
+
<div class="wrap wordfence">
|
31 |
+
<div class="wf-container-fluid">
|
32 |
+
<div class="wf-row">
|
33 |
+
<div class="wf-col-xs-12">
|
34 |
+
<div class="wp-header-end"></div>
|
35 |
+
<?php
|
36 |
+
echo wfView::create('common/section-title', array(
|
37 |
+
'title' => __('Wordfence Central', 'wordfence'),
|
38 |
+
'showIcon' => true,
|
39 |
+
))->render();
|
40 |
+
?>
|
41 |
+
</div>
|
42 |
+
|
43 |
+
<?php if ($connected): ?>
|
44 |
+
<div class="wf-col-xs-12 wf-central-connected">
|
45 |
+
<div class="wf-flex-row wf-flex-grow-all">
|
46 |
+
<div class="wf-flex-row-1 wf-block wf-active">
|
47 |
+
<div class="wf-central-dashboard">
|
48 |
+
<img class="wf-central-dashboard-logo" src="<?php echo wfUtils::getBaseURL() ?>/images/wf-central-logo.svg" alt="Wordfence Central">
|
49 |
+
<div class="wf-central-dashboard-copy">
|
50 |
+
<p><strong><?php _e('Wordfence Central', 'wordfence') ?></strong></p>
|
51 |
+
<p><?php _e('Wordfence Central allows you to manage Wordfence on multiple sites from one location. It makes security monitoring and configuring Wordfence easier.', 'wordfence') ?></p>
|
52 |
+
<p class="wf-right-lg"><a href="https://www.wordfence.com/central"><strong><?php _e('Visit Wordfence Central', 'wordfence') ?></strong></a></p>
|
53 |
+
</div>
|
54 |
+
</div>
|
55 |
+
</div>
|
56 |
+
<div class="wf-flex-row-1 wf-block wf-active">
|
57 |
+
<p><strong><?php _e('Wordfence Central Status', 'wordfence') ?></strong></p>
|
58 |
+
<p><?php printf(__('Activated - connected by %s on %s', 'wordfence'), esc_html(wfConfig::get('wordfenceCentralConnectEmail')), date_i18n('F j, Y', (int) wfConfig::get('wordfenceCentralConnectTime'))) ?></p>
|
59 |
+
<p class="wf-right-lg"><a href="#" class="wf-central-disconnect"><strong><?php _e('Disconnect This Site', 'wordfence') ?></strong></a></p>
|
60 |
+
</div>
|
61 |
+
</div>
|
62 |
+
</div>
|
63 |
+
<?php elseif (isset($_GET['grant'])): ?>
|
64 |
+
<div class="wf-col-xs-12">
|
65 |
+
<div class="wf-block wf-active">
|
66 |
+
<div class="wf-block-header">
|
67 |
+
<div class="wf-block-header-content">
|
68 |
+
<strong><?php _e('Wordfence Central Installation Process') ?></strong>
|
69 |
+
</div>
|
70 |
+
</div>
|
71 |
+
<div class="wf-block-content">
|
72 |
+
<ul class="wf-block-list" id="wf-central-progress">
|
73 |
+
<?php for ($i = 1; $i <= 6; $i++): ?>
|
74 |
+
<li id="wf-central-progress-step<?php echo $i ?>" class="pending">
|
75 |
+
<div class="wf-central-progress-icon">
|
76 |
+
<div class="wf-step-pending"></div>
|
77 |
+
<div class="wf-step-running">
|
78 |
+
<?php
|
79 |
+
echo wfView::create('common/indeterminate-progress', array(
|
80 |
+
'size' => 50,
|
81 |
+
))->render();
|
82 |
+
?>
|
83 |
+
</div>
|
84 |
+
<div class="wf-step-complete-success"></div>
|
85 |
+
<div class="wf-step-complete-warning"></div>
|
86 |
+
</div>
|
87 |
+
<div class="wf-central-progress-content">
|
88 |
+
<p><?php echo esc_html($stepContent[$i]) ?></p>
|
89 |
+
</div>
|
90 |
+
</li>
|
91 |
+
<?php endfor ?>
|
92 |
+
</ul>
|
93 |
+
</div>
|
94 |
+
</div>
|
95 |
+
</div>
|
96 |
+
<?php elseif ($partialConnection): ?>
|
97 |
+
<div class="wf-center-lg">
|
98 |
+
<p><?php _e('It looks like you\'ve tried to connect this site to Wordfence Central, but the installation did not finish.', 'wordfence') ?></p>
|
99 |
+
<p>
|
100 |
+
<a href="<?php echo WORDFENCE_CENTRAL_URL_SEC ?>/sites/connection-issues?complete-setup=<?php echo esc_attr($partialConnection) ?>"
|
101 |
+
class="wf-btn wf-btn-primary"
|
102 |
+
><?php _e('Resume Installation', 'wordfence') ?></a>
|
103 |
+
<a href="#" class="wf-btn wf-btn-warning wf-central-disconnect"><?php _e('Disconnect Site', 'wordfence') ?></a>
|
104 |
+
</p>
|
105 |
+
</div>
|
106 |
+
<?php else: ?>
|
107 |
+
<div class="wf-center-lg">
|
108 |
+
<p><?php _e('Wordfence Central allows you to manage Wordfence on multiple sites from one location. It makes security monitoring and configuring Wordfence easier.', 'wordfence') ?></p>
|
109 |
+
<p><?php _e('To connect your site your site to Wordfence Central, use the link below:', 'wordfence') ?></p>
|
110 |
+
<p style="text-align: center">
|
111 |
+
<a href="<?php echo WORDFENCE_CENTRAL_URL_SEC ?>?newsite=<?php echo esc_attr(home_url()) ?>"
|
112 |
+
class="wf-btn wf-btn-primary"
|
113 |
+
><?php _e('Connect Site', 'wordfence') ?></a>
|
114 |
+
</p>
|
115 |
+
</div>
|
116 |
+
<?php endif ?>
|
117 |
+
</div>
|
118 |
+
</div>
|
119 |
+
</div>
|
120 |
+
|
121 |
+
<script>
|
122 |
+
(function($) {
|
123 |
+
var authGrant = '<?php echo esc_js(isset($_GET['grant']) ? $_GET['grant'] : '') ?>';
|
124 |
+
var currentStep = <?php echo json_encode(wfConfig::getInt('wordfenceCentralCurrentStep', 1)) ?>;
|
125 |
+
var connected = <?php echo json_encode($connected) ?>;
|
126 |
+
|
127 |
+
function wfConnectError(error) {
|
128 |
+
WFAD.colorboxError(error);
|
129 |
+
}
|
130 |
+
|
131 |
+
function wfCentralStepAjax(step, action, data, cb, cbErr, noLoading) {
|
132 |
+
var el = $('#wf-central-progress-' + step);
|
133 |
+
el.removeClass('pending')
|
134 |
+
.addClass('running');
|
135 |
+
|
136 |
+
WFAD.ajax(action, data, function(response) {
|
137 |
+
if (response && response.success) {
|
138 |
+
el.removeClass('running')
|
139 |
+
.addClass('complete-success');
|
140 |
+
cb && cb(response);
|
141 |
+
} else if (response && response.err) {
|
142 |
+
el.removeClass('running')
|
143 |
+
.addClass('complete-warning');
|
144 |
+
}
|
145 |
+
}, function(response) {
|
146 |
+
el.removeClass('running')
|
147 |
+
.addClass('complete-warning');
|
148 |
+
cbErr && cbErr(response);
|
149 |
+
}, noLoading);
|
150 |
+
}
|
151 |
+
|
152 |
+
var WFCentralInstaller = {};
|
153 |
+
window.WFCentralInstaller = WFCentralInstaller;
|
154 |
+
|
155 |
+
// Step 1: Makes GET request to `/central/api/site/access-token` endpoint authenticated with the auth grant supplied by the user.
|
156 |
+
// - Receives site GUID, public key, short lived JWT.
|
157 |
+
|
158 |
+
WFCentralInstaller.step1 = function() {
|
159 |
+
wfCentralStepAjax('step1', 'wordfence_wfcentral_step1', {
|
160 |
+
'auth-grant': authGrant
|
161 |
+
}, function(response) {
|
162 |
+
$(window).trigger('step2', response);
|
163 |
+
}, wfConnectError);
|
164 |
+
};
|
165 |
+
|
166 |
+
// Step 2: Makes PATCH request to `/central/api/wf/site/<guid>` endpoint passing in the new public key.
|
167 |
+
// Uses JWT from auth grant endpoint as auth.
|
168 |
+
WFCentralInstaller.step2 = function() {
|
169 |
+
wfCentralStepAjax('step2', 'wordfence_wfcentral_step2', {}, function(response) {
|
170 |
+
$(window).trigger('step3', response);
|
171 |
+
}, wfConnectError);
|
172 |
+
};
|
173 |
+
|
174 |
+
$(window).on('step2', WFCentralInstaller.step2);
|
175 |
+
|
176 |
+
// Step 3: Makes GET request to `/central/api/wf/site/<guid>` endpoint signed using Wordfence plugin private key.
|
177 |
+
// - Expects 200 response with site data.
|
178 |
+
WFCentralInstaller.step3 = function() {
|
179 |
+
wfCentralStepAjax('step3', 'wordfence_wfcentral_step3', {}, function(response) {
|
180 |
+
var callback = function() {
|
181 |
+
$(window).trigger('step4')
|
182 |
+
};
|
183 |
+
var interval = setInterval(callback, 4000);
|
184 |
+
$(window).on('step3-clearInterval', function() {
|
185 |
+
clearInterval(interval);
|
186 |
+
});
|
187 |
+
callback();
|
188 |
+
}, wfConnectError);
|
189 |
+
};
|
190 |
+
|
191 |
+
$(window).on('step3', WFCentralInstaller.step3);
|
192 |
+
|
193 |
+
// Step 4: Poll for PUT request at `/wp-json/wp/v2/wordfence-auth-grant/` endpoint signed using Wordfence Central private key with short lived JWT.
|
194 |
+
// - Expects verifiable signature of incoming request from Wordfence Central.
|
195 |
+
// - Stores auth grant JWT.
|
196 |
+
WFCentralInstaller.step4 = function() {
|
197 |
+
wfCentralStepAjax('step4', 'wordfence_wfcentral_step4', {}, function(response) {
|
198 |
+
if (response && response.success) {
|
199 |
+
$(window).trigger('step3-clearInterval');
|
200 |
+
$(window).trigger('step5');
|
201 |
+
}
|
202 |
+
}, wfConnectError);
|
203 |
+
};
|
204 |
+
|
205 |
+
$(window).on('step4', WFCentralInstaller.step4);
|
206 |
+
|
207 |
+
// Step 5: Makes GET request to `/central/api/site/<guid>/access-token` endpoint signed using Wordfence plugin private key with auth grant JWT.
|
208 |
+
// - Expects 200 response with access token.
|
209 |
+
WFCentralInstaller.step5 = function() {
|
210 |
+
wfCentralStepAjax('step5', 'wordfence_wfcentral_step5', {
|
211 |
+
'auth-grant': authGrant
|
212 |
+
}, function(response) {
|
213 |
+
$(window).trigger('step6', response);
|
214 |
+
}, wfConnectError);
|
215 |
+
};
|
216 |
+
|
217 |
+
$(window).on('step5', WFCentralInstaller.step5);
|
218 |
+
|
219 |
+
// Step 6: Installation complete. Redirect user back to Wordfence Central with access token.
|
220 |
+
WFCentralInstaller.step6 = function(response) {
|
221 |
+
wfCentralStepAjax('step6', 'wordfence_wfcentral_step6', {}, function(response) {
|
222 |
+
document.location.href = response['redirect-url'];
|
223 |
+
}, wfConnectError);
|
224 |
+
};
|
225 |
+
|
226 |
+
$(window).on('step6', WFCentralInstaller.step6);
|
227 |
+
|
228 |
+
var self = this;
|
229 |
+
|
230 |
+
WFCentralInstaller.disconnect = function() {
|
231 |
+
var prompt = $('#wfTmpl_wfCentralDisconnectPrompt').tmpl();
|
232 |
+
var promptHTML = $("<div />").append(prompt).html();
|
233 |
+
WFAD.colorboxHTML('400px', promptHTML, {
|
234 |
+
overlayClose: false, closeButton: false, className: 'wf-modal', onComplete: function() {
|
235 |
+
$('#wf-central-prompt-cancel').on('click', function(e) {
|
236 |
+
e.preventDefault();
|
237 |
+
e.stopPropagation();
|
238 |
+
|
239 |
+
WFAD.colorboxClose();
|
240 |
+
});
|
241 |
+
|
242 |
+
$('#wf-central-prompt-disconnect').on('click', function(e) {
|
243 |
+
e.preventDefault();
|
244 |
+
e.stopPropagation();
|
245 |
+
WFAD.ajax('wordfence_wfcentral_disconnect', {}, function(response) {
|
246 |
+
window.location.reload(true);
|
247 |
+
});
|
248 |
+
});
|
249 |
+
}
|
250 |
+
});
|
251 |
+
};
|
252 |
+
|
253 |
+
|
254 |
+
$(function() {
|
255 |
+
// if (!authGrant) {
|
256 |
+
// wfConnectError('Auth grant not found.');
|
257 |
+
// return;
|
258 |
+
// }
|
259 |
+
|
260 |
+
if (!connected && authGrant) {
|
261 |
+
for (var i = 0; i < currentStep; i++) {
|
262 |
+
var el = $('#wf-central-progress-step' + i);
|
263 |
+
el.removeClass('pending')
|
264 |
+
.addClass('complete-success');
|
265 |
+
}
|
266 |
+
|
267 |
+
WFCentralInstaller['step' + currentStep]();
|
268 |
+
}
|
269 |
+
|
270 |
+
$('.wf-central-disconnect').on('click', function() {
|
271 |
+
WFCentralInstaller.disconnect();
|
272 |
+
return false;
|
273 |
+
});
|
274 |
+
});
|
275 |
+
|
276 |
+
})(jQuery);
|
277 |
+
</script>
|
278 |
+
<script type="text/x-jquery-template" id="wfTmpl_wfCentralDisconnectPrompt">
|
279 |
+
<?php
|
280 |
+
echo wfView::create('common/modal-prompt', array(
|
281 |
+
'title' => __('Confirm Disconnect', 'wordfence'),
|
282 |
+
'message' => __('Are you sure you want to disconnect your site from Wordfence Central?', 'wordfence'),
|
283 |
+
'primaryButton' => array('id' => 'wf-central-prompt-cancel', 'label' => __('Cancel', 'wordfence'), 'link' => '#'),
|
284 |
+
'secondaryButtons' => array(array('id' => 'wf-central-prompt-disconnect', 'label' => __('Disconnect', 'wordfence'), 'link' => '#')),
|
285 |
+
))->render();
|
286 |
+
?>
|
287 |
+
</script>
|
lib/rest-api/wfRESTAuthenticationController.php
ADDED
@@ -0,0 +1,179 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class wfRESTAuthenticationController {
|
4 |
+
|
5 |
+
const NONCE_AGE = 600;
|
6 |
+
|
7 |
+
public static function generateNonce($tickOffset = 0) {
|
8 |
+
add_filter('nonce_life', 'wfRESTAuthenticationController::nonceAge');
|
9 |
+
|
10 |
+
$i = wp_nonce_tick();
|
11 |
+
$salt = wp_salt('nonce');
|
12 |
+
$nonce = hash_hmac('sha256', ($i + $tickOffset) . '|wordfence-rest-api-auth', $salt);
|
13 |
+
|
14 |
+
remove_filter('nonce_life', 'wfRESTAuthenticationController::nonceAge');
|
15 |
+
|
16 |
+
return $nonce;
|
17 |
+
}
|
18 |
+
|
19 |
+
public static function generateToken() {
|
20 |
+
return new wfJWT(wfConfig::get('wordfenceCentralSiteID'));
|
21 |
+
}
|
22 |
+
|
23 |
+
public static function nonceAge() {
|
24 |
+
return self::NONCE_AGE;
|
25 |
+
}
|
26 |
+
|
27 |
+
public function registerRoutes() {
|
28 |
+
register_rest_route('wordfence/v1', '/authenticate', array(
|
29 |
+
'methods' => WP_REST_Server::READABLE,
|
30 |
+
'callback' => array($this, 'nonce'),
|
31 |
+
));
|
32 |
+
register_rest_route('wordfence/v1', '/authenticate', array(
|
33 |
+
'methods' => WP_REST_Server::CREATABLE,
|
34 |
+
'callback' => array($this, 'authenticate'),
|
35 |
+
));
|
36 |
+
register_rest_route('wordfence/v1', '/authenticate-premium', array(
|
37 |
+
'methods' => WP_REST_Server::CREATABLE,
|
38 |
+
'callback' => array($this, 'authenticatePremium'),
|
39 |
+
));
|
40 |
+
}
|
41 |
+
|
42 |
+
/**
|
43 |
+
* @param WP_REST_Request $request
|
44 |
+
* @return mixed|WP_REST_Response
|
45 |
+
*/
|
46 |
+
public function nonce($request) {
|
47 |
+
$response = rest_ensure_response(array(
|
48 |
+
'nonce' => self::generateNonce(),
|
49 |
+
));
|
50 |
+
return $response;
|
51 |
+
}
|
52 |
+
|
53 |
+
/**
|
54 |
+
* @param WP_REST_Request $request
|
55 |
+
* @return mixed|WP_REST_Response
|
56 |
+
*/
|
57 |
+
public function authenticate($request) {
|
58 |
+
require_once WORDFENCE_PATH . '/vendor/paragonie/sodium_compat/autoload.php';
|
59 |
+
|
60 |
+
$siteID = wfConfig::get('wordfenceCentralSiteID');
|
61 |
+
if (!$siteID) {
|
62 |
+
return new WP_Error('rest_forbidden_context',
|
63 |
+
__('Site is not connected to Wordfence Central.', 'wordfence'),
|
64 |
+
array('status' => rest_authorization_required_code()));
|
65 |
+
}
|
66 |
+
|
67 |
+
// verify signature.
|
68 |
+
$data = $request->get_param('data');
|
69 |
+
$dataChunks = explode('|', $data, 2);
|
70 |
+
if (count($dataChunks) !== 2) {
|
71 |
+
return new WP_Error('rest_forbidden_context',
|
72 |
+
__('Data is invalid.', 'wordfence'),
|
73 |
+
array('status' => rest_authorization_required_code()));
|
74 |
+
}
|
75 |
+
if (!preg_match('/[0-9a-f]{64}/i', $dataChunks[0])) {
|
76 |
+
return new WP_Error('rest_forbidden_context',
|
77 |
+
__('Nonce format is invalid.', 'wordfence'),
|
78 |
+
array('status' => rest_authorization_required_code()));
|
79 |
+
}
|
80 |
+
if (!preg_match('/[0-9a-f\-]{36}/i', $dataChunks[1])) {
|
81 |
+
return new WP_Error('rest_forbidden_context',
|
82 |
+
__('Site ID is invalid.', 'wordfence'),
|
83 |
+
array('status' => rest_authorization_required_code()));
|
84 |
+
}
|
85 |
+
if (!hash_equals($siteID, $dataChunks[1])) {
|
86 |
+
return new WP_Error('rest_forbidden_context',
|
87 |
+
__('Site ID is invalid.', 'wordfence'),
|
88 |
+
array('status' => rest_authorization_required_code()));
|
89 |
+
}
|
90 |
+
|
91 |
+
$signature = $request->get_param('signature');
|
92 |
+
$nonce1 = self::generateNonce();
|
93 |
+
$nonce2 = self::generateNonce(-1);
|
94 |
+
$verfiedNonce = hash_equals($nonce1, $dataChunks[0]) || hash_equals($nonce2, $dataChunks[0]);
|
95 |
+
|
96 |
+
if (!$verfiedNonce) {
|
97 |
+
return new WP_Error('rest_forbidden_context',
|
98 |
+
__('Nonce is invalid.', 'wordfence'),
|
99 |
+
array('status' => rest_authorization_required_code()));
|
100 |
+
}
|
101 |
+
$signature = pack('H*', $signature);
|
102 |
+
if (!ParagonIE_Sodium_Compat::crypto_sign_verify_detached($signature, $data, wfConfig::get('wordfenceCentralPK'))) {
|
103 |
+
return new WP_Error('rest_forbidden_context',
|
104 |
+
__('Signature is invalid.', 'wordfence'),
|
105 |
+
array('status' => rest_authorization_required_code()));
|
106 |
+
}
|
107 |
+
|
108 |
+
$response = rest_ensure_response(array(
|
109 |
+
'token' => (string) self::generateToken(),
|
110 |
+
));
|
111 |
+
return $response;
|
112 |
+
}
|
113 |
+
|
114 |
+
/**
|
115 |
+
* @param WP_REST_Request $request
|
116 |
+
* @return mixed|WP_REST_Response
|
117 |
+
*/
|
118 |
+
public function authenticatePremium($request) {
|
119 |
+
require_once WORDFENCE_PATH . '/vendor/paragonie/sodium_compat/autoload.php';
|
120 |
+
|
121 |
+
// verify signature.
|
122 |
+
$data = $request->get_param('data');
|
123 |
+
$dataChunks = explode('|', $data, 2);
|
124 |
+
if (count($dataChunks) !== 2) {
|
125 |
+
return new WP_Error('rest_forbidden_context',
|
126 |
+
__('Data is invalid.', 'wordfence'),
|
127 |
+
array('status' => rest_authorization_required_code()));
|
128 |
+
}
|
129 |
+
if (!preg_match('/[0-9a-f]{64}/i', $dataChunks[0])) {
|
130 |
+
return new WP_Error('rest_forbidden_context',
|
131 |
+
__('Nonce format is invalid.', 'wordfence'),
|
132 |
+
array('status' => rest_authorization_required_code()));
|
133 |
+
}
|
134 |
+
if (!is_email($dataChunks[1])) {
|
135 |
+
return new WP_Error('rest_forbidden_context',
|
136 |
+
__('Email address is invalid.', 'wordfence'),
|
137 |
+
array('status' => rest_authorization_required_code()));
|
138 |
+
}
|
139 |
+
|
140 |
+
$adminEmail = $dataChunks[1];
|
141 |
+
|
142 |
+
$signature = $request->get_param('signature');
|
143 |
+
$nonce1 = self::generateNonce();
|
144 |
+
$nonce2 = self::generateNonce(-1);
|
145 |
+
$verfiedNonce = hash_equals($nonce1, $dataChunks[0]) || hash_equals($nonce2, $dataChunks[0]);
|
146 |
+
|
147 |
+
if (!$verfiedNonce) {
|
148 |
+
return new WP_Error('rest_forbidden_context',
|
149 |
+
__('Nonce is invalid.', 'wordfence'),
|
150 |
+
array('status' => rest_authorization_required_code()));
|
151 |
+
}
|
152 |
+
$signature = pack('H*', $signature);
|
153 |
+
if (!ParagonIE_Sodium_Compat::crypto_sign_verify_detached($signature, $data, WORDFENCE_CENTRAL_PUBLIC_KEY)) {
|
154 |
+
return new WP_Error('rest_forbidden_context',
|
155 |
+
__('Signature is invalid.', 'wordfence'),
|
156 |
+
array('status' => rest_authorization_required_code()));
|
157 |
+
}
|
158 |
+
|
159 |
+
$user_query = new WP_User_Query(array(
|
160 |
+
'role' => 'administrator',
|
161 |
+
'search' => $adminEmail,
|
162 |
+
'search_columns' => array('user_email')
|
163 |
+
));
|
164 |
+
$users = $user_query->get_results();
|
165 |
+
if (is_array($users) && count($users) === 1) {
|
166 |
+
$jwt = new wfJWT('wordfence-central-premium');
|
167 |
+
$jwt->addClaims(array('email' => $adminEmail));
|
168 |
+
$response = rest_ensure_response(array(
|
169 |
+
'token' => (string) $jwt,
|
170 |
+
));
|
171 |
+
return $response;
|
172 |
+
}
|
173 |
+
|
174 |
+
return new WP_Error('rest_forbidden_context',
|
175 |
+
__('Admin user with this email address not found.', 'wordfence'),
|
176 |
+
array('status' => rest_authorization_required_code()));
|
177 |
+
}
|
178 |
+
|
179 |
+
}
|
lib/rest-api/wfRESTBaseController.php
ADDED
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
abstract class wfRESTBaseController {
|
4 |
+
|
5 |
+
protected $tokenData;
|
6 |
+
|
7 |
+
/**
|
8 |
+
* @param WP_REST_Request $request
|
9 |
+
* @return WP_Error|bool
|
10 |
+
*/
|
11 |
+
public function verifyToken($request) {
|
12 |
+
$validToken = $this->isTokenValid($request);
|
13 |
+
|
14 |
+
if ($validToken &&
|
15 |
+
!is_wp_error($validToken) &&
|
16 |
+
$this->tokenData['body']['sub'] === wfConfig::get('wordfenceCentralSiteID')
|
17 |
+
) {
|
18 |
+
return true;
|
19 |
+
}
|
20 |
+
|
21 |
+
if (is_wp_error($validToken)) {
|
22 |
+
return $validToken;
|
23 |
+
}
|
24 |
+
|
25 |
+
return new WP_Error('rest_forbidden_context',
|
26 |
+
__('Token is invalid.', 'wordfence'),
|
27 |
+
array('status' => rest_authorization_required_code()));
|
28 |
+
}
|
29 |
+
|
30 |
+
/**
|
31 |
+
* @param WP_REST_Request $request
|
32 |
+
* @return WP_Error|bool
|
33 |
+
*/
|
34 |
+
public function verifyTokenPremium($request) {
|
35 |
+
$validToken = $this->isTokenValid($request);
|
36 |
+
|
37 |
+
if ($validToken &&
|
38 |
+
!is_wp_error($validToken) &&
|
39 |
+
$this->tokenData['body']['sub'] === 'wordfence-central-premium'
|
40 |
+
) {
|
41 |
+
return true;
|
42 |
+
}
|
43 |
+
|
44 |
+
if (is_wp_error($validToken)) {
|
45 |
+
return $validToken;
|
46 |
+
}
|
47 |
+
|
48 |
+
return new WP_Error('rest_forbidden_context',
|
49 |
+
__('Token is invalid.', 'wordfence'),
|
50 |
+
array('status' => rest_authorization_required_code()));
|
51 |
+
}
|
52 |
+
|
53 |
+
/**
|
54 |
+
* @param WP_REST_Request $request
|
55 |
+
* @return bool|WP_Error
|
56 |
+
*/
|
57 |
+
public function isTokenValid($request) {
|
58 |
+
$authHeader = $request->get_header('Authorization');
|
59 |
+
if (!$authHeader) {
|
60 |
+
$authHeader = $request->get_header('X-Authorization');
|
61 |
+
}
|
62 |
+
if (stripos($authHeader, 'bearer ') !== 0) {
|
63 |
+
return new WP_Error('rest_forbidden_context',
|
64 |
+
__('Authorization header format is invalid.', 'wordfence'),
|
65 |
+
array('status' => rest_authorization_required_code()));
|
66 |
+
}
|
67 |
+
|
68 |
+
$token = trim(substr($authHeader, 7));
|
69 |
+
$jwt = new wfJWT();
|
70 |
+
|
71 |
+
try {
|
72 |
+
$this->tokenData = $jwt->decode($token);
|
73 |
+
|
74 |
+
} catch (wfJWTException $e) {
|
75 |
+
return new WP_Error('rest_forbidden_context',
|
76 |
+
$e->getMessage(),
|
77 |
+
array('status' => rest_authorization_required_code()));
|
78 |
+
|
79 |
+
} catch (Exception $e) {
|
80 |
+
return new WP_Error('rest_forbidden_context',
|
81 |
+
__('Token is invalid.', 'wordfence'),
|
82 |
+
array('status' => rest_authorization_required_code()));
|
83 |
+
}
|
84 |
+
|
85 |
+
return true;
|
86 |
+
}
|
87 |
+
}
|
lib/rest-api/wfRESTConfigController.php
ADDED
@@ -0,0 +1,244 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
require_once 'wfRESTBaseController.php';
|
4 |
+
|
5 |
+
class wfRESTConfigController extends wfRESTBaseController {
|
6 |
+
|
7 |
+
public static function disconnectConfig($adminEmail = null) {
|
8 |
+
global $wpdb;
|
9 |
+
delete_transient('wordfenceCentralJWT' . wfConfig::get('wordfenceCentralSiteID'));
|
10 |
+
|
11 |
+
if (is_null($adminEmail)) {
|
12 |
+
$adminEmail = wfConfig::get('wordfenceCentralConnectEmail');
|
13 |
+
}
|
14 |
+
|
15 |
+
$result = $wpdb->query('DELETE FROM ' . wfDB::networkTable('wfConfig') . " WHERE name LIKE 'wordfenceCentral%'");
|
16 |
+
|
17 |
+
wfConfig::set('wordfenceCentralDisconnected', true);
|
18 |
+
wfConfig::set('wordfenceCentralDisconnectTime', time());
|
19 |
+
wfConfig::set('wordfenceCentralDisconnectEmail', $adminEmail);
|
20 |
+
|
21 |
+
return !!$result;
|
22 |
+
}
|
23 |
+
|
24 |
+
public function registerRoutes() {
|
25 |
+
register_rest_route('wordfence/v1', '/config', array(
|
26 |
+
'methods' => WP_REST_Server::READABLE,
|
27 |
+
'callback' => array($this, 'getConfig'),
|
28 |
+
'permission_callback' => array($this, 'verifyToken'),
|
29 |
+
'fields' => array(
|
30 |
+
'description' => __('Specific config options to return.', 'wordfence'),
|
31 |
+
'type' => 'array',
|
32 |
+
'required' => false,
|
33 |
+
),
|
34 |
+
));
|
35 |
+
register_rest_route('wordfence/v1', '/config', array(
|
36 |
+
'methods' => WP_REST_Server::EDITABLE,
|
37 |
+
'callback' => array($this, 'setConfig'),
|
38 |
+
'permission_callback' => array($this, 'verifyToken'),
|
39 |
+
'fields' => array(
|
40 |
+
'description' => __('Specific config options to set.', 'wordfence'),
|
41 |
+
'type' => 'array',
|
42 |
+
'required' => true,
|
43 |
+
),
|
44 |
+
));
|
45 |
+
register_rest_route('wordfence/v1', '/disconnect', array(
|
46 |
+
'methods' => WP_REST_Server::EDITABLE,
|
47 |
+
'callback' => array($this, 'disconnect'),
|
48 |
+
'permission_callback' => array($this, 'verifyToken'),
|
49 |
+
));
|
50 |
+
register_rest_route('wordfence/v1', '/premium-connect', array(
|
51 |
+
'methods' => WP_REST_Server::EDITABLE,
|
52 |
+
'callback' => array($this, 'premiumConnect'),
|
53 |
+
'permission_callback' => array($this, 'verifyTokenPremium'),
|
54 |
+
));
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* @param WP_REST_Request $request
|
59 |
+
* @return mixed|WP_REST_Response
|
60 |
+
*/
|
61 |
+
public function getConfig($request) {
|
62 |
+
$fields = (array) $request['fields'];
|
63 |
+
|
64 |
+
$config = array();
|
65 |
+
|
66 |
+
$firewall = new wfFirewall();
|
67 |
+
$wafFields = array(
|
68 |
+
'autoPrepend' => $firewall->protectionMode() === wfFirewall::PROTECTION_MODE_EXTENDED,
|
69 |
+
'avoid_php_input' => wfWAF::getInstance()->getStorageEngine()->getConfig('avoid_php_input', false) ? 1 : 0,
|
70 |
+
'disabledRules' => array_keys((array) wfWAF::getInstance()->getStorageEngine()->getConfig('disabledRules')),
|
71 |
+
'ruleCount' => count((array) wfWAF::getInstance()->getRules()),
|
72 |
+
'disableWAFBlacklistBlocking' => wfWAF::getInstance()->getStorageEngine()->getConfig('disableWAFBlacklistBlocking'),
|
73 |
+
'enabled' => $firewall->wafStatus() !== wfFirewall::FIREWALL_MODE_DISABLED,
|
74 |
+
'firewallMode' => $firewall->firewallMode(),
|
75 |
+
'learningModeGracePeriod' => wfWAF::getInstance()->getStorageEngine()->getConfig('learningModeGracePeriod'),
|
76 |
+
'learningModeGracePeriodEnabled' => wfWAF::getInstance()->getStorageEngine()->getConfig('learningModeGracePeriodEnabled'),
|
77 |
+
'subdirectoryInstall' => $firewall->isSubDirectoryInstallation(),
|
78 |
+
'wafStatus' => $firewall->wafStatus(),
|
79 |
+
);
|
80 |
+
|
81 |
+
if (!$fields) {
|
82 |
+
foreach (wfConfig::$defaultConfig as $group => $groupOptions) {
|
83 |
+
foreach ($groupOptions as $field => $values) {
|
84 |
+
$fields[] = $field;
|
85 |
+
}
|
86 |
+
}
|
87 |
+
foreach ($wafFields as $wafField => $value) {
|
88 |
+
$fields[] = 'waf.' . $wafField;
|
89 |
+
}
|
90 |
+
}
|
91 |
+
|
92 |
+
foreach ($fields as $field) {
|
93 |
+
if (strpos($field, 'waf.') === 0) {
|
94 |
+
$wafField = substr($field, 4);
|
95 |
+
if (array_key_exists($wafField, $wafFields)) {
|
96 |
+
$config['waf'][$wafField] = $wafFields[$wafField];
|
97 |
+
}
|
98 |
+
continue;
|
99 |
+
}
|
100 |
+
|
101 |
+
if (array_key_exists($field, wfConfig::$defaultConfig['checkboxes'])) {
|
102 |
+
$config[$field] = (bool) wfConfig::get($field);
|
103 |
+
|
104 |
+
} else if (array_key_exists($field, wfConfig::$defaultConfig['otherParams']) ||
|
105 |
+
array_key_exists($field, wfConfig::$defaultConfig['defaultsOnly'])) {
|
106 |
+
|
107 |
+
$configConfig = !empty(wfConfig::$defaultConfig['otherParams'][$field]) ?
|
108 |
+
wfConfig::$defaultConfig['otherParams'][$field] : wfConfig::$defaultConfig['defaultsOnly'][$field];
|
109 |
+
|
110 |
+
if (!empty($configConfig['validation']['type'])) {
|
111 |
+
switch ($configConfig['validation']['type']) {
|
112 |
+
case wfConfig::TYPE_INT:
|
113 |
+
$config[$field] = wfConfig::getInt($field);
|
114 |
+
break;
|
115 |
+
|
116 |
+
case wfConfig::TYPE_DOUBLE:
|
117 |
+
case wfConfig::TYPE_FLOAT:
|
118 |
+
$config[$field] = floatval(wfConfig::get($field));
|
119 |
+
break;
|
120 |
+
|
121 |
+
case wfConfig::TYPE_BOOL:
|
122 |
+
$config[$field] = (bool) wfConfig::get($field);
|
123 |
+
break;
|
124 |
+
|
125 |
+
case wfConfig::TYPE_ARRAY:
|
126 |
+
$config[$field] = wfConfig::get_ser($field);
|
127 |
+
break;
|
128 |
+
|
129 |
+
case wfConfig::TYPE_STRING:
|
130 |
+
default:
|
131 |
+
$config[$field] = wfConfig::get($field);
|
132 |
+
break;
|
133 |
+
}
|
134 |
+
} else {
|
135 |
+
$config[$field] = wfConfig::get($field);
|
136 |
+
}
|
137 |
+
|
138 |
+
} else if (in_array($field, wfConfig::$serializedOptions)) {
|
139 |
+
$config[$field] = wfConfig::get_ser($field);
|
140 |
+
}
|
141 |
+
}
|
142 |
+
|
143 |
+
$api = new wfAPI(wfConfig::get('apiKey'), wfUtils::getWPVersion());
|
144 |
+
parse_str($api->makeAPIQueryString(), $qs);
|
145 |
+
$systemInfo = json_decode(wfUtils::base64url_decode($qs['s']), true);
|
146 |
+
$systemInfo['output_buffering'] = ini_get('output_buffering');
|
147 |
+
$systemInfo['ip'] = wfUtils::getIPAndServerVariable();
|
148 |
+
$systemInfo['detected_ips'] = wfUtils::getAllServerVariableIPs();
|
149 |
+
|
150 |
+
$response = rest_ensure_response(array(
|
151 |
+
'config' => $config,
|
152 |
+
'info' => $systemInfo,
|
153 |
+
));
|
154 |
+
return $response;
|
155 |
+
}
|
156 |
+
|
157 |
+
/**
|
158 |
+
* @param WP_REST_Request $request
|
159 |
+
* @return mixed|WP_REST_Response
|
160 |
+
*/
|
161 |
+
public function setConfig($request) {
|
162 |
+
$fields = $request['fields'];
|
163 |
+
if (is_array($fields) && $fields) {
|
164 |
+
$errors = wfConfig::validate($fields);
|
165 |
+
if ($errors !== true) {
|
166 |
+
if (count($errors) == 1) {
|
167 |
+
return new WP_Error('rest_set_config_error',
|
168 |
+
sprintf(__('An error occurred while saving the configuration: %s', 'wordfence'), $errors[0]['error']),
|
169 |
+
array('status' => 422));
|
170 |
+
|
171 |
+
} else if (count($errors) > 1) {
|
172 |
+
$compoundMessage = array();
|
173 |
+
foreach ($errors as $e) {
|
174 |
+
$compoundMessage[] = $e['error'];
|
175 |
+
}
|
176 |
+
return new WP_Error('rest_set_config_error',
|
177 |
+
sprintf(__('Errors occurred while saving the configuration: %s', 'wordfence'), implode(', ', $compoundMessage)),
|
178 |
+
array('status' => 422));
|
179 |
+
}
|
180 |
+
|
181 |
+
return new WP_Error('rest_set_config_error',
|
182 |
+
__('Errors occurred while saving the configuration.', 'wordfence'),
|
183 |
+
array('status' => 422));
|
184 |
+
}
|
185 |
+
|
186 |
+
try {
|
187 |
+
wfConfig::save($fields);
|
188 |
+
return rest_ensure_response(array(
|
189 |
+
'success' => true,
|
190 |
+
));
|
191 |
+
|
192 |
+
} catch (Exception $e) {
|
193 |
+
return new WP_Error('rest_save_config_error',
|
194 |
+
sprintf(__('A server error occurred while saving the configuration: %s', 'wordfence'), $e->getMessage()),
|
195 |
+
array('status' => 500));
|
196 |
+
}
|
197 |
+
}
|
198 |
+
return new WP_Error('rest_save_config_error',
|
199 |
+
__("Validation error: 'fields' parameter is empty or not an array.", 'wordfence'),
|
200 |
+
array('status' => 422));
|
201 |
+
|
202 |
+
}
|
203 |
+
|
204 |
+
/**
|
205 |
+
* @param WP_REST_Request $request
|
206 |
+
* @return mixed|WP_REST_Response
|
207 |
+
*/
|
208 |
+
public function disconnect($request) {
|
209 |
+
self::disconnectConfig();
|
210 |
+
return rest_ensure_response(array(
|
211 |
+
'success' => true,
|
212 |
+
));
|
213 |
+
}
|
214 |
+
|
215 |
+
/**
|
216 |
+
* @param WP_REST_Request $request
|
217 |
+
* @return mixed|WP_REST_Response
|
218 |
+
*/
|
219 |
+
public function premiumConnect($request) {
|
220 |
+
// Store values sent by Central.
|
221 |
+
$wordfenceCentralPK = $request['public-key'];
|
222 |
+
$wordfenceCentralSiteData = $request['site-data'];
|
223 |
+
$wordfenceCentralSiteID = $request['site-id'];
|
224 |
+
|
225 |
+
$keypair = ParagonIE_Sodium_Compat::crypto_sign_keypair();
|
226 |
+
$publicKey = ParagonIE_Sodium_Compat::crypto_sign_publickey($keypair);
|
227 |
+
$secretKey = ParagonIE_Sodium_Compat::crypto_sign_secretkey($keypair);
|
228 |
+
wfConfig::set('wordfenceCentralSecretKey', $secretKey);
|
229 |
+
|
230 |
+
wfConfig::set('wordfenceCentralConnected', 1);
|
231 |
+
wfConfig::set('wordfenceCentralCurrentStep', 6);
|
232 |
+
wfConfig::set('wordfenceCentralPK', pack("H*", $wordfenceCentralPK));
|
233 |
+
wfConfig::set('wordfenceCentralSiteData', json_encode($wordfenceCentralSiteData));
|
234 |
+
wfConfig::set('wordfenceCentralSiteID', $wordfenceCentralSiteID);
|
235 |
+
wfConfig::set('wordfenceCentralConnectTime', time());
|
236 |
+
wfConfig::set('wordfenceCentralConnectEmail', !empty($this->tokenData['adminEmail']) ? $this->tokenData['adminEmail'] : null);
|
237 |
+
|
238 |
+
// Return values created by Wordfence.
|
239 |
+
return rest_ensure_response(array(
|
240 |
+
'success' => true,
|
241 |
+
'public-key' => ParagonIE_Sodium_Compat::bin2hex($publicKey),
|
242 |
+
));
|
243 |
+
}
|
244 |
+
}
|
lib/rest-api/wfRESTScanController.php
ADDED
@@ -0,0 +1,163 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
require_once 'wfRESTBaseController.php';
|
4 |
+
|
5 |
+
class wfRESTScanController extends wfRESTBaseController {
|
6 |
+
|
7 |
+
/**
|
8 |
+
* @todo Setup routes to modify scan results.
|
9 |
+
*/
|
10 |
+
public function registerRoutes() {
|
11 |
+
register_rest_route('wordfence/v1', '/scan/issues', array(
|
12 |
+
'methods' => WP_REST_Server::READABLE,
|
13 |
+
'callback' => array($this, 'getIssuesList'),
|
14 |
+
'permission_callback' => array($this, 'verifyToken'),
|
15 |
+
'group' => array(
|
16 |
+
'description' => __('Scan result group or all results.', 'wordfence'),
|
17 |
+
'type' => 'string',
|
18 |
+
'required' => false,
|
19 |
+
),
|
20 |
+
'offset' => array(
|
21 |
+
'description' => __('Offset of scan results to return.', 'wordfence'),
|
22 |
+
'type' => 'int',
|
23 |
+
'required' => false,
|
24 |
+
),
|
25 |
+
'limit' => array(
|
26 |
+
'description' => __('Number of scan results to return.', 'wordfence'),
|
27 |
+
'type' => 'int',
|
28 |
+
'required' => false,
|
29 |
+
),
|
30 |
+
));
|
31 |
+
register_rest_route('wordfence/v1', '/scan', array(
|
32 |
+
'methods' => WP_REST_Server::CREATABLE,
|
33 |
+
'callback' => array($this, 'startScan'),
|
34 |
+
'permission_callback' => array($this, 'verifyToken'),
|
35 |
+
));
|
36 |
+
register_rest_route('wordfence/v1', '/scan', array(
|
37 |
+
'methods' => WP_REST_Server::DELETABLE,
|
38 |
+
'callback' => array($this, 'stopScan'),
|
39 |
+
'permission_callback' => array($this, 'verifyToken'),
|
40 |
+
));
|
41 |
+
register_rest_route('wordfence/v1', '/scan/issue', array(
|
42 |
+
'methods' => WP_REST_Server::EDITABLE,
|
43 |
+
'callback' => array($this, 'updateIssue'),
|
44 |
+
'permission_callback' => array($this, 'verifyToken'),
|
45 |
+
));
|
46 |
+
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* @param WP_REST_Request $request
|
50 |
+
* @return mixed|WP_REST_Response
|
51 |
+
*/
|
52 |
+
public function getIssuesList($request) {
|
53 |
+
$group = $request['group'] ? $request['group'] : 'all';
|
54 |
+
$offset = absint($request['offset']);
|
55 |
+
$limit = absint($request['limit']);
|
56 |
+
if ($limit === 0) {
|
57 |
+
$limit = 100;
|
58 |
+
}
|
59 |
+
switch ($group) {
|
60 |
+
case 'pending':
|
61 |
+
$count = wfIssues::shared()->getPendingIssueCount();
|
62 |
+
$issues = wfIssues::shared()->getPendingIssues($offset, $limit);
|
63 |
+
break;
|
64 |
+
|
65 |
+
default: // Return all issues.
|
66 |
+
$count = wfIssues::shared()->getIssueCount();
|
67 |
+
$issues = wfIssues::shared()->getIssues($offset, $limit);
|
68 |
+
break;
|
69 |
+
}
|
70 |
+
|
71 |
+
$response = rest_ensure_response(array(
|
72 |
+
'count' => $count,
|
73 |
+
'last-scan-time' => wfConfig::get('scanTime'),
|
74 |
+
'issues' => $issues,
|
75 |
+
));
|
76 |
+
return $response;
|
77 |
+
}
|
78 |
+
|
79 |
+
/**
|
80 |
+
* @param WP_REST_Request $request
|
81 |
+
* @return mixed|WP_REST_Response
|
82 |
+
*/
|
83 |
+
public function startScan($request) {
|
84 |
+
wordfence::status(1, 'info', sprintf(__('Wordfence scan starting at %s from Wordfence Central', 'wordfence'),
|
85 |
+
date('l jS \of F Y h:i:s A', current_time('timestamp'))));
|
86 |
+
|
87 |
+
try {
|
88 |
+
wfScanEngine::startScan();
|
89 |
+
|
90 |
+
} catch (wfScanEngineTestCallbackFailedException $e) {
|
91 |
+
wfConfig::set('lastScanCompleted', $e->getMessage());
|
92 |
+
wfConfig::set('lastScanFailureType', wfIssues::SCAN_FAILED_CALLBACK_TEST_FAILED);
|
93 |
+
wfUtils::clearScanLock();
|
94 |
+
$response = rest_ensure_response(array(
|
95 |
+
'success' => false,
|
96 |
+
'error-code' => $e->getCode(),
|
97 |
+
'error' => $e->getMessage(),
|
98 |
+
));
|
99 |
+
return $response;
|
100 |
+
|
101 |
+
} catch (Exception $e) {
|
102 |
+
if ($e->getCode() != wfScanEngine::SCAN_MANUALLY_KILLED) {
|
103 |
+
wfConfig::set('lastScanCompleted', $e->getMessage());
|
104 |
+
wfConfig::set('lastScanFailureType', wfIssues::SCAN_FAILED_GENERAL);
|
105 |
+
|
106 |
+
$response = rest_ensure_response(array(
|
107 |
+
'success' => false,
|
108 |
+
'error-code' => $e->getCode(),
|
109 |
+
'error' => $e->getMessage(),
|
110 |
+
));
|
111 |
+
return $response;
|
112 |
+
}
|
113 |
+
}
|
114 |
+
|
115 |
+
$response = rest_ensure_response(array(
|
116 |
+
'success' => true,
|
117 |
+
));
|
118 |
+
return $response;
|
119 |
+
|
120 |
+
}
|
121 |
+
|
122 |
+
/**
|
123 |
+
* @param WP_REST_Request $request
|
124 |
+
* @return mixed|WP_REST_Response
|
125 |
+
*/
|
126 |
+
public function stopScan($request) {
|
127 |
+
wordfence::status(1, 'info', __('Scan stop request received from Wordfence Central.', 'wordfence'));
|
128 |
+
wordfence::status(10, 'info', __('SUM_KILLED:A request was received to stop the previous scan from Wordfence Central.', 'wordfence'));
|
129 |
+
wfUtils::clearScanLock(); //Clear the lock now because there may not be a scan running to pick up the kill request and clear the lock
|
130 |
+
wfScanEngine::requestKill();
|
131 |
+
wfConfig::remove('scanStartAttempt');
|
132 |
+
wfConfig::set('lastScanFailureType', false);
|
133 |
+
$response = rest_ensure_response(array(
|
134 |
+
'success' => true,
|
135 |
+
));
|
136 |
+
return $response;
|
137 |
+
}
|
138 |
+
|
139 |
+
/**
|
140 |
+
* @param WP_REST_Request $request
|
141 |
+
* @return mixed|WP_REST_Response
|
142 |
+
*/
|
143 |
+
public function updateIssue($request) {
|
144 |
+
$issue = $request['issue'];
|
145 |
+
$id = is_array($issue) && array_key_exists('id', $issue) ? $issue['id'] : null;
|
146 |
+
$status = is_array($issue) && array_key_exists('status', $issue) ? $issue['status'] : null;
|
147 |
+
|
148 |
+
if ($id) {
|
149 |
+
$wfdb = new wfDB();
|
150 |
+
$wfdb->queryWrite("update " . wfDB::networkTable('wfIssues') . " set status='%s' where id=%d", $status, $id);
|
151 |
+
$response = rest_ensure_response(array(
|
152 |
+
'success' => true,
|
153 |
+
));
|
154 |
+
return $response;
|
155 |
+
}
|
156 |
+
$response = rest_ensure_response(array(
|
157 |
+
'success' => false,
|
158 |
+
'error' => 'Issue not found.',
|
159 |
+
));
|
160 |
+
return $response;
|
161 |
+
|
162 |
+
}
|
163 |
+
}
|
lib/wfCentralAPI.php
ADDED
@@ -0,0 +1,469 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class wfCentralAPIRequest {
|
4 |
+
/**
|
5 |
+
* @var string
|
6 |
+
*/
|
7 |
+
private $endpoint;
|
8 |
+
/**
|
9 |
+
* @var string
|
10 |
+
*/
|
11 |
+
private $method;
|
12 |
+
/**
|
13 |
+
* @var null
|
14 |
+
*/
|
15 |
+
private $token;
|
16 |
+
/**
|
17 |
+
* @var array
|
18 |
+
*/
|
19 |
+
private $body;
|
20 |
+
/**
|
21 |
+
* @var array
|
22 |
+
*/
|
23 |
+
private $args;
|
24 |
+
|
25 |
+
|
26 |
+
/**
|
27 |
+
* @param string $endpoint
|
28 |
+
* @param string $method
|
29 |
+
* @param string|null $token
|
30 |
+
* @param array $body
|
31 |
+
* @param array $args
|
32 |
+
*/
|
33 |
+
public function __construct($endpoint, $method = 'GET', $token = null, $body = array(), $args = array()) {
|
34 |
+
$this->endpoint = $endpoint;
|
35 |
+
$this->method = $method;
|
36 |
+
$this->token = $token;
|
37 |
+
$this->body = $body;
|
38 |
+
$this->args = $args;
|
39 |
+
}
|
40 |
+
|
41 |
+
public function execute() {
|
42 |
+
$args = array(
|
43 |
+
'timeout' => 10,
|
44 |
+
);
|
45 |
+
$args = wp_parse_args($this->getArgs(), $args);
|
46 |
+
$args['method'] = $this->getMethod();
|
47 |
+
if (empty($args['headers'])) {
|
48 |
+
$args['headers'] = array();
|
49 |
+
}
|
50 |
+
$args['cookies']['XDEBUG_SESSION'] = 'XDEBUG_ECLIPSE';
|
51 |
+
|
52 |
+
$token = $this->getToken();
|
53 |
+
if ($token) {
|
54 |
+
$args['headers']['Authorization'] = 'Bearer ' . $token;
|
55 |
+
}
|
56 |
+
if ($this->getBody()) {
|
57 |
+
$args['headers']['Content-Type'] = 'application/json';
|
58 |
+
$args['body'] = json_encode($this->getBody());
|
59 |
+
}
|
60 |
+
|
61 |
+
$http = _wp_http_get_object();
|
62 |
+
$response = $http->request(WORDFENCE_CENTRAL_API_URL_SEC . $this->getEndpoint(), $args);
|
63 |
+
return new wfCentralAPIResponse($response);
|
64 |
+
}
|
65 |
+
|
66 |
+
/**
|
67 |
+
* @return string
|
68 |
+
*/
|
69 |
+
public function getEndpoint() {
|
70 |
+
return $this->endpoint;
|
71 |
+
}
|
72 |
+
|
73 |
+
/**
|
74 |
+
* @param string $endpoint
|
75 |
+
*/
|
76 |
+
public function setEndpoint($endpoint) {
|
77 |
+
$this->endpoint = $endpoint;
|
78 |
+
}
|
79 |
+
|
80 |
+
/**
|
81 |
+
* @return string
|
82 |
+
*/
|
83 |
+
public function getMethod() {
|
84 |
+
return $this->method;
|
85 |
+
}
|
86 |
+
|
87 |
+
/**
|
88 |
+
* @param string $method
|
89 |
+
*/
|
90 |
+
public function setMethod($method) {
|
91 |
+
$this->method = $method;
|
92 |
+
}
|
93 |
+
|
94 |
+
/**
|
95 |
+
* @return null
|
96 |
+
*/
|
97 |
+
public function getToken() {
|
98 |
+
return $this->token;
|
99 |
+
}
|
100 |
+
|
101 |
+
/**
|
102 |
+
* @param null $token
|
103 |
+
*/
|
104 |
+
public function setToken($token) {
|
105 |
+
$this->token = $token;
|
106 |
+
}
|
107 |
+
|
108 |
+
/**
|
109 |
+
* @return array
|
110 |
+
*/
|
111 |
+
public function getBody() {
|
112 |
+
return $this->body;
|
113 |
+
}
|
114 |
+
|
115 |
+
/**
|
116 |
+
* @param array $body
|
117 |
+
*/
|
118 |
+
public function setBody($body) {
|
119 |
+
$this->body = $body;
|
120 |
+
}
|
121 |
+
|
122 |
+
/**
|
123 |
+
* @return array
|
124 |
+
*/
|
125 |
+
public function getArgs() {
|
126 |
+
return $this->args;
|
127 |
+
}
|
128 |
+
|
129 |
+
/**
|
130 |
+
* @param array $args
|
131 |
+
*/
|
132 |
+
public function setArgs($args) {
|
133 |
+
$this->args = $args;
|
134 |
+
}
|
135 |
+
}
|
136 |
+
|
137 |
+
class wfCentralAPIResponse {
|
138 |
+
|
139 |
+
public static function parseErrorJSON($json) {
|
140 |
+
$data = json_decode($json, true);
|
141 |
+
if (is_array($data) && array_key_exists('message', $data)) {
|
142 |
+
return $data['message'];
|
143 |
+
}
|
144 |
+
return $json;
|
145 |
+
}
|
146 |
+
|
147 |
+
/**
|
148 |
+
* @var array|null
|
149 |
+
*/
|
150 |
+
private $response;
|
151 |
+
|
152 |
+
/**
|
153 |
+
* @param array $response
|
154 |
+
*/
|
155 |
+
public function __construct($response = null) {
|
156 |
+
$this->response = $response;
|
157 |
+
}
|
158 |
+
|
159 |
+
public function getStatusCode() {
|
160 |
+
return wp_remote_retrieve_response_code($this->getResponse());
|
161 |
+
}
|
162 |
+
|
163 |
+
public function getBody() {
|
164 |
+
return wp_remote_retrieve_body($this->getResponse());
|
165 |
+
}
|
166 |
+
|
167 |
+
public function getJSONBody() {
|
168 |
+
return json_decode($this->getBody(), true);
|
169 |
+
}
|
170 |
+
|
171 |
+
public function isError() {
|
172 |
+
if (is_wp_error($this->getResponse())) {
|
173 |
+
return true;
|
174 |
+
}
|
175 |
+
$statusCode = $this->getStatusCode();
|
176 |
+
return !($statusCode >= 200 && $statusCode < 300);
|
177 |
+
}
|
178 |
+
|
179 |
+
public function returnErrorArray() {
|
180 |
+
return array(
|
181 |
+
'err' => 1,
|
182 |
+
'errorMsg' => sprintf(__('HTTP %d received from Wordfence Central: %s', 'wordfence'),
|
183 |
+
$this->getStatusCode(), $this->parseErrorJSON($this->getBody())),
|
184 |
+
);
|
185 |
+
}
|
186 |
+
|
187 |
+
/**
|
188 |
+
* @return array|null
|
189 |
+
*/
|
190 |
+
public function getResponse() {
|
191 |
+
return $this->response;
|
192 |
+
}
|
193 |
+
|
194 |
+
/**
|
195 |
+
* @param array|null $response
|
196 |
+
*/
|
197 |
+
public function setResponse($response) {
|
198 |
+
$this->response = $response;
|
199 |
+
}
|
200 |
+
}
|
201 |
+
|
202 |
+
|
203 |
+
class wfCentralAuthenticatedAPIRequest extends wfCentralAPIRequest {
|
204 |
+
|
205 |
+
private $retries = 3;
|
206 |
+
|
207 |
+
/**
|
208 |
+
* @param string $endpoint
|
209 |
+
* @param string $method
|
210 |
+
* @param array $body
|
211 |
+
* @param array $args
|
212 |
+
*/
|
213 |
+
public function __construct($endpoint, $method = 'GET', $body = array(), $args = array()) {
|
214 |
+
parent::__construct($endpoint, $method, null, $body, $args);
|
215 |
+
}
|
216 |
+
|
217 |
+
/**
|
218 |
+
* @return mixed|null
|
219 |
+
* @throws wfCentralAPIException
|
220 |
+
*/
|
221 |
+
public function getToken() {
|
222 |
+
$token = parent::getToken();
|
223 |
+
if ($token) {
|
224 |
+
return $token;
|
225 |
+
}
|
226 |
+
|
227 |
+
$token = get_transient('wordfenceCentralJWT' . wfConfig::get('wordfenceCentralSiteID'));
|
228 |
+
if ($token) {
|
229 |
+
return $token;
|
230 |
+
}
|
231 |
+
|
232 |
+
for ($i = 0; $i < $this->retries; $i++) {
|
233 |
+
try {
|
234 |
+
$token = $this->fetchToken();
|
235 |
+
break;
|
236 |
+
} catch (wfCentralAPIException $e) {
|
237 |
+
continue;
|
238 |
+
}
|
239 |
+
}
|
240 |
+
if (empty($token)) {
|
241 |
+
if (isset($e)) {
|
242 |
+
throw $e;
|
243 |
+
} else {
|
244 |
+
throw new wfCentralAPIException(__('Unable to authenticate with Wordfence Central.', 'wordfence'));
|
245 |
+
}
|
246 |
+
}
|
247 |
+
$tokenContents = wfJWT::extractTokenContents($token);
|
248 |
+
|
249 |
+
if (!empty($tokenContents['body']['exp'])) {
|
250 |
+
set_transient('wordfenceCentralJWT' . wfConfig::get('wordfenceCentralSiteID'), $token, $tokenContents['body']['exp'] - time());
|
251 |
+
}
|
252 |
+
return $token;
|
253 |
+
}
|
254 |
+
|
255 |
+
public function fetchToken() {
|
256 |
+
require_once WORDFENCE_PATH . '/vendor/paragonie/sodium_compat/autoload.php';
|
257 |
+
|
258 |
+
$defaultArgs = array(
|
259 |
+
'timeout' => 6,
|
260 |
+
);
|
261 |
+
$siteID = wfConfig::get('wordfenceCentralSiteID');
|
262 |
+
if (!$siteID) {
|
263 |
+
throw new wfCentralAPIException(__('Wordfence Central site ID has not been created yet.', 'wordfence'));
|
264 |
+
}
|
265 |
+
$secretKey = wfConfig::get('wordfenceCentralSecretKey');
|
266 |
+
if (!$secretKey) {
|
267 |
+
throw new wfCentralAPIException(__('Wordfence Central secret key has not been created yet.', 'wordfence'));
|
268 |
+
}
|
269 |
+
|
270 |
+
// Pull down nonce.
|
271 |
+
$request = new wfCentralAPIRequest(sprintf('/site/%s/login', $siteID), 'GET', null, array(), $defaultArgs);
|
272 |
+
$nonceResponse = $request->execute();
|
273 |
+
if ($nonceResponse->isError()) {
|
274 |
+
$errorArray = $nonceResponse->returnErrorArray();
|
275 |
+
throw new wfCentralAPIException($errorArray['errorMsg']);
|
276 |
+
}
|
277 |
+
$body = $nonceResponse->getJSONBody();
|
278 |
+
if (!is_array($body) || !isset($body['nonce'])) {
|
279 |
+
throw new wfCentralAPIException(__('Invalid response received from Wordfence Central when fetching nonce.', 'wordfence'));
|
280 |
+
}
|
281 |
+
$nonce = $body['nonce'];
|
282 |
+
|
283 |
+
// Sign nonce to pull down JWT.
|
284 |
+
$data = $nonce . '|' . $siteID;
|
285 |
+
$signature = ParagonIE_Sodium_Compat::crypto_sign_detached($data, $secretKey);
|
286 |
+
$request = new wfCentralAPIRequest(sprintf('/site/%s/login', $siteID), 'POST', null, array(
|
287 |
+
'data' => $data,
|
288 |
+
'signature' => ParagonIE_Sodium_Compat::bin2hex($signature),
|
289 |
+
), $defaultArgs);
|
290 |
+
$authResponse = $request->execute();
|
291 |
+
if ($authResponse->isError()) {
|
292 |
+
$errorArray = $authResponse->returnErrorArray();
|
293 |
+
throw new wfCentralAPIException($errorArray['errorMsg']);
|
294 |
+
}
|
295 |
+
$body = $authResponse->getJSONBody();
|
296 |
+
if (!is_array($body)) {
|
297 |
+
throw new wfCentralAPIException(__('Invalid response received from Wordfence Central when fetching token.', 'wordfence'));
|
298 |
+
}
|
299 |
+
if (!isset($body['jwt'])) { // Possible authentication error.
|
300 |
+
throw new wfCentralAPIException(__('Unable to authenticate with Wordfence Central.', 'wordfence'));
|
301 |
+
}
|
302 |
+
return $body['jwt'];
|
303 |
+
}
|
304 |
+
}
|
305 |
+
|
306 |
+
class wfCentralAPIException extends Exception {
|
307 |
+
|
308 |
+
}
|
309 |
+
|
310 |
+
class wfCentral {
|
311 |
+
|
312 |
+
/**
|
313 |
+
* @return bool
|
314 |
+
*/
|
315 |
+
public static function isSupported() {
|
316 |
+
return function_exists('register_rest_route');
|
317 |
+
}
|
318 |
+
|
319 |
+
/**
|
320 |
+
* @return bool
|
321 |
+
*/
|
322 |
+
public static function isConnected() {
|
323 |
+
return self::isSupported() && ((bool) wfConfig::get('wordfenceCentralConnected', false));
|
324 |
+
}
|
325 |
+
|
326 |
+
/**
|
327 |
+
* @param array $issue
|
328 |
+
* @return bool|wfCentralAPIResponse
|
329 |
+
*/
|
330 |
+
public static function sendIssue($issue) {
|
331 |
+
return self::sendIssues(array($issue));
|
332 |
+
}
|
333 |
+
|
334 |
+
/**
|
335 |
+
* @param $issues
|
336 |
+
* @return bool|wfCentralAPIResponse
|
337 |
+
*/
|
338 |
+
public static function sendIssues($issues) {
|
339 |
+
$data = array();
|
340 |
+
foreach ($issues as $issue) {
|
341 |
+
$issueData = array(
|
342 |
+
'type' => 'issue',
|
343 |
+
'attributes' => $issue,
|
344 |
+
);
|
345 |
+
if (array_key_exists('id', $issueData)) {
|
346 |
+
$issueData['id'] = $issue['id'];
|
347 |
+
}
|
348 |
+
$data[] = $issueData;
|
349 |
+
}
|
350 |
+
|
351 |
+
$siteID = wfConfig::get('wordfenceCentralSiteID');
|
352 |
+
$request = new wfCentralAuthenticatedAPIRequest('/site/' . $siteID . '/issues', 'POST', array(
|
353 |
+
'data' => $data,
|
354 |
+
));
|
355 |
+
try {
|
356 |
+
$response = $request->execute();
|
357 |
+
return $response;
|
358 |
+
} catch (wfCentralAPIException $e) {
|
359 |
+
error_log($e);
|
360 |
+
}
|
361 |
+
return false;
|
362 |
+
}
|
363 |
+
|
364 |
+
/**
|
365 |
+
* @param int $issueID
|
366 |
+
* @return bool|wfCentralAPIResponse
|
367 |
+
*/
|
368 |
+
public static function deleteIssue($issueID) {
|
369 |
+
return self::deleteIssues(array($issueID));
|
370 |
+
}
|
371 |
+
|
372 |
+
/**
|
373 |
+
* @param $issues
|
374 |
+
* @return bool|wfCentralAPIResponse
|
375 |
+
*/
|
376 |
+
public static function deleteIssues($issues) {
|
377 |
+
$siteID = wfConfig::get('wordfenceCentralSiteID');
|
378 |
+
$request = new wfCentralAuthenticatedAPIRequest('/site/' . $siteID . '/issues', 'DELETE', array(
|
379 |
+
'data' => array(
|
380 |
+
'type' => 'issue-list',
|
381 |
+
'attributes' => array(
|
382 |
+
'ids' => $issues,
|
383 |
+
)
|
384 |
+
),
|
385 |
+
));
|
386 |
+
try {
|
387 |
+
$response = $request->execute();
|
388 |
+
return $response;
|
389 |
+
} catch (wfCentralAPIException $e) {
|
390 |
+
error_log($e);
|
391 |
+
}
|
392 |
+
return false;
|
393 |
+
}
|
394 |
+
|
395 |
+
/**
|
396 |
+
* @param array $types Array of issue types to delete
|
397 |
+
* @param string $status Issue status to delete
|
398 |
+
* @return bool|wfCentralAPIResponse
|
399 |
+
*/
|
400 |
+
public static function deleteIssueTypes($types, $status = 'new') {
|
401 |
+
$siteID = wfConfig::get('wordfenceCentralSiteID');
|
402 |
+
$request = new wfCentralAuthenticatedAPIRequest('/site/' . $siteID . '/issues', 'DELETE', array(
|
403 |
+
'data' => array(
|
404 |
+
'type' => 'issue-list',
|
405 |
+
'attributes' => array(
|
406 |
+
'types' => $types,
|
407 |
+
'status' => $status,
|
408 |
+
)
|
409 |
+
),
|
410 |
+
));
|
411 |
+
try {
|
412 |
+
$response = $request->execute();
|
413 |
+
return $response;
|
414 |
+
} catch (wfCentralAPIException $e) {
|
415 |
+
error_log($e);
|
416 |
+
}
|
417 |
+
return false;
|
418 |
+
}
|
419 |
+
|
420 |
+
public static function requestConfigurationSync() {
|
421 |
+
if (! wfCentral::isConnected()) {
|
422 |
+
return;
|
423 |
+
}
|
424 |
+
|
425 |
+
$endpoint = '/site/'.wfConfig::get('wordfenceCentralSiteID').'/config';
|
426 |
+
$args = array('timeout' => 0.01, 'blocking' => false);
|
427 |
+
$request = new wfCentralAuthenticatedAPIRequest($endpoint, 'POST', array(), $args);
|
428 |
+
|
429 |
+
try {
|
430 |
+
$request->execute();
|
431 |
+
} catch (Exception $e) {
|
432 |
+
// We can safely ignore an error here for now.
|
433 |
+
}
|
434 |
+
}
|
435 |
+
|
436 |
+
/**
|
437 |
+
* @param $scan
|
438 |
+
* @param $running
|
439 |
+
* @return bool|wfCentralAPIResponse
|
440 |
+
*/
|
441 |
+
public static function updateScanStatus($scan = null) {
|
442 |
+
if ($scan === null) {
|
443 |
+
$scan = wfConfig::get_ser('scanStageStatuses');
|
444 |
+
if (!is_array($scan)) {
|
445 |
+
$scan = array();
|
446 |
+
}
|
447 |
+
}
|
448 |
+
|
449 |
+
$siteID = wfConfig::get('wordfenceCentralSiteID');
|
450 |
+
$running = wfScanner::shared()->isRunning();
|
451 |
+
$request = new wfCentralAuthenticatedAPIRequest('/site/' . $siteID . '/scan', 'PATCH', array(
|
452 |
+
'data' => array(
|
453 |
+
'type' => 'scan',
|
454 |
+
'attributes' => array(
|
455 |
+
'running' => $running,
|
456 |
+
'scan' => $scan,
|
457 |
+
'scan-summary' => wfConfig::get('wf_summaryItems'),
|
458 |
+
),
|
459 |
+
),
|
460 |
+
));
|
461 |
+
try {
|
462 |
+
$response = $request->execute();
|
463 |
+
return $response;
|
464 |
+
} catch (wfCentralAPIException $e) {
|
465 |
+
error_log($e);
|
466 |
+
}
|
467 |
+
return false;
|
468 |
+
}
|
469 |
+
}
|
lib/wfConfig.php
CHANGED
@@ -33,9 +33,8 @@ class wfConfig {
|
|
33 |
public static $defaultConfig = array(
|
34 |
//All exportable boolean options
|
35 |
"checkboxes" => array(
|
36 |
-
"alertOn_critical" => array('value' => true, 'autoload' => self::AUTOLOAD),
|
37 |
"alertOn_update" => array('value' => false, 'autoload' => self::AUTOLOAD),
|
38 |
-
"
|
39 |
"alertOn_throttle" => array('value' => false, 'autoload' => self::AUTOLOAD),
|
40 |
"alertOn_block" => array('value' => true, 'autoload' => self::AUTOLOAD),
|
41 |
"alertOn_loginLockout" => array('value' => true, 'autoload' => self::AUTOLOAD),
|
@@ -184,6 +183,7 @@ class wfConfig {
|
|
184 |
'cbl_bypassViewURL' => array('value' => '', 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_STRING)),
|
185 |
'loginSec_enableSeparateTwoFactor' => array('value' => false, 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_BOOL)),
|
186 |
'blockCustomText' => array('value' => '', 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_STRING)),
|
|
|
187 |
),
|
188 |
//Set as default only, not included automatically in the settings import/export or options page saving
|
189 |
'defaultsOnly' => array(
|
@@ -223,6 +223,12 @@ class wfConfig {
|
|
223 |
),
|
224 |
);
|
225 |
public static $serializedOptions = array('lastAdminLogin', 'scanSched', 'emailedIssuesList', 'wf_summaryItems', 'adminUserList', 'twoFactorUsers', 'alertFreqTrack', 'wfStatusStartMsgs', 'vulnerabilities_plugin', 'vulnerabilities_theme', 'dashboardData', 'malwarePrefixes', 'coreHashes', 'noc1ScanSchedule', 'allScansScheduled', 'disclosureStates', 'scanStageStatuses', 'adminNoticeQueue');
|
|
|
|
|
|
|
|
|
|
|
|
|
226 |
public static function setDefaults() {
|
227 |
foreach (self::$defaultConfig['checkboxes'] as $key => $config) {
|
228 |
$val = $config['value'];
|
@@ -846,13 +852,10 @@ class wfConfig {
|
|
846 |
return $emails;
|
847 |
}
|
848 |
public static function getAlertLevel(){
|
849 |
-
if(self::get('
|
850 |
-
return
|
851 |
-
} else if(self::get('alertOn_critical')){
|
852 |
-
return 1;
|
853 |
-
} else {
|
854 |
-
return 0;
|
855 |
}
|
|
|
856 |
}
|
857 |
public static function liveTrafficEnabled(&$overriden = null){
|
858 |
$enabled = self::get('liveTrafficEnabled');
|
@@ -1627,7 +1630,11 @@ Options -ExecCGI
|
|
1627 |
else if (in_array($key, self::$serializedOptions)) {
|
1628 |
wfConfig::set_ser($key, $value);
|
1629 |
}
|
|
|
|
|
|
|
1630 |
else if (WFWAF_DEBUG) {
|
|
|
1631 |
error_log("*** DEBUG: Config option '{$key}' missing save handler.");
|
1632 |
}
|
1633 |
}
|
@@ -1708,7 +1715,10 @@ Options -ExecCGI
|
|
1708 |
wfScanner::shared()->scheduleScans();
|
1709 |
}
|
1710 |
}
|
1711 |
-
|
|
|
|
|
|
|
1712 |
wfConfig::set('keyType', $keyType);
|
1713 |
}
|
1714 |
catch (Exception $e){
|
@@ -1718,6 +1728,7 @@ Options -ExecCGI
|
|
1718 |
}
|
1719 |
|
1720 |
wfNotification::reconcileNotificationsWithOptions();
|
|
|
1721 |
}
|
1722 |
|
1723 |
public static function restoreDefaults($section) {
|
33 |
public static $defaultConfig = array(
|
34 |
//All exportable boolean options
|
35 |
"checkboxes" => array(
|
|
|
36 |
"alertOn_update" => array('value' => false, 'autoload' => self::AUTOLOAD),
|
37 |
+
"alertOn_scanIssues" => array('value' => true, 'autoload' => self::AUTOLOAD),
|
38 |
"alertOn_throttle" => array('value' => false, 'autoload' => self::AUTOLOAD),
|
39 |
"alertOn_block" => array('value' => true, 'autoload' => self::AUTOLOAD),
|
40 |
"alertOn_loginLockout" => array('value' => true, 'autoload' => self::AUTOLOAD),
|
183 |
'cbl_bypassViewURL' => array('value' => '', 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_STRING)),
|
184 |
'loginSec_enableSeparateTwoFactor' => array('value' => false, 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_BOOL)),
|
185 |
'blockCustomText' => array('value' => '', 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_STRING)),
|
186 |
+
'alertOn_severityLevel' => array('value' => wfIssues::SEVERITY_LOW, 'autoload' => self::AUTOLOAD, 'validation' => array('type' => self::TYPE_INT)),
|
187 |
),
|
188 |
//Set as default only, not included automatically in the settings import/export or options page saving
|
189 |
'defaultsOnly' => array(
|
223 |
),
|
224 |
);
|
225 |
public static $serializedOptions = array('lastAdminLogin', 'scanSched', 'emailedIssuesList', 'wf_summaryItems', 'adminUserList', 'twoFactorUsers', 'alertFreqTrack', 'wfStatusStartMsgs', 'vulnerabilities_plugin', 'vulnerabilities_theme', 'dashboardData', 'malwarePrefixes', 'coreHashes', 'noc1ScanSchedule', 'allScansScheduled', 'disclosureStates', 'scanStageStatuses', 'adminNoticeQueue');
|
226 |
+
// Configuration keypairs that can be set from Central.
|
227 |
+
private static $wfCentralInternalConfig = array(
|
228 |
+
'wordfenceCentralUserSiteAuthGrant',
|
229 |
+
'wordfenceCentralConnected',
|
230 |
+
);
|
231 |
+
|
232 |
public static function setDefaults() {
|
233 |
foreach (self::$defaultConfig['checkboxes'] as $key => $config) {
|
234 |
$val = $config['value'];
|
852 |
return $emails;
|
853 |
}
|
854 |
public static function getAlertLevel(){
|
855 |
+
if (self::get('alertOn_scanIssues')) {
|
856 |
+
return self::get('alertOn_severityLevel', 0);
|
|
|
|
|
|
|
|
|
857 |
}
|
858 |
+
return 0;
|
859 |
}
|
860 |
public static function liveTrafficEnabled(&$overriden = null){
|
861 |
$enabled = self::get('liveTrafficEnabled');
|
1630 |
else if (in_array($key, self::$serializedOptions)) {
|
1631 |
wfConfig::set_ser($key, $value);
|
1632 |
}
|
1633 |
+
else if (in_array($key, self::$wfCentralInternalConfig)) {
|
1634 |
+
wfConfig::set($key, $value);
|
1635 |
+
}
|
1636 |
else if (WFWAF_DEBUG) {
|
1637 |
+
//TODO: remove me when done with QA
|
1638 |
error_log("*** DEBUG: Config option '{$key}' missing save handler.");
|
1639 |
}
|
1640 |
}
|
1715 |
wfScanner::shared()->scheduleScans();
|
1716 |
}
|
1717 |
}
|
1718 |
+
if (isset($keyData['showWfCentralUI'])) {
|
1719 |
+
wfConfig::set('showWfCentralUI', (int) $keyData['showWfCentralUI']);
|
1720 |
+
}
|
1721 |
+
|
1722 |
wfConfig::set('keyType', $keyType);
|
1723 |
}
|
1724 |
catch (Exception $e){
|
1728 |
}
|
1729 |
|
1730 |
wfNotification::reconcileNotificationsWithOptions();
|
1731 |
+
wfCentral::requestConfigurationSync();
|
1732 |
}
|
1733 |
|
1734 |
public static function restoreDefaults($section) {
|
lib/wfDashboard.php
CHANGED
@@ -38,7 +38,13 @@ class wfDashboard {
|
|
38 |
|
39 |
public $countriesLocal;
|
40 |
public $countriesNetwork;
|
41 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
public static function processDashboardResponse($data) {
|
43 |
if (isset($data['notifications'])) {
|
44 |
foreach ($data['notifications'] as $n) {
|
@@ -216,5 +222,13 @@ class wfDashboard {
|
|
216 |
}
|
217 |
$this->countriesNetwork = $networkCountries;
|
218 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
219 |
}
|
220 |
}
|
38 |
|
39 |
public $countriesLocal;
|
40 |
public $countriesNetwork;
|
41 |
+
public $wordfenceCentralConnected;
|
42 |
+
public $wordfenceCentralConnectTime;
|
43 |
+
public $wordfenceCentralConnectEmail;
|
44 |
+
public $wordfenceCentralDisconnected;
|
45 |
+
public $wordfenceCentralDisconnectTime;
|
46 |
+
public $wordfenceCentralDisconnectEmail;
|
47 |
+
|
48 |
public static function processDashboardResponse($data) {
|
49 |
if (isset($data['notifications'])) {
|
50 |
foreach ($data['notifications'] as $n) {
|
222 |
}
|
223 |
$this->countriesNetwork = $networkCountries;
|
224 |
}
|
225 |
+
|
226 |
+
// Wordfence Central
|
227 |
+
$this->wordfenceCentralConnected = wfConfig::get('wordfenceCentralConnected');
|
228 |
+
$this->wordfenceCentralConnectTime = wfConfig::get('wordfenceCentralConnectTime');
|
229 |
+
$this->wordfenceCentralConnectEmail = wfConfig::get('wordfenceCentralConnectEmail');
|
230 |
+
$this->wordfenceCentralDisconnected = wfConfig::get('wordfenceCentralDisconnected');
|
231 |
+
$this->wordfenceCentralDisconnectTime = wfConfig::get('wordfenceCentralDisconnectTime');
|
232 |
+
$this->wordfenceCentralDisconnectEmail = wfConfig::get('wordfenceCentralDisconnectEmail');
|
233 |
}
|
234 |
}
|
lib/wfIPWhitelist.php
CHANGED
@@ -23,6 +23,7 @@ $wfIPWhitelist = array(
|
|
23 |
//'255.255.255.255/32', #Reserved for the "limited broadcast" destination address, as specified by RFC 6890
|
24 |
),
|
25 |
'wordfence' => array(
|
|
|
26 |
'69.46.36.0/27',
|
27 |
'2605:2400:0104:0100::/56',
|
28 |
),
|
23 |
//'255.255.255.255/32', #Reserved for the "limited broadcast" destination address, as specified by RFC 6890
|
24 |
),
|
25 |
'wordfence' => array(
|
26 |
+
'54.68.32.247', // Central @ AWS
|
27 |
'69.46.36.0/27',
|
28 |
'2605:2400:0104:0100::/56',
|
29 |
),
|
lib/wfIssues.php
CHANGED
@@ -35,7 +35,13 @@ class wfIssues {
|
|
35 |
const SCAN_FAILED_API_CALL_FAILED = 'apifailed';
|
36 |
const SCAN_FAILED_API_INVALID_RESPONSE = 'apiinvalid';
|
37 |
const SCAN_FAILED_API_ERROR_RESPONSE = 'apierror';
|
38 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
private $db = false;
|
40 |
|
41 |
//Properties that are serialized on sleep:
|
@@ -45,10 +51,38 @@ class wfIssues {
|
|
45 |
private $maxIssues = 0;
|
46 |
private $newIssues = array();
|
47 |
public $totalIssues = 0;
|
48 |
-
public $totalCriticalIssues = 0;
|
49 |
-
public $totalWarningIssues = 0;
|
50 |
public $totalIgnoredIssues = 0;
|
51 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
public static function validIssueTypes() {
|
53 |
return array('checkHowGetIPs', 'checkSpamIP', 'commentBadURL', 'configReadable', 'coreUnknown', 'database', 'diskSpace', 'dnsChange', 'easyPassword', 'file', 'geoipSupport', 'knownfile', 'optionBadURL', 'postBadTitle', 'postBadURL', 'publiclyAccessible', 'spamvertizeCheck', 'suspiciousAdminUsers', 'timelimit', 'wfPluginAbandoned', 'wfPluginRemoved', 'wfPluginUpgrade', 'wfPluginVulnerable', 'wfThemeUpgrade', 'wfUpgrade', 'wpscan_directoryList', 'wpscan_fullPathDiscl');
|
54 |
}
|
@@ -186,7 +220,7 @@ class wfIssues {
|
|
186 |
}
|
187 |
|
188 |
public function __sleep(){ //Same order here as vars above
|
189 |
-
return array('updateCalled', 'issuesTable', 'pendingIssuesTable', 'maxIssues', 'newIssues', 'totalIssues', '
|
190 |
}
|
191 |
public function __construct(){
|
192 |
$this->issuesTable = wfDB::networkTable('wfIssues');
|
@@ -248,12 +282,10 @@ class wfIssues {
|
|
248 |
}
|
249 |
|
250 |
if ($group != 'pending') {
|
251 |
-
if ($severity
|
252 |
-
$this->
|
253 |
-
}
|
254 |
-
else if ($severity == 2) {
|
255 |
-
$this->totalWarningIssues++;
|
256 |
}
|
|
|
257 |
$this->totalIssues++;
|
258 |
if (empty($this->maxIssues) || $this->totalIssues <= $this->maxIssues)
|
259 |
{
|
@@ -268,8 +300,22 @@ class wfIssues {
|
|
268 |
);
|
269 |
}
|
270 |
}
|
271 |
-
|
272 |
if (isset($updateID)) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
273 |
$this->getDB()->queryWrite(
|
274 |
"UPDATE {$table} SET lastUpdated = UNIX_TIMESTAMP(), status = '%s', type = '%s', severity = %d, ignoreP = '%s', ignoreC = '%s', shortMsg = '%s', longMsg = '%s', data = '%s' WHERE id = %d",
|
275 |
'new',
|
@@ -281,6 +327,8 @@ class wfIssues {
|
|
281 |
$longMsg,
|
282 |
serialize($templateData),
|
283 |
$updateID);
|
|
|
|
|
284 |
return self::ISSUE_UPDATED;
|
285 |
}
|
286 |
|
@@ -294,22 +342,75 @@ class wfIssues {
|
|
294 |
$longMsg,
|
295 |
serialize($templateData));
|
296 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
297 |
return self::ISSUE_ADDED;
|
298 |
}
|
299 |
public function deleteIgnored(){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
300 |
$this->getDB()->queryWrite("delete from " . $this->issuesTable . " where status='ignoreP' or status='ignoreC'");
|
301 |
}
|
302 |
public function deleteNew($types = null) {
|
303 |
if (!is_array($types)) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
304 |
$this->getDB()->queryWrite("DELETE FROM {$this->issuesTable} WHERE status = 'new'");
|
305 |
}
|
306 |
else {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
307 |
$query = "DELETE FROM {$this->issuesTable} WHERE status = 'new' AND type IN (" . implode(',', array_fill(0, count($types), "'%s'")) . ")";
|
308 |
array_unshift($types, $query);
|
309 |
call_user_func_array(array($this->getDB(), 'queryWrite'), $types);
|
310 |
}
|
311 |
}
|
312 |
public function ignoreAllNew(){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
313 |
$this->getDB()->queryWrite("update " . $this->issuesTable . " set status='ignoreC' where status='new'");
|
314 |
}
|
315 |
public function emailNewIssues($timeLimitReached = false, $scanController = false){
|
@@ -324,8 +425,16 @@ class wfIssues {
|
|
324 |
|
325 |
if(sizeof($emails) < 1){ return; }
|
326 |
if($level < 1){ return; }
|
327 |
-
|
328 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
329 |
$emailedIssues = wfConfig::get_ser('emailedIssuesList', array());
|
330 |
if(! is_array($emailedIssues)){
|
331 |
$emailedIssues = array();
|
@@ -352,24 +461,30 @@ class wfIssues {
|
|
352 |
$this->newIssues = array();
|
353 |
$this->totalIssues = 0;
|
354 |
|
355 |
-
$
|
356 |
-
$totalCriticalIssues = 0;
|
357 |
foreach($finalIssues as $i){
|
358 |
$emailedIssues[] = array( 'ignoreC' => $i['ignoreC'], 'ignoreP' => $i['ignoreP'] );
|
359 |
-
if($i['severity']
|
360 |
-
$
|
361 |
-
} else if($i['severity'] == 2){
|
362 |
-
$totalWarningIssues++;
|
363 |
}
|
|
|
364 |
}
|
365 |
wfConfig::set_ser('emailedIssuesList', $emailedIssues);
|
366 |
-
|
367 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
368 |
$content = wfUtils::tmpl('email_newIssues.php', array(
|
369 |
'isPaid' => wfConfig::get('isPaid'),
|
370 |
'issues' => $finalIssues,
|
371 |
-
'
|
372 |
-
'totalWarningIssues' => $totalWarningIssues,
|
373 |
'level' => $level,
|
374 |
'issuesNotShown' => $overflowCount,
|
375 |
'adminURL' => get_admin_url(),
|
@@ -384,12 +499,44 @@ class wfIssues {
|
|
384 |
}
|
385 |
public function deleteIssue($id){
|
386 |
$this->getDB()->queryWrite("delete from " . $this->issuesTable . " where id=%d", $id);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
387 |
}
|
|
|
388 |
public function updateIssue($id, $status){ //ignoreC, ignoreP, delete or new
|
389 |
if($status == 'delete'){
|
|
|
|
|
|
|
390 |
$this->getDB()->queryWrite("delete from " . $this->issuesTable . " where id=%d", $id);
|
391 |
} else if($status == 'ignoreC' || $status == 'ignoreP' || $status == 'new'){
|
392 |
$this->getDB()->queryWrite("update " . $this->issuesTable . " set status='%s' where id=%d", $status, $id);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
393 |
}
|
394 |
}
|
395 |
public function getIssueByID($id){
|
@@ -422,8 +569,8 @@ class wfIssues {
|
|
422 |
'ignored' => array()
|
423 |
);
|
424 |
$userIni = ini_get('user_ini.filename');
|
425 |
-
$q1 = $this->getDB()->querySelect("SELECT *, {$sortTagging} AS sortTag FROM " . $this->issuesTable . " WHERE status = 'new' ORDER BY severity
|
426 |
-
$q2 = $this->getDB()->querySelect("SELECT *, {$sortTagging} AS sortTag FROM " . $this->issuesTable . " WHERE status = 'ignoreP' OR status = 'ignoreC' ORDER BY severity
|
427 |
$q = array_merge($q1, $q2);
|
428 |
foreach($q as $i){
|
429 |
$i['data'] = unserialize($i['data']);
|
@@ -521,7 +668,7 @@ class wfIssues {
|
|
521 |
$updatesNeeded = $report->getUpdatesNeeded($useCachedValued);
|
522 |
if ($updatesNeeded) {
|
523 |
if (!$updatesNeeded['core']) {
|
524 |
-
$this->
|
525 |
}
|
526 |
|
527 |
if ($updatesNeeded['plugins']) {
|
@@ -540,9 +687,9 @@ class wfIssues {
|
|
540 |
}
|
541 |
}
|
542 |
else {
|
543 |
-
$this->
|
544 |
}
|
545 |
-
|
546 |
if ($updatesNeeded['themes']) {
|
547 |
$upgradeNames = array();
|
548 |
foreach ($updatesNeeded['themes'] as $t) {
|
@@ -559,11 +706,11 @@ class wfIssues {
|
|
559 |
}
|
560 |
}
|
561 |
else {
|
562 |
-
$this->
|
563 |
}
|
564 |
}
|
565 |
else {
|
566 |
-
$this->
|
567 |
}
|
568 |
|
569 |
wfScanEngine::refreshScanNotification($this);
|
@@ -574,4 +721,11 @@ class wfIssues {
|
|
574 |
}
|
575 |
return $this->db;
|
576 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
577 |
}
|
35 |
const SCAN_FAILED_API_CALL_FAILED = 'apifailed';
|
36 |
const SCAN_FAILED_API_INVALID_RESPONSE = 'apiinvalid';
|
37 |
const SCAN_FAILED_API_ERROR_RESPONSE = 'apierror';
|
38 |
+
|
39 |
+
const SEVERITY_NONE = 0;
|
40 |
+
const SEVERITY_LOW = 25;
|
41 |
+
const SEVERITY_MEDIUM = 50;
|
42 |
+
const SEVERITY_HIGH = 75;
|
43 |
+
const SEVERITY_CRITICAL = 100;
|
44 |
+
|
45 |
private $db = false;
|
46 |
|
47 |
//Properties that are serialized on sleep:
|
51 |
private $maxIssues = 0;
|
52 |
private $newIssues = array();
|
53 |
public $totalIssues = 0;
|
|
|
|
|
54 |
public $totalIgnoredIssues = 0;
|
55 |
+
private $totalIssuesBySeverity = array();
|
56 |
+
|
57 |
+
public static $issueSeverities = array(
|
58 |
+
'checkGSB' => wfIssues::SEVERITY_CRITICAL,
|
59 |
+
'checkSpamIP' => wfIssues::SEVERITY_HIGH,
|
60 |
+
'spamvertizeCheck' => wfIssues::SEVERITY_CRITICAL,
|
61 |
+
'commentBadURL' => wfIssues::SEVERITY_LOW,
|
62 |
+
'postBadTitle' => wfIssues::SEVERITY_HIGH,
|
63 |
+
'postBadURL' => wfIssues::SEVERITY_HIGH,
|
64 |
+
'file' => wfIssues::SEVERITY_CRITICAL,
|
65 |
+
'timelimit' => wfIssues::SEVERITY_HIGH,
|
66 |
+
'checkHowGetIPs' => wfIssues::SEVERITY_HIGH,
|
67 |
+
'diskSpace' => wfIssues::SEVERITY_HIGH,
|
68 |
+
'configReadable' => wfIssues::SEVERITY_CRITICAL,
|
69 |
+
'wfPluginVulnerable' => wfIssues::SEVERITY_HIGH,
|
70 |
+
'coreUnknown' => wfIssues::SEVERITY_HIGH,
|
71 |
+
'dnsChangeDNS' => wfIssues::SEVERITY_HIGH,
|
72 |
+
'easyPasswordWeak' => wfIssues::SEVERITY_HIGH,
|
73 |
+
'knownfile' => wfIssues::SEVERITY_HIGH,
|
74 |
+
'optionBadURL' => wfIssues::SEVERITY_HIGH,
|
75 |
+
'publiclyAccessible' => wfIssues::SEVERITY_HIGH,
|
76 |
+
'suspiciousAdminUsers' => wfIssues::SEVERITY_HIGH,
|
77 |
+
'wfPluginAbandoned' => wfIssues::SEVERITY_MEDIUM,
|
78 |
+
'wfPluginRemoved' => wfIssues::SEVERITY_CRITICAL,
|
79 |
+
'wfPluginUpgrade' => wfIssues::SEVERITY_MEDIUM,
|
80 |
+
'wfThemeUpgrade' => wfIssues::SEVERITY_MEDIUM,
|
81 |
+
'wfUpgrade' => wfIssues::SEVERITY_HIGH,
|
82 |
+
'wpscan_directoryList' => wfIssues::SEVERITY_HIGH,
|
83 |
+
'wpscan_fullPathDiscl' => wfIssues::SEVERITY_HIGH,
|
84 |
+
);
|
85 |
+
|
86 |
public static function validIssueTypes() {
|
87 |
return array('checkHowGetIPs', 'checkSpamIP', 'commentBadURL', 'configReadable', 'coreUnknown', 'database', 'diskSpace', 'dnsChange', 'easyPassword', 'file', 'geoipSupport', 'knownfile', 'optionBadURL', 'postBadTitle', 'postBadURL', 'publiclyAccessible', 'spamvertizeCheck', 'suspiciousAdminUsers', 'timelimit', 'wfPluginAbandoned', 'wfPluginRemoved', 'wfPluginUpgrade', 'wfPluginVulnerable', 'wfThemeUpgrade', 'wfUpgrade', 'wpscan_directoryList', 'wpscan_fullPathDiscl');
|
88 |
}
|
220 |
}
|
221 |
|
222 |
public function __sleep(){ //Same order here as vars above
|
223 |
+
return array('updateCalled', 'issuesTable', 'pendingIssuesTable', 'maxIssues', 'newIssues', 'totalIssues', 'totalIgnoredIssues', 'totalIssuesBySeverity');
|
224 |
}
|
225 |
public function __construct(){
|
226 |
$this->issuesTable = wfDB::networkTable('wfIssues');
|
282 |
}
|
283 |
|
284 |
if ($group != 'pending') {
|
285 |
+
if (!array_key_exists($severity, $this->totalIssuesBySeverity)) {
|
286 |
+
$this->totalIssuesBySeverity[$severity] = 0;
|
|
|
|
|
|
|
287 |
}
|
288 |
+
$this->totalIssuesBySeverity[$severity]++;
|
289 |
$this->totalIssues++;
|
290 |
if (empty($this->maxIssues) || $this->totalIssues <= $this->maxIssues)
|
291 |
{
|
300 |
);
|
301 |
}
|
302 |
}
|
303 |
+
|
304 |
if (isset($updateID)) {
|
305 |
+
if ($group !== 'pending' && wfCentral::isConnected()) {
|
306 |
+
wfCentral::sendIssue(array(
|
307 |
+
'id' => $updateID,
|
308 |
+
'lastUpdated' => time(),
|
309 |
+
'type' => $type,
|
310 |
+
'severity' => $severity,
|
311 |
+
'ignoreP' => $ignoreP,
|
312 |
+
'ignoreC' => $ignoreC,
|
313 |
+
'shortMsg' => $shortMsg,
|
314 |
+
'longMsg' => $longMsg,
|
315 |
+
'data' => $templateData,
|
316 |
+
));
|
317 |
+
}
|
318 |
+
|
319 |
$this->getDB()->queryWrite(
|
320 |
"UPDATE {$table} SET lastUpdated = UNIX_TIMESTAMP(), status = '%s', type = '%s', severity = %d, ignoreP = '%s', ignoreC = '%s', shortMsg = '%s', longMsg = '%s', data = '%s' WHERE id = %d",
|
321 |
'new',
|
327 |
$longMsg,
|
328 |
serialize($templateData),
|
329 |
$updateID);
|
330 |
+
|
331 |
+
|
332 |
return self::ISSUE_UPDATED;
|
333 |
}
|
334 |
|
342 |
$longMsg,
|
343 |
serialize($templateData));
|
344 |
|
345 |
+
if ($group !== 'pending' && wfCentral::isConnected()) {
|
346 |
+
global $wpdb;
|
347 |
+
wfCentral::sendIssue(array(
|
348 |
+
'id' => $wpdb->insert_id,
|
349 |
+
'status' => 'new',
|
350 |
+
'time' => time(),
|
351 |
+
'lastUpdated' => time(),
|
352 |
+
'type' => $type,
|
353 |
+
'severity' => $severity,
|
354 |
+
'ignoreP' => $ignoreP,
|
355 |
+
'ignoreC' => $ignoreC,
|
356 |
+
'shortMsg' => $shortMsg,
|
357 |
+
'longMsg' => $longMsg,
|
358 |
+
'data' => $templateData,
|
359 |
+
));
|
360 |
+
}
|
361 |
+
|
362 |
return self::ISSUE_ADDED;
|
363 |
}
|
364 |
public function deleteIgnored(){
|
365 |
+
if (wfCentral::isConnected()) {
|
366 |
+
$result = $this->getDB()->querySelect("SELECT id from " . $this->issuesTable . " where status='ignoreP' or status='ignoreC'");
|
367 |
+
$issues = array();
|
368 |
+
foreach ($result as $row) {
|
369 |
+
$issues[] = $row['id'];
|
370 |
+
}
|
371 |
+
wfCentral::deleteIssues($issues);
|
372 |
+
}
|
373 |
+
|
374 |
$this->getDB()->queryWrite("delete from " . $this->issuesTable . " where status='ignoreP' or status='ignoreC'");
|
375 |
}
|
376 |
public function deleteNew($types = null) {
|
377 |
if (!is_array($types)) {
|
378 |
+
if (wfCentral::isConnected()) {
|
379 |
+
$result = $this->getDB()->querySelect("SELECT id FROM {$this->issuesTable} WHERE status = 'new'");
|
380 |
+
$issues = array();
|
381 |
+
foreach ($result as $row) {
|
382 |
+
$issues[] = $row['id'];
|
383 |
+
}
|
384 |
+
wfCentral::deleteIssues($issues);
|
385 |
+
}
|
386 |
+
|
387 |
$this->getDB()->queryWrite("DELETE FROM {$this->issuesTable} WHERE status = 'new'");
|
388 |
}
|
389 |
else {
|
390 |
+
if (wfCentral::isConnected()) {
|
391 |
+
$query = "SELECT id FROM {$this->issuesTable} WHERE status = 'new' AND type IN (" . implode(',', array_fill(0, count($types), "'%s'")) . ")";
|
392 |
+
array_unshift($types, $query);
|
393 |
+
$result = call_user_func_array(array($this->getDB(), 'querySelect'), $types);
|
394 |
+
$issues = array();
|
395 |
+
foreach ($result as $row) {
|
396 |
+
$issues[] = $row['id'];
|
397 |
+
}
|
398 |
+
wfCentral::deleteIssues($issues);
|
399 |
+
}
|
400 |
+
|
401 |
$query = "DELETE FROM {$this->issuesTable} WHERE status = 'new' AND type IN (" . implode(',', array_fill(0, count($types), "'%s'")) . ")";
|
402 |
array_unshift($types, $query);
|
403 |
call_user_func_array(array($this->getDB(), 'queryWrite'), $types);
|
404 |
}
|
405 |
}
|
406 |
public function ignoreAllNew(){
|
407 |
+
if (wfCentral::isConnected()) {
|
408 |
+
$issues = $this->getDB()->querySelect('SELECT * FROM ' . $this->issuesTable . ' WHERE status=\'new\'');
|
409 |
+
if ($issues) {
|
410 |
+
wfCentral::sendIssues($issues);
|
411 |
+
}
|
412 |
+
}
|
413 |
+
|
414 |
$this->getDB()->queryWrite("update " . $this->issuesTable . " set status='ignoreC' where status='new'");
|
415 |
}
|
416 |
public function emailNewIssues($timeLimitReached = false, $scanController = false){
|
425 |
|
426 |
if(sizeof($emails) < 1){ return; }
|
427 |
if($level < 1){ return; }
|
428 |
+
$needsToAlert = false;
|
429 |
+
foreach ($this->totalIssuesBySeverity as $issueSeverity => $totalIssuesBySeverity) {
|
430 |
+
if ($issueSeverity >= $level && $totalIssuesBySeverity > 0) {
|
431 |
+
$needsToAlert = true;
|
432 |
+
break;
|
433 |
+
}
|
434 |
+
}
|
435 |
+
if (!$needsToAlert) {
|
436 |
+
return;
|
437 |
+
}
|
438 |
$emailedIssues = wfConfig::get_ser('emailedIssuesList', array());
|
439 |
if(! is_array($emailedIssues)){
|
440 |
$emailedIssues = array();
|
461 |
$this->newIssues = array();
|
462 |
$this->totalIssues = 0;
|
463 |
|
464 |
+
$totals = array();
|
|
|
465 |
foreach($finalIssues as $i){
|
466 |
$emailedIssues[] = array( 'ignoreC' => $i['ignoreC'], 'ignoreP' => $i['ignoreP'] );
|
467 |
+
if (!array_key_exists($i['severity'], $totals)) {
|
468 |
+
$totals[$i['severity']] = 0;
|
|
|
|
|
469 |
}
|
470 |
+
$totals[$i['severity']]++;
|
471 |
}
|
472 |
wfConfig::set_ser('emailedIssuesList', $emailedIssues);
|
473 |
+
$needsToAlert = false;
|
474 |
+
foreach ($totals as $issueSeverity => $totalIssuesBySeverity) {
|
475 |
+
if ($issueSeverity >= $level && $totalIssuesBySeverity > 0) {
|
476 |
+
$needsToAlert = true;
|
477 |
+
break;
|
478 |
+
}
|
479 |
+
}
|
480 |
+
if (!$needsToAlert) {
|
481 |
+
return;
|
482 |
+
}
|
483 |
+
|
484 |
$content = wfUtils::tmpl('email_newIssues.php', array(
|
485 |
'isPaid' => wfConfig::get('isPaid'),
|
486 |
'issues' => $finalIssues,
|
487 |
+
'totals' => $totals,
|
|
|
488 |
'level' => $level,
|
489 |
'issuesNotShown' => $overflowCount,
|
490 |
'adminURL' => get_admin_url(),
|
499 |
}
|
500 |
public function deleteIssue($id){
|
501 |
$this->getDB()->queryWrite("delete from " . $this->issuesTable . " where id=%d", $id);
|
502 |
+
if (wfCentral::isConnected()) {
|
503 |
+
wfCentral::deleteIssue($id);
|
504 |
+
}
|
505 |
+
}
|
506 |
+
|
507 |
+
public function deleteUpdateIssues($type)
|
508 |
+
{
|
509 |
+
$this->getDB()->queryWrite("DELETE FROM {$this->issuesTable} WHERE status = 'new' AND type = '%s'", $type);
|
510 |
+
|
511 |
+
if (wfCentral::isConnected()) {
|
512 |
+
wfCentral::deleteIssueTypes(array($type));
|
513 |
+
}
|
514 |
+
}
|
515 |
+
|
516 |
+
public function deleteAllUpdateIssues()
|
517 |
+
{
|
518 |
+
$this->getDB()->queryWrite("DELETE FROM {$this->issuesTable} WHERE status = 'new' AND (type = 'wfUpgrade' OR type = 'wfPluginUpgrade' OR type = 'wfThemeUpgrade')");
|
519 |
+
|
520 |
+
if (wfCentral::isConnected()) {
|
521 |
+
wfCentral::deleteIssueTypes(array('wfUpgrade', 'wfPluginUpgrade', 'wfThemeUpgrade'));
|
522 |
+
}
|
523 |
}
|
524 |
+
|
525 |
public function updateIssue($id, $status){ //ignoreC, ignoreP, delete or new
|
526 |
if($status == 'delete'){
|
527 |
+
if (wfCentral::isConnected()) {
|
528 |
+
wfCentral::deleteIssue($id);
|
529 |
+
}
|
530 |
$this->getDB()->queryWrite("delete from " . $this->issuesTable . " where id=%d", $id);
|
531 |
} else if($status == 'ignoreC' || $status == 'ignoreP' || $status == 'new'){
|
532 |
$this->getDB()->queryWrite("update " . $this->issuesTable . " set status='%s' where id=%d", $status, $id);
|
533 |
+
|
534 |
+
if (wfCentral::isConnected()) {
|
535 |
+
$issue = $this->getDB()->querySelect('SELECT * FROM ' . $this->issuesTable . ' where id=%d', $id);
|
536 |
+
if ($issue) {
|
537 |
+
wfCentral::sendIssues($issue);
|
538 |
+
}
|
539 |
+
}
|
540 |
}
|
541 |
}
|
542 |
public function getIssueByID($id){
|
569 |
'ignored' => array()
|
570 |
);
|
571 |
$userIni = ini_get('user_ini.filename');
|
572 |
+
$q1 = $this->getDB()->querySelect("SELECT *, {$sortTagging} AS sortTag FROM " . $this->issuesTable . " WHERE status = 'new' ORDER BY severity DESC, sortTag ASC, type ASC, time DESC LIMIT %d,%d", $offset, $limit);
|
573 |
+
$q2 = $this->getDB()->querySelect("SELECT *, {$sortTagging} AS sortTag FROM " . $this->issuesTable . " WHERE status = 'ignoreP' OR status = 'ignoreC' ORDER BY severity DESC, sortTag ASC, type ASC, time DESC LIMIT %d,%d", $ignoredOffset, $ignoredLimit);
|
574 |
$q = array_merge($q1, $q2);
|
575 |
foreach($q as $i){
|
576 |
$i['data'] = unserialize($i['data']);
|
668 |
$updatesNeeded = $report->getUpdatesNeeded($useCachedValued);
|
669 |
if ($updatesNeeded) {
|
670 |
if (!$updatesNeeded['core']) {
|
671 |
+
$this->deleteUpdateIssues('wfUpgrade');
|
672 |
}
|
673 |
|
674 |
if ($updatesNeeded['plugins']) {
|
687 |
}
|
688 |
}
|
689 |
else {
|
690 |
+
$this->deleteUpdateIssues('wfPluginUpgrade');
|
691 |
}
|
692 |
+
|
693 |
if ($updatesNeeded['themes']) {
|
694 |
$upgradeNames = array();
|
695 |
foreach ($updatesNeeded['themes'] as $t) {
|
706 |
}
|
707 |
}
|
708 |
else {
|
709 |
+
$this->deleteUpdateIssues('wfThemeUpgrade');
|
710 |
}
|
711 |
}
|
712 |
else {
|
713 |
+
$this->deleteAllUpdateIssues();
|
714 |
}
|
715 |
|
716 |
wfScanEngine::refreshScanNotification($this);
|
721 |
}
|
722 |
return $this->db;
|
723 |
}
|
724 |
+
|
725 |
+
/**
|
726 |
+
* @return string
|
727 |
+
*/
|
728 |
+
public function getIssuesTable() {
|
729 |
+
return $this->issuesTable;
|
730 |
+
}
|
731 |
}
|
lib/wfJWT.php
ADDED
@@ -0,0 +1,237 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class wfJWT {
|
4 |
+
|
5 |
+
private $claims;
|
6 |
+
const JWT_TTL = 600;
|
7 |
+
const ISSUER = 600;
|
8 |
+
|
9 |
+
public static function extractTokenContents($token) {
|
10 |
+
if (!is_string($token)) {
|
11 |
+
throw new InvalidArgumentException('Token is not a string. ' . gettype($token) . ' given.');
|
12 |
+
}
|
13 |
+
|
14 |
+
// Verify the token matches the JWT format.
|
15 |
+
if (!preg_match('/^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?$/', $token)) {
|
16 |
+
throw new wfJWTException('Invalid token format.');
|
17 |
+
}
|
18 |
+
list($header, $body, $signature) = explode('.', $token);
|
19 |
+
|
20 |
+
// Test that the token is valid and not expired.
|
21 |
+
$decodedHeader = base64_decode($header);
|
22 |
+
|
23 |
+
if (!(is_string($decodedHeader) && $decodedHeader)) {
|
24 |
+
throw new wfJWTException('Token header is invalid.');
|
25 |
+
}
|
26 |
+
|
27 |
+
$header = json_decode($decodedHeader, true);
|
28 |
+
if (!is_array($header)) {
|
29 |
+
throw new wfJWTException('Token header is invalid.');
|
30 |
+
}
|
31 |
+
|
32 |
+
$decodedBody = base64_decode($body);
|
33 |
+
|
34 |
+
if (!(is_string($decodedBody) && $decodedBody)) {
|
35 |
+
throw new wfJWTException('Token body is invalid.');
|
36 |
+
}
|
37 |
+
|
38 |
+
$body = json_decode($decodedBody, true);
|
39 |
+
if (!is_array($body)) {
|
40 |
+
throw new wfJWTException('Token body is invalid.');
|
41 |
+
}
|
42 |
+
|
43 |
+
return array(
|
44 |
+
'header' => $header,
|
45 |
+
'body' => $body,
|
46 |
+
'signature' => $signature,
|
47 |
+
);
|
48 |
+
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* @param mixed $subject
|
53 |
+
*/
|
54 |
+
public function __construct($subject = null) {
|
55 |
+
$this->claims = $this->getClaimDefaults();
|
56 |
+
$this->claims['sub'] = $subject;
|
57 |
+
}
|
58 |
+
|
59 |
+
/**
|
60 |
+
* @return string
|
61 |
+
*/
|
62 |
+
public function encode() {
|
63 |
+
$header = $this->encodeString($this->buildHeader());
|
64 |
+
$body = $this->encodeString($this->buildBody());
|
65 |
+
return sprintf('%s.%s.%s', $header, $body,
|
66 |
+
$this->encodeString($this->sign(sprintf('%s.%s', $header, $body))));
|
67 |
+
}
|
68 |
+
|
69 |
+
/**
|
70 |
+
* @param string $token
|
71 |
+
* @return array
|
72 |
+
* @throws wfJWTException|InvalidArgumentException
|
73 |
+
*/
|
74 |
+
public function decode($token) {
|
75 |
+
if (!is_string($token)) {
|
76 |
+
throw new InvalidArgumentException('Token is not a string. ' . gettype($token) . ' given.');
|
77 |
+
}
|
78 |
+
|
79 |
+
// Verify the token matches the JWT format.
|
80 |
+
if (!preg_match('/^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?$/', $token)) {
|
81 |
+
throw new wfJWTException('Invalid token format.');
|
82 |
+
}
|
83 |
+
list($header, $body, $signature) = explode('.', $token);
|
84 |
+
|
85 |
+
// Verify signature matches the supplied payload.
|
86 |
+
if (!$this->verifySignature($this->decodeString($signature), sprintf('%s.%s', $header, $body))) {
|
87 |
+
throw new wfJWTException('Invalid signature.');
|
88 |
+
}
|
89 |
+
|
90 |
+
// Test that the token is valid and not expired.
|
91 |
+
$decodedHeader = base64_decode($header);
|
92 |
+
|
93 |
+
if (!(is_string($decodedHeader) && $decodedHeader)) {
|
94 |
+
throw new wfJWTException('Token header is invalid.');
|
95 |
+
}
|
96 |
+
|
97 |
+
$header = json_decode($decodedHeader, true);
|
98 |
+
if (!(
|
99 |
+
is_array($header) &&
|
100 |
+
array_key_exists('alg', $header) &&
|
101 |
+
$header['alg'] === 'HS256' &&
|
102 |
+
$header['typ'] === 'JWT'
|
103 |
+
)) {
|
104 |
+
throw new wfJWTException('Token header is invalid.');
|
105 |
+
}
|
106 |
+
|
107 |
+
$decodedBody = base64_decode($body);
|
108 |
+
|
109 |
+
if (!(is_string($decodedBody) && $decodedBody)) {
|
110 |
+
throw new wfJWTException('Token body is invalid.');
|
111 |
+
}
|
112 |
+
|
113 |
+
$body = json_decode($decodedBody, true);
|
114 |
+
if (!(
|
115 |
+
is_array($body) &&
|
116 |
+
|
117 |
+
// Check the token not before now timestamp.
|
118 |
+
array_key_exists('nbf', $body) &&
|
119 |
+
is_numeric($body['nbf']) &&
|
120 |
+
$body['nbf'] <= time() &&
|
121 |
+
|
122 |
+
// Check the token is not expired.
|
123 |
+
array_key_exists('exp', $body) &&
|
124 |
+
is_numeric($body['exp']) &&
|
125 |
+
$body['exp'] >= time() &&
|
126 |
+
|
127 |
+
// Check the issuer and audience is ours.
|
128 |
+
$body['iss'] === 'Wordfence ' . WORDFENCE_VERSION &&
|
129 |
+
$body['aud'] === 'Wordfence Central'
|
130 |
+
)) {
|
131 |
+
throw new wfJWTException('Token is invalid or expired.');
|
132 |
+
}
|
133 |
+
|
134 |
+
return array(
|
135 |
+
'header' => $header,
|
136 |
+
'body' => $body,
|
137 |
+
);
|
138 |
+
}
|
139 |
+
|
140 |
+
/**
|
141 |
+
* @param string $string
|
142 |
+
* @return string
|
143 |
+
*/
|
144 |
+
public function sign($string) {
|
145 |
+
$salt = wp_salt('auth');
|
146 |
+
|
147 |
+
return hash_hmac('sha256', $string, $salt, true);
|
148 |
+
}
|
149 |
+
|
150 |
+
/**
|
151 |
+
* @param string $signature
|
152 |
+
* @param string $message
|
153 |
+
* @return bool
|
154 |
+
*/
|
155 |
+
public function verifySignature($signature, $message) {
|
156 |
+
return hash_equals($this->sign($message), $signature);
|
157 |
+
}
|
158 |
+
|
159 |
+
/**
|
160 |
+
* @return string
|
161 |
+
*/
|
162 |
+
public function __toString() {
|
163 |
+
return $this->encode();
|
164 |
+
}
|
165 |
+
|
166 |
+
/**
|
167 |
+
* @param string $data
|
168 |
+
* @return string
|
169 |
+
*/
|
170 |
+
public function encodeString($data) {
|
171 |
+
return rtrim(strtr(base64_encode($data), '+/', '-_'), '=');
|
172 |
+
}
|
173 |
+
|
174 |
+
/**
|
175 |
+
* @param string $data
|
176 |
+
* @return bool|string
|
177 |
+
*/
|
178 |
+
public function decodeString($data) {
|
179 |
+
return base64_decode(strtr($data, '-_', '+/'));
|
180 |
+
}
|
181 |
+
|
182 |
+
/**
|
183 |
+
* @return mixed|string
|
184 |
+
*/
|
185 |
+
protected function buildHeader() {
|
186 |
+
return '{"alg":"HS256","typ":"JWT"}';
|
187 |
+
}
|
188 |
+
|
189 |
+
/**
|
190 |
+
* @return mixed|string
|
191 |
+
*/
|
192 |
+
protected function buildBody() {
|
193 |
+
return json_encode($this->getClaims());
|
194 |
+
}
|
195 |
+
|
196 |
+
/**
|
197 |
+
* @return array
|
198 |
+
*/
|
199 |
+
protected function getClaimDefaults() {
|
200 |
+
$now = time();
|
201 |
+
return array(
|
202 |
+
'iss' => 'Wordfence ' . WORDFENCE_VERSION,
|
203 |
+
'aud' => 'Wordfence Central',
|
204 |
+
'nbf' => $now,
|
205 |
+
'iat' => $now,
|
206 |
+
'exp' => $now + self::JWT_TTL,
|
207 |
+
);
|
208 |
+
}
|
209 |
+
|
210 |
+
/**
|
211 |
+
* @param array $claims
|
212 |
+
*/
|
213 |
+
public function addClaims($claims) {
|
214 |
+
if (!is_array($claims)) {
|
215 |
+
throw new InvalidArgumentException(__METHOD__ . ' expects argument 1 to be array.');
|
216 |
+
}
|
217 |
+
$this->setClaims(array_merge($this->getClaims(), $claims));
|
218 |
+
}
|
219 |
+
|
220 |
+
/**
|
221 |
+
* @return array
|
222 |
+
*/
|
223 |
+
public function getClaims() {
|
224 |
+
return $this->claims;
|
225 |
+
}
|
226 |
+
|
227 |
+
/**
|
228 |
+
* @param array $claims
|
229 |
+
*/
|
230 |
+
public function setClaims($claims) {
|
231 |
+
$this->claims = $claims;
|
232 |
+
}
|
233 |
+
}
|
234 |
+
|
235 |
+
class wfJWTException extends Exception {
|
236 |
+
|
237 |
+
}
|
lib/wfScanEngine.php
CHANGED
@@ -204,6 +204,10 @@ class wfScanEngine {
|
|
204 |
}
|
205 |
|
206 |
wfScanEngine::refreshScanNotification($this->i);
|
|
|
|
|
|
|
|
|
207 |
}
|
208 |
catch (wfScanEngineDurationLimitException $e) {
|
209 |
wfConfig::set('lastScanCompleted', $e->getMessage());
|
@@ -269,7 +273,7 @@ class wfScanEngine {
|
|
269 |
|
270 |
if ((time() - $this->startTime) > $timeLimit){
|
271 |
$error = 'The scan time limit of ' . wfUtils::makeDuration($timeLimit) . ' has been exceeded and the scan will be terminated. This limit can be customized on the options page. <a href="' . wfSupportController::esc_supportURL(wfSupportController::ITEM_SCAN_TIME_LIMIT) . '" target="_blank" rel="noopener noreferrer">Get More Information</a>';
|
272 |
-
$this->addIssue('timelimit',
|
273 |
|
274 |
$this->status(1, 'info', '-------------------');
|
275 |
$this->status(1, 'info', "Scan interrupted. Scanned " . $this->scanController->getSummaryItem(wfScanner::SUMMARY_SCANNED_FILES, 0) . " files, " . $this->scanController->getSummaryItem(wfScanner::SUMMARY_SCANNED_PLUGINS, 0) . " plugins, " . $this->scanController->getSummaryItem(wfScanner::SUMMARY_SCANNED_THEMES, 0) . " themes, " . $this->scanController->getSummaryItem(wfScanner::SUMMARY_SCANNED_POSTS, 0) . " posts, " . $this->scanController->getSummaryItem(wfScanner::SUMMARY_SCANNED_COMMENTS, 0) . " comments and " . $this->scanController->getSummaryItem(wfScanner::SUMMARY_SCANNED_URLS, 0) . " URLs in " . wfUtils::makeDuration(time() - $this->startTime, true) . ".");
|
@@ -397,7 +401,7 @@ class wfScanEngine {
|
|
397 |
$haveIssues = wfIssues::STATUS_SECURE;
|
398 |
if(!empty($result['haveIssues']) && is_array($result['issues']) ){
|
399 |
foreach($result['issues'] as $issue){
|
400 |
-
$added = $this->addIssue($issue['type'],
|
401 |
if ($added == wfIssues::ISSUE_ADDED || $added == wfIssues::ISSUE_UPDATED) { $haveIssues = wfIssues::STATUS_PROBLEM; }
|
402 |
else if ($added == wfIssues::ISSUE_IGNOREP || $added == wfIssues::ISSUE_IGNOREC) { $haveIssues = wfIssues::STATUS_IGNORED; }
|
403 |
}
|
@@ -533,7 +537,7 @@ class wfScanEngine {
|
|
533 |
$data['gsb'] = 'unknown';
|
534 |
}
|
535 |
|
536 |
-
$added = $this->addIssue('checkGSB',
|
537 |
if ($added == wfIssues::ISSUE_ADDED || $added == wfIssues::ISSUE_UPDATED) { $haveIssues = wfIssues::STATUS_PROBLEM; }
|
538 |
else if ($haveIssues != wfIssues::STATUS_PROBLEM && ($added == wfIssues::ISSUE_IGNOREP || $added == wfIssues::ISSUE_IGNOREC)) { $haveIssues = wfIssues::STATUS_IGNORED; }
|
539 |
}
|
@@ -572,7 +576,7 @@ class wfScanEngine {
|
|
572 |
$haveIssues = wfIssues::STATUS_FAILED;
|
573 |
}
|
574 |
else if ($recommendation == 'UNKNOWN') {
|
575 |
-
$added = $this->addIssue('checkHowGetIPs',
|
576 |
if ($added == wfIssues::ISSUE_ADDED || $added == wfIssues::ISSUE_UPDATED) { $haveIssues = wfIssues::STATUS_PROBLEM; }
|
577 |
else if ($added == wfIssues::ISSUE_IGNOREP || $added == wfIssues::ISSUE_IGNOREC) { $haveIssues = wfIssues::STATUS_IGNORED; }
|
578 |
}
|
@@ -591,7 +595,7 @@ class wfScanEngine {
|
|
591 |
$extraMsg = ' This site appears to be behind Cloudflare, so using the Cloudflare "CF-Connecting-IP" HTTP header will resolve to the correct IPs.';
|
592 |
}
|
593 |
|
594 |
-
$added = $this->addIssue('checkHowGetIPs',
|
595 |
if ($added == wfIssues::ISSUE_ADDED || $added == wfIssues::ISSUE_UPDATED) { $haveIssues = wfIssues::STATUS_PROBLEM; }
|
596 |
else if ($added == wfIssues::ISSUE_IGNOREP || $added == wfIssues::ISSUE_IGNOREC) { $haveIssues = wfIssues::STATUS_IGNORED; }
|
597 |
}
|
@@ -651,7 +655,7 @@ class wfScanEngine {
|
|
651 |
$key = "configReadable" . bin2hex($test->getUrl());
|
652 |
$added = $this->addIssue(
|
653 |
'configReadable',
|
654 |
-
|
655 |
$key,
|
656 |
$key,
|
657 |
'Publicly accessible config, backup, or log file found: ' . esc_html($pathFromRoot),
|
@@ -685,7 +689,7 @@ class wfScanEngine {
|
|
685 |
$key = 'wpscan_fullPathDisclosure' . $testPage;
|
686 |
$added = $this->addIssue(
|
687 |
'wpscan_fullPathDisclosure',
|
688 |
-
|
689 |
$key,
|
690 |
$key,
|
691 |
'Web server exposes the document root',
|
@@ -711,7 +715,7 @@ class wfScanEngine {
|
|
711 |
if ($enabled) {
|
712 |
$added = $this->addIssue(
|
713 |
'wpscan_directoryListingEnabled',
|
714 |
-
|
715 |
'wpscan_directoryListingEnabled',
|
716 |
'wpscan_directoryListingEnabled',
|
717 |
"Directory listing is enabled",
|
@@ -736,7 +740,7 @@ class wfScanEngine {
|
|
736 |
$haveIssues = wfIssues::STATUS_SECURE;
|
737 |
if($result['haveIssues'] && is_array($result['issues']) ){
|
738 |
foreach($result['issues'] as $issue){
|
739 |
-
$added = $this->addIssue($issue['type'],
|
740 |
if ($added == wfIssues::ISSUE_ADDED || $added == wfIssues::ISSUE_UPDATED) { $haveIssues = wfIssues::STATUS_PROBLEM; }
|
741 |
else if ($haveIssues != wfIssues::STATUS_PROBLEM && ($added == wfIssues::ISSUE_IGNOREP || $added == wfIssues::ISSUE_IGNOREC)) { $haveIssues = wfIssues::STATUS_IGNORED; }
|
742 |
}
|
@@ -871,7 +875,7 @@ class wfScanEngine {
|
|
871 |
$key = "publiclyAccessible" . bin2hex($test->getUrl());
|
872 |
$added = $this->addIssue(
|
873 |
'publiclyAccessible',
|
874 |
-
|
875 |
$key,
|
876 |
$key,
|
877 |
'Publicly accessible quarantined file found: ' . esc_html($file),
|
@@ -933,7 +937,7 @@ class wfScanEngine {
|
|
933 |
$found = $this->hoover->hoover($blogID . '-' . $row['ID'], $row['post_title'] . ' ' . $row['post_content'], wordfenceURLHoover::standardExcludedHosts());
|
934 |
$this->scanController->incrementSummaryItem(wfScanner::SUMMARY_SCANNED_URLS, $found);
|
935 |
if (preg_match('/(?:<[\s\n\r\t]*script[\r\s\n\t]+.*>|<[\s\n\r\t]*meta.*refresh)/i', $row['post_title'])) {
|
936 |
-
$this->addIssue('postBadTitle',
|
937 |
'postID' => $postID,
|
938 |
'postTitle' => $row['post_title'],
|
939 |
'permalink' => get_permalink($postID),
|
@@ -1011,7 +1015,7 @@ class wfScanEngine {
|
|
1011 |
}
|
1012 |
$ignoreP = $idString;
|
1013 |
$ignoreC = $idString . $contentMD5;
|
1014 |
-
$added = $this->addIssue('postBadURL',
|
1015 |
'postID' => $postID,
|
1016 |
'badURL' => $result['URL'],
|
1017 |
'postTitle' => $title,
|
@@ -1129,7 +1133,7 @@ class wfScanEngine {
|
|
1129 |
|
1130 |
$ignoreP = $idString;
|
1131 |
$ignoreC = $idString . '-' . $contentMD5;
|
1132 |
-
$added = $this->addIssue('commentBadURL',
|
1133 |
'commentID' => $commentID,
|
1134 |
'badURL' => $result['URL'],
|
1135 |
'author' => $author,
|
@@ -1306,12 +1310,12 @@ class wfScanEngine {
|
|
1306 |
if($this->isEditor($userDat->wp_capabilities)){
|
1307 |
$shortMsg = "User \"" . esc_html($userDat->user_login) . "\" with \"" . esc_html($highCap) . "\" access has an easy password.";
|
1308 |
$longMsg = "A user with the a role of '" . esc_html($highCap) . "' has a password that is easy to guess. Please change this password yourself or ask the user to change it.";
|
1309 |
-
$level =
|
1310 |
$words = $this->dictWords;
|
1311 |
} else {
|
1312 |
$shortMsg = "User \"" . esc_html($userDat->user_login) . "\" with 'subscriber' access has a very easy password.";
|
1313 |
$longMsg = "A user with 'subscriber' access has a password that is very easy to guess. Please either change it or ask the user to change their password.";
|
1314 |
-
$level =
|
1315 |
$words = array($userDat->user_login);
|
1316 |
}
|
1317 |
$haveIssues = wfIssues::STATUS_SECURE;
|
@@ -1381,10 +1385,10 @@ class wfScanEngine {
|
|
1381 |
$freeMegs = round($free / 1024 / 1024, 2);
|
1382 |
$this->status(2, 'info', sprintf(__('The disk has %s MB available', 'wordfence'), $freeMegs));
|
1383 |
if ($freeMegs < 5) {
|
1384 |
-
$level =
|
1385 |
}
|
1386 |
else if ($freeMegs < 20) {
|
1387 |
-
$level =
|
1388 |
}
|
1389 |
else {
|
1390 |
wfIssues::statusEnd($this->statusIDX['diskSpace'], wfIssues::STATUS_SECURE);
|
@@ -1439,7 +1443,7 @@ class wfScanEngine {
|
|
1439 |
$dnsLogged = wfConfig::get('wf_dnsLogged', false);
|
1440 |
$msg = "A change in your DNS records may indicate that a hacker has hacked into your DNS administration system and has pointed your email or website to their own server for malicious purposes. It could also indicate that your domain has expired. If you made this change yourself you can mark it 'resolved' and safely ignore it.";
|
1441 |
if($dnsLogged && $loggedCNAME != $currentCNAME){
|
1442 |
-
$added = $this->addIssue('dnsChange',
|
1443 |
'type' => 'CNAME',
|
1444 |
'host' => $host,
|
1445 |
'oldDNS' => $loggedCNAME,
|
@@ -1467,7 +1471,7 @@ class wfScanEngine {
|
|
1467 |
$loggedA = wfConfig::get('wf_dnsA');
|
1468 |
$dnsLogged = wfConfig::get('wf_dnsLogged', false);
|
1469 |
if($dnsLogged && $loggedA != $currentA){
|
1470 |
-
$added = $this->addIssue('dnsChange',
|
1471 |
'type' => 'A',
|
1472 |
'host' => $host,
|
1473 |
'oldDNS' => $loggedA,
|
@@ -1496,7 +1500,7 @@ class wfScanEngine {
|
|
1496 |
$currentMX = implode(', ', $mxArr);
|
1497 |
$loggedMX = wfConfig::get('wf_dnsMX');
|
1498 |
if($dnsLogged && $loggedMX != $currentMX){
|
1499 |
-
$added = $this->addIssue('dnsChange',
|
1500 |
'type' => 'MX',
|
1501 |
'host' => $host,
|
1502 |
'oldDNS' => $loggedMX,
|
@@ -1596,7 +1600,7 @@ class wfScanEngine {
|
|
1596 |
|
1597 |
// WordPress core updates needed
|
1598 |
if ($this->updateCheck->needsCoreUpdate()) {
|
1599 |
-
$added = $this->addIssue('wfUpgrade',
|
1600 |
'currentVersion' => $this->wp_version,
|
1601 |
'newVersion' => $this->updateCheck->getCoreUpdateVersion(),
|
1602 |
));
|
@@ -1609,10 +1613,10 @@ class wfScanEngine {
|
|
1609 |
// Plugin updates needed
|
1610 |
if (count($this->updateCheck->getPluginUpdates()) > 0) {
|
1611 |
foreach ($this->updateCheck->getPluginUpdates() as $plugin) {
|
1612 |
-
$severity =
|
1613 |
if (isset($plugin['vulnerable'])) {
|
1614 |
if (!$plugin['vulnerable']) {
|
1615 |
-
$severity =
|
1616 |
}
|
1617 |
}
|
1618 |
$key = 'wfPluginUpgrade' . ' ' . $plugin['pluginFile'] . ' ' . $plugin['newVersion'] . ' ' . $plugin['Version'];
|
@@ -1630,10 +1634,10 @@ class wfScanEngine {
|
|
1630 |
// Theme updates needed
|
1631 |
if (count($this->updateCheck->getThemeUpdates()) > 0) {
|
1632 |
foreach ($this->updateCheck->getThemeUpdates() as $theme) {
|
1633 |
-
$severity =
|
1634 |
if (isset($theme['vulnerable'])) {
|
1635 |
if (!$theme['vulnerable']) {
|
1636 |
-
$severity =
|
1637 |
}
|
1638 |
}
|
1639 |
$key = 'wfThemeUpgrade' . ' ' . $theme['Name'] . ' ' . $theme['version'] . ' ' . $theme['newVersion'];
|
@@ -1652,12 +1656,12 @@ class wfScanEngine {
|
|
1652 |
$lastUpdateTimestamp = strtotime($statusArray['last_updated']);
|
1653 |
if ($lastUpdateTimestamp > 0 && (time() - $lastUpdateTimestamp) > 63072000 /* ~2 years */) {
|
1654 |
$statusArray['dateUpdated'] = wfUtils::formatLocalTime(get_option('date_format'), $lastUpdateTimestamp);
|
1655 |
-
$severity =
|
1656 |
$statusArray['abandoned'] = true;
|
1657 |
$statusArray['vulnerable'] = false;
|
1658 |
$vulnerable = $this->updateCheck->isPluginVulnerable($slug, $statusArray['version']);
|
1659 |
if ($vulnerable) {
|
1660 |
-
$severity =
|
1661 |
$statusArray['vulnerable'] = true;
|
1662 |
if (is_string($vulnerable)) {
|
1663 |
$statusArray['vulnerabilityLink'] = $vulnerable;
|
@@ -1719,7 +1723,7 @@ class wfScanEngine {
|
|
1719 |
$longMsg = 'It may have compatibility problems with the current version of WordPress or unknown security issues.';
|
1720 |
}
|
1721 |
$longMsg .= ' <a href="' . wfSupportController::esc_supportURL(wfSupportController::ITEM_SCAN_RESULT_PLUGIN_REMOVED) . '" target="_blank" rel="noopener noreferrer">Get more information.</a>';
|
1722 |
-
$added = $this->addIssue('wfPluginRemoved',
|
1723 |
if ($added == wfIssues::ISSUE_ADDED || $added == wfIssues::ISSUE_UPDATED) { $haveIssues = wfIssues::STATUS_PROBLEM; }
|
1724 |
else if ($haveIssues != wfIssues::STATUS_PROBLEM && ($added == wfIssues::ISSUE_IGNOREP || $added == wfIssues::ISSUE_IGNOREC)) { $haveIssues = wfIssues::STATUS_IGNORED; }
|
1725 |
|
@@ -1769,7 +1773,7 @@ class wfScanEngine {
|
|
1769 |
$this->scanController->incrementSummaryItem(wfScanner::SUMMARY_SCANNED_USERS);
|
1770 |
$user = new WP_User($userID);
|
1771 |
$key = 'suspiciousAdminUsers' . $userID;
|
1772 |
-
$added = $this->addIssue('suspiciousAdminUsers',
|
1773 |
"An admin user with the username " . esc_html($user->user_login) . " was created outside of WordPress.",
|
1774 |
"An admin user with the username " . esc_html($user->user_login) . " was created outside of WordPress. It's
|
1775 |
possible a plugin could have created the account, but if you do not recognize the user, we suggest you remove
|
@@ -1873,7 +1877,7 @@ class wfScanEngine {
|
|
1873 |
|
1874 |
$ignoreP = $idString;
|
1875 |
$ignoreC = $idString . md5(serialize(get_option($optionKey, '')));
|
1876 |
-
$added = $this->addIssue('optionBadURL',
|
1877 |
'optionKey' => $optionKey,
|
1878 |
'badURL' => $result['URL'],
|
1879 |
'isMultisite' => $blog['isMultisite'],
|
@@ -1908,7 +1912,7 @@ class wfScanEngine {
|
|
1908 |
|
1909 |
$ignoreP = 'geoIPPHPDiscontinuing';
|
1910 |
$ignoreC = $ignoreP;
|
1911 |
-
$added = $this->addIssue('geoipSupport',
|
1912 |
if ($added == wfIssues::ISSUE_ADDED || $added == wfIssues::ISSUE_UPDATED) { $haveIssues = wfIssues::STATUS_PROBLEM; }
|
1913 |
else if ($haveIssues != wfIssues::STATUS_PROBLEM && ($added == wfIssues::ISSUE_IGNOREP || $added == wfIssues::ISSUE_IGNOREC)) { $haveIssues = wfIssues::STATUS_IGNORED; }
|
1914 |
}
|
@@ -1996,6 +2000,9 @@ class wfScanEngine {
|
|
1996 |
'sslverify' => false,
|
1997 |
'headers' => $headers
|
1998 |
));
|
|
|
|
|
|
|
1999 |
}
|
2000 |
catch (Exception $e) {
|
2001 |
wfConfig::set('lastScanCompleted', $e->getMessage());
|
@@ -2026,6 +2033,9 @@ class wfScanEngine {
|
|
2026 |
'sslverify' => false,
|
2027 |
'headers' => $headers
|
2028 |
));
|
|
|
|
|
|
|
2029 |
}
|
2030 |
catch (Exception $e) {
|
2031 |
wfConfig::set('lastScanCompleted', $e->getMessage());
|
204 |
}
|
205 |
|
206 |
wfScanEngine::refreshScanNotification($this->i);
|
207 |
+
|
208 |
+
if (wfCentral::isConnected()) {
|
209 |
+
wfCentral::updateScanStatus();
|
210 |
+
}
|
211 |
}
|
212 |
catch (wfScanEngineDurationLimitException $e) {
|
213 |
wfConfig::set('lastScanCompleted', $e->getMessage());
|
273 |
|
274 |
if ((time() - $this->startTime) > $timeLimit){
|
275 |
$error = 'The scan time limit of ' . wfUtils::makeDuration($timeLimit) . ' has been exceeded and the scan will be terminated. This limit can be customized on the options page. <a href="' . wfSupportController::esc_supportURL(wfSupportController::ITEM_SCAN_TIME_LIMIT) . '" target="_blank" rel="noopener noreferrer">Get More Information</a>';
|
276 |
+
$this->addIssue('timelimit', wfIssues::SEVERITY_HIGH, md5($this->startTime), md5($this->startTime), 'Scan Time Limit Exceeded', $error, array());
|
277 |
|
278 |
$this->status(1, 'info', '-------------------');
|
279 |
$this->status(1, 'info', "Scan interrupted. Scanned " . $this->scanController->getSummaryItem(wfScanner::SUMMARY_SCANNED_FILES, 0) . " files, " . $this->scanController->getSummaryItem(wfScanner::SUMMARY_SCANNED_PLUGINS, 0) . " plugins, " . $this->scanController->getSummaryItem(wfScanner::SUMMARY_SCANNED_THEMES, 0) . " themes, " . $this->scanController->getSummaryItem(wfScanner::SUMMARY_SCANNED_POSTS, 0) . " posts, " . $this->scanController->getSummaryItem(wfScanner::SUMMARY_SCANNED_COMMENTS, 0) . " comments and " . $this->scanController->getSummaryItem(wfScanner::SUMMARY_SCANNED_URLS, 0) . " URLs in " . wfUtils::makeDuration(time() - $this->startTime, true) . ".");
|
401 |
$haveIssues = wfIssues::STATUS_SECURE;
|
402 |
if(!empty($result['haveIssues']) && is_array($result['issues']) ){
|
403 |
foreach($result['issues'] as $issue){
|
404 |
+
$added = $this->addIssue($issue['type'], wfIssues::SEVERITY_HIGH, $issue['ignoreP'], $issue['ignoreC'], $issue['shortMsg'], $issue['longMsg'], $issue['data']);
|
405 |
if ($added == wfIssues::ISSUE_ADDED || $added == wfIssues::ISSUE_UPDATED) { $haveIssues = wfIssues::STATUS_PROBLEM; }
|
406 |
else if ($added == wfIssues::ISSUE_IGNOREP || $added == wfIssues::ISSUE_IGNOREC) { $haveIssues = wfIssues::STATUS_IGNORED; }
|
407 |
}
|
537 |
$data['gsb'] = 'unknown';
|
538 |
}
|
539 |
|
540 |
+
$added = $this->addIssue('checkGSB', wfIssues::SEVERITY_CRITICAL, 'checkGSB', 'checkGSB' . $url, $shortMsg, $longMsg, $data);
|
541 |
if ($added == wfIssues::ISSUE_ADDED || $added == wfIssues::ISSUE_UPDATED) { $haveIssues = wfIssues::STATUS_PROBLEM; }
|
542 |
else if ($haveIssues != wfIssues::STATUS_PROBLEM && ($added == wfIssues::ISSUE_IGNOREP || $added == wfIssues::ISSUE_IGNOREC)) { $haveIssues = wfIssues::STATUS_IGNORED; }
|
543 |
}
|
576 |
$haveIssues = wfIssues::STATUS_FAILED;
|
577 |
}
|
578 |
else if ($recommendation == 'UNKNOWN') {
|
579 |
+
$added = $this->addIssue('checkHowGetIPs', wfIssues::SEVERITY_HIGH, 'checkHowGetIPs', 'checkHowGetIPs' . $recommendation . WORDFENCE_VERSION, "Unable to accurately detect IPs", 'Wordfence was unable to validate a test request to your website. This can happen if your website is behind a proxy that does not use one of the standard ways to convey the IP of the request or it is unreachable publicly. IP blocking and live traffic information may not be accurate. <a href="' . wfSupportController::esc_supportURL(wfSupportController::ITEM_NOTICE_MISCONFIGURED_HOW_GET_IPS) . '" target="_blank" rel="noopener noreferrer">Get More Information</a>', array());
|
580 |
if ($added == wfIssues::ISSUE_ADDED || $added == wfIssues::ISSUE_UPDATED) { $haveIssues = wfIssues::STATUS_PROBLEM; }
|
581 |
else if ($added == wfIssues::ISSUE_IGNOREP || $added == wfIssues::ISSUE_IGNOREC) { $haveIssues = wfIssues::STATUS_IGNORED; }
|
582 |
}
|
595 |
$extraMsg = ' This site appears to be behind Cloudflare, so using the Cloudflare "CF-Connecting-IP" HTTP header will resolve to the correct IPs.';
|
596 |
}
|
597 |
|
598 |
+
$added = $this->addIssue('checkHowGetIPs', wfIssues::SEVERITY_HIGH, 'checkHowGetIPs', 'checkHowGetIPs' . $recommendation . WORDFENCE_VERSION, "'How does Wordfence get IPs' is misconfigured", 'A test request to this website was detected on a different value for this setting. IP blocking and live traffic information may not be accurate. <a href="' . wfSupportController::esc_supportURL(wfSupportController::ITEM_NOTICE_MISCONFIGURED_HOW_GET_IPS) . '" target="_blank" rel="noopener noreferrer">Get More Information</a>' . $extraMsg, array('recommendation' => $recommendation));
|
599 |
if ($added == wfIssues::ISSUE_ADDED || $added == wfIssues::ISSUE_UPDATED) { $haveIssues = wfIssues::STATUS_PROBLEM; }
|
600 |
else if ($added == wfIssues::ISSUE_IGNOREP || $added == wfIssues::ISSUE_IGNOREC) { $haveIssues = wfIssues::STATUS_IGNORED; }
|
601 |
}
|
655 |
$key = "configReadable" . bin2hex($test->getUrl());
|
656 |
$added = $this->addIssue(
|
657 |
'configReadable',
|
658 |
+
wfIssues::SEVERITY_CRITICAL,
|
659 |
$key,
|
660 |
$key,
|
661 |
'Publicly accessible config, backup, or log file found: ' . esc_html($pathFromRoot),
|
689 |
$key = 'wpscan_fullPathDisclosure' . $testPage;
|
690 |
$added = $this->addIssue(
|
691 |
'wpscan_fullPathDisclosure',
|
692 |
+
wfIssues::SEVERITY_HIGH,
|
693 |
$key,
|
694 |
$key,
|
695 |
'Web server exposes the document root',
|
715 |
if ($enabled) {
|
716 |
$added = $this->addIssue(
|
717 |
'wpscan_directoryListingEnabled',
|
718 |
+
wfIssues::SEVERITY_HIGH,
|
719 |
'wpscan_directoryListingEnabled',
|
720 |
'wpscan_directoryListingEnabled',
|
721 |
"Directory listing is enabled",
|
740 |
$haveIssues = wfIssues::STATUS_SECURE;
|
741 |
if($result['haveIssues'] && is_array($result['issues']) ){
|
742 |
foreach($result['issues'] as $issue){
|
743 |
+
$added = $this->addIssue($issue['type'], wfIssues::SEVERITY_CRITICAL, $issue['ignoreP'], $issue['ignoreC'], $issue['shortMsg'], $issue['longMsg'], $issue['data']);
|
744 |
if ($added == wfIssues::ISSUE_ADDED || $added == wfIssues::ISSUE_UPDATED) { $haveIssues = wfIssues::STATUS_PROBLEM; }
|
745 |
else if ($haveIssues != wfIssues::STATUS_PROBLEM && ($added == wfIssues::ISSUE_IGNOREP || $added == wfIssues::ISSUE_IGNOREC)) { $haveIssues = wfIssues::STATUS_IGNORED; }
|
746 |
}
|
875 |
$key = "publiclyAccessible" . bin2hex($test->getUrl());
|
876 |
$added = $this->addIssue(
|
877 |
'publiclyAccessible',
|
878 |
+
wfIssues::SEVERITY_HIGH,
|
879 |
$key,
|
880 |
$key,
|
881 |
'Publicly accessible quarantined file found: ' . esc_html($file),
|
937 |
$found = $this->hoover->hoover($blogID . '-' . $row['ID'], $row['post_title'] . ' ' . $row['post_content'], wordfenceURLHoover::standardExcludedHosts());
|
938 |
$this->scanController->incrementSummaryItem(wfScanner::SUMMARY_SCANNED_URLS, $found);
|
939 |
if (preg_match('/(?:<[\s\n\r\t]*script[\r\s\n\t]+.*>|<[\s\n\r\t]*meta.*refresh)/i', $row['post_title'])) {
|
940 |
+
$this->addIssue('postBadTitle', wfIssues::SEVERITY_HIGH, $row['ID'], md5($row['post_title']), "Post title contains suspicious code", "This post contains code that is suspicious. Please check the title of the post and confirm that the code in the title is not malicious.", array(
|
941 |
'postID' => $postID,
|
942 |
'postTitle' => $row['post_title'],
|
943 |
'permalink' => get_permalink($postID),
|
1015 |
}
|
1016 |
$ignoreP = $idString;
|
1017 |
$ignoreC = $idString . $contentMD5;
|
1018 |
+
$added = $this->addIssue('postBadURL', wfIssues::SEVERITY_HIGH, $ignoreP, $ignoreC, $shortMsg, $longMsg, array(
|
1019 |
'postID' => $postID,
|
1020 |
'badURL' => $result['URL'],
|
1021 |
'postTitle' => $title,
|
1133 |
|
1134 |
$ignoreP = $idString;
|
1135 |
$ignoreC = $idString . '-' . $contentMD5;
|
1136 |
+
$added = $this->addIssue('commentBadURL', wfIssues::SEVERITY_LOW, $ignoreP, $ignoreC, $shortMsg, $longMsg, array(
|
1137 |
'commentID' => $commentID,
|
1138 |
'badURL' => $result['URL'],
|
1139 |
'author' => $author,
|
1310 |
if($this->isEditor($userDat->wp_capabilities)){
|
1311 |
$shortMsg = "User \"" . esc_html($userDat->user_login) . "\" with \"" . esc_html($highCap) . "\" access has an easy password.";
|
1312 |
$longMsg = "A user with the a role of '" . esc_html($highCap) . "' has a password that is easy to guess. Please change this password yourself or ask the user to change it.";
|
1313 |
+
$level = wfIssues::SEVERITY_CRITICAL;
|
1314 |
$words = $this->dictWords;
|
1315 |
} else {
|
1316 |
$shortMsg = "User \"" . esc_html($userDat->user_login) . "\" with 'subscriber' access has a very easy password.";
|
1317 |
$longMsg = "A user with 'subscriber' access has a password that is very easy to guess. Please either change it or ask the user to change their password.";
|
1318 |
+
$level = wfIssues::SEVERITY_HIGH;
|
1319 |
$words = array($userDat->user_login);
|
1320 |
}
|
1321 |
$haveIssues = wfIssues::STATUS_SECURE;
|
1385 |
$freeMegs = round($free / 1024 / 1024, 2);
|
1386 |
$this->status(2, 'info', sprintf(__('The disk has %s MB available', 'wordfence'), $freeMegs));
|
1387 |
if ($freeMegs < 5) {
|
1388 |
+
$level = wfIssues::SEVERITY_CRITICAL;
|
1389 |
}
|
1390 |
else if ($freeMegs < 20) {
|
1391 |
+
$level = wfIssues::SEVERITY_HIGH;
|
1392 |
}
|
1393 |
else {
|
1394 |
wfIssues::statusEnd($this->statusIDX['diskSpace'], wfIssues::STATUS_SECURE);
|
1443 |
$dnsLogged = wfConfig::get('wf_dnsLogged', false);
|
1444 |
$msg = "A change in your DNS records may indicate that a hacker has hacked into your DNS administration system and has pointed your email or website to their own server for malicious purposes. It could also indicate that your domain has expired. If you made this change yourself you can mark it 'resolved' and safely ignore it.";
|
1445 |
if($dnsLogged && $loggedCNAME != $currentCNAME){
|
1446 |
+
$added = $this->addIssue('dnsChange', wfIssues::SEVERITY_HIGH, 'dnsChanges', 'dnsChanges' . $currentCNAME, "Your DNS records have changed", "We have detected a change in the CNAME records of your DNS configuration for the domain $host. A CNAME record is an alias that is used to point a domain name to another domain name. For example foo.example.com can point to bar.example.com which then points to an IP address of 10.1.1.1. $msg", array(
|
1447 |
'type' => 'CNAME',
|
1448 |
'host' => $host,
|
1449 |
'oldDNS' => $loggedCNAME,
|
1471 |
$loggedA = wfConfig::get('wf_dnsA');
|
1472 |
$dnsLogged = wfConfig::get('wf_dnsLogged', false);
|
1473 |
if($dnsLogged && $loggedA != $currentA){
|
1474 |
+
$added = $this->addIssue('dnsChange', wfIssues::SEVERITY_HIGH, 'dnsChanges', 'dnsChanges' . $currentA, "Your DNS records have changed", "We have detected a change in the A records of your DNS configuration that may affect the domain $host. An A record is a record in DNS that points a domain name to an IP address. $msg", array(
|
1475 |
'type' => 'A',
|
1476 |
'host' => $host,
|
1477 |
'oldDNS' => $loggedA,
|
1500 |
$currentMX = implode(', ', $mxArr);
|
1501 |
$loggedMX = wfConfig::get('wf_dnsMX');
|
1502 |
if($dnsLogged && $loggedMX != $currentMX){
|
1503 |
+
$added = $this->addIssue('dnsChange', wfIssues::SEVERITY_HIGH, 'dnsChanges', 'dnsChanges' . $currentMX, "Your DNS records have changed", "We have detected a change in the email server (MX) records of your DNS configuration for the domain $host. $msg", array(
|
1504 |
'type' => 'MX',
|
1505 |
'host' => $host,
|
1506 |
'oldDNS' => $loggedMX,
|
1600 |
|
1601 |
// WordPress core updates needed
|
1602 |
if ($this->updateCheck->needsCoreUpdate()) {
|
1603 |
+
$added = $this->addIssue('wfUpgrade', wfIssues::SEVERITY_HIGH, 'wfUpgrade' . $this->updateCheck->getCoreUpdateVersion(), 'wfUpgrade' . $this->updateCheck->getCoreUpdateVersion(), "Your WordPress version is out of date", "WordPress version " . esc_html($this->updateCheck->getCoreUpdateVersion()) . " is now available. Please upgrade immediately to get the latest security updates from WordPress.", array(
|
1604 |
'currentVersion' => $this->wp_version,
|
1605 |
'newVersion' => $this->updateCheck->getCoreUpdateVersion(),
|
1606 |
));
|
1613 |
// Plugin updates needed
|
1614 |
if (count($this->updateCheck->getPluginUpdates()) > 0) {
|
1615 |
foreach ($this->updateCheck->getPluginUpdates() as $plugin) {
|
1616 |
+
$severity = wfIssues::SEVERITY_CRITICAL;
|
1617 |
if (isset($plugin['vulnerable'])) {
|
1618 |
if (!$plugin['vulnerable']) {
|
1619 |
+
$severity = wfIssues::SEVERITY_MEDIUM;
|
1620 |
}
|
1621 |
}
|
1622 |
$key = 'wfPluginUpgrade' . ' ' . $plugin['pluginFile'] . ' ' . $plugin['newVersion'] . ' ' . $plugin['Version'];
|
1634 |
// Theme updates needed
|
1635 |
if (count($this->updateCheck->getThemeUpdates()) > 0) {
|
1636 |
foreach ($this->updateCheck->getThemeUpdates() as $theme) {
|
1637 |
+
$severity = wfIssues::SEVERITY_CRITICAL;
|
1638 |
if (isset($theme['vulnerable'])) {
|
1639 |
if (!$theme['vulnerable']) {
|
1640 |
+
$severity = wfIssues::SEVERITY_MEDIUM;
|
1641 |
}
|
1642 |
}
|
1643 |
$key = 'wfThemeUpgrade' . ' ' . $theme['Name'] . ' ' . $theme['version'] . ' ' . $theme['newVersion'];
|
1656 |
$lastUpdateTimestamp = strtotime($statusArray['last_updated']);
|
1657 |
if ($lastUpdateTimestamp > 0 && (time() - $lastUpdateTimestamp) > 63072000 /* ~2 years */) {
|
1658 |
$statusArray['dateUpdated'] = wfUtils::formatLocalTime(get_option('date_format'), $lastUpdateTimestamp);
|
1659 |
+
$severity = wfIssues::SEVERITY_MEDIUM;
|
1660 |
$statusArray['abandoned'] = true;
|
1661 |
$statusArray['vulnerable'] = false;
|
1662 |
$vulnerable = $this->updateCheck->isPluginVulnerable($slug, $statusArray['version']);
|
1663 |
if ($vulnerable) {
|
1664 |
+
$severity = wfIssues::SEVERITY_CRITICAL;
|
1665 |
$statusArray['vulnerable'] = true;
|
1666 |
if (is_string($vulnerable)) {
|
1667 |
$statusArray['vulnerabilityLink'] = $vulnerable;
|
1723 |
$longMsg = 'It may have compatibility problems with the current version of WordPress or unknown security issues.';
|
1724 |
}
|
1725 |
$longMsg .= ' <a href="' . wfSupportController::esc_supportURL(wfSupportController::ITEM_SCAN_RESULT_PLUGIN_REMOVED) . '" target="_blank" rel="noopener noreferrer">Get more information.</a>';
|
1726 |
+
$added = $this->addIssue('wfPluginRemoved', wfIssues::SEVERITY_CRITICAL, $key, $key, $shortMsg, $longMsg, $pluginData);
|
1727 |
if ($added == wfIssues::ISSUE_ADDED || $added == wfIssues::ISSUE_UPDATED) { $haveIssues = wfIssues::STATUS_PROBLEM; }
|
1728 |
else if ($haveIssues != wfIssues::STATUS_PROBLEM && ($added == wfIssues::ISSUE_IGNOREP || $added == wfIssues::ISSUE_IGNOREC)) { $haveIssues = wfIssues::STATUS_IGNORED; }
|
1729 |
|
1773 |
$this->scanController->incrementSummaryItem(wfScanner::SUMMARY_SCANNED_USERS);
|
1774 |
$user = new WP_User($userID);
|
1775 |
$key = 'suspiciousAdminUsers' . $userID;
|
1776 |
+
$added = $this->addIssue('suspiciousAdminUsers', wfIssues::SEVERITY_HIGH, $key, $key,
|
1777 |
"An admin user with the username " . esc_html($user->user_login) . " was created outside of WordPress.",
|
1778 |
"An admin user with the username " . esc_html($user->user_login) . " was created outside of WordPress. It's
|
1779 |
possible a plugin could have created the account, but if you do not recognize the user, we suggest you remove
|
1877 |
|
1878 |
$ignoreP = $idString;
|
1879 |
$ignoreC = $idString . md5(serialize(get_option($optionKey, '')));
|
1880 |
+
$added = $this->addIssue('optionBadURL', wfIssues::SEVERITY_HIGH, $ignoreP, $ignoreC, $shortMsg, $longMsg, array(
|
1881 |
'optionKey' => $optionKey,
|
1882 |
'badURL' => $result['URL'],
|
1883 |
'isMultisite' => $blog['isMultisite'],
|
1912 |
|
1913 |
$ignoreP = 'geoIPPHPDiscontinuing';
|
1914 |
$ignoreC = $ignoreP;
|
1915 |
+
$added = $this->addIssue('geoipSupport', wfIssues::SEVERITY_MEDIUM, $ignoreP, $ignoreC, $shortMsg, $longMsg, array());
|
1916 |
if ($added == wfIssues::ISSUE_ADDED || $added == wfIssues::ISSUE_UPDATED) { $haveIssues = wfIssues::STATUS_PROBLEM; }
|
1917 |
else if ($haveIssues != wfIssues::STATUS_PROBLEM && ($added == wfIssues::ISSUE_IGNOREP || $added == wfIssues::ISSUE_IGNOREC)) { $haveIssues = wfIssues::STATUS_IGNORED; }
|
1918 |
}
|
2000 |
'sslverify' => false,
|
2001 |
'headers' => $headers
|
2002 |
));
|
2003 |
+
if (wfCentral::isConnected()) {
|
2004 |
+
wfCentral::updateScanStatus();
|
2005 |
+
}
|
2006 |
}
|
2007 |
catch (Exception $e) {
|
2008 |
wfConfig::set('lastScanCompleted', $e->getMessage());
|
2033 |
'sslverify' => false,
|
2034 |
'headers' => $headers
|
2035 |
));
|
2036 |
+
if (wfCentral::isConnected()) {
|
2037 |
+
wfCentral::updateScanStatus();
|
2038 |
+
}
|
2039 |
}
|
2040 |
catch (Exception $e) {
|
2041 |
wfConfig::set('lastScanCompleted', $e->getMessage());
|
lib/wfUtils.php
CHANGED
@@ -890,6 +890,24 @@ class wfUtils {
|
|
890 |
return false;
|
891 |
}
|
892 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
893 |
public static function getIPAndServerVariable($howGet = null, $trustedProxies = null) {
|
894 |
$connectionIP = array_key_exists('REMOTE_ADDR', $_SERVER) ? array($_SERVER['REMOTE_ADDR'], 'REMOTE_ADDR') : array('127.0.0.1', 'REMOTE_ADDR');
|
895 |
|
@@ -1204,6 +1222,9 @@ class wfUtils {
|
|
1204 |
|
1205 |
wfConfig::set('wf_scanRunning', '');
|
1206 |
wfIssues::updateScanStillRunning(false);
|
|
|
|
|
|
|
1207 |
}
|
1208 |
public static function getIPGeo($IP){ //Works with int or dotted
|
1209 |
|
890 |
return false;
|
891 |
}
|
892 |
|
893 |
+
public static function getAllServerVariableIPs()
|
894 |
+
{
|
895 |
+
$variables = array('REMOTE_ADDR', 'HTTP_CF_CONNECTING_IP', 'HTTP_X_REAL_IP', 'HTTP_X_FORWARDED_FOR');
|
896 |
+
$ips = array();
|
897 |
+
|
898 |
+
foreach ($variables as $variable) {
|
899 |
+
$ip = isset($_SERVER[$variable]) ? $_SERVER[$variable] : false;
|
900 |
+
|
901 |
+
if ($ip && strpos($ip, ',') !== false) {
|
902 |
+
$ips[$variable] = preg_replace('/[\s,]/', '', explode(',', $ip));
|
903 |
+
} else {
|
904 |
+
$ips[$variable] = $ip;
|
905 |
+
}
|
906 |
+
}
|
907 |
+
|
908 |
+
return $ips;
|
909 |
+
}
|
910 |
+
|
911 |
public static function getIPAndServerVariable($howGet = null, $trustedProxies = null) {
|
912 |
$connectionIP = array_key_exists('REMOTE_ADDR', $_SERVER) ? array($_SERVER['REMOTE_ADDR'], 'REMOTE_ADDR') : array('127.0.0.1', 'REMOTE_ADDR');
|
913 |
|
1222 |
|
1223 |
wfConfig::set('wf_scanRunning', '');
|
1224 |
wfIssues::updateScanStillRunning(false);
|
1225 |
+
if (wfCentral::isConnected()) {
|
1226 |
+
wfCentral::updateScanStatus();
|
1227 |
+
}
|
1228 |
}
|
1229 |
public static function getIPGeo($IP){ //Works with int or dotted
|
1230 |
|
lib/wordfenceClass.php
CHANGED
@@ -41,9 +41,17 @@ require_once(dirname(__FILE__) . '/wfVersionCheckController.php');
|
|
41 |
require_once(dirname(__FILE__) . '/wfDateLocalization.php');
|
42 |
require_once(dirname(__FILE__) . '/wfAdminNoticeQueue.php');
|
43 |
|
|
|
|
|
|
|
44 |
if (class_exists('WP_REST_Users_Controller')) { //WP 4.7+
|
45 |
require_once('wfRESTAPI.php');
|
46 |
}
|
|
|
|
|
|
|
|
|
|
|
47 |
|
48 |
class wordfence {
|
49 |
public static $printStatus = false;
|
@@ -107,6 +115,10 @@ class wordfence {
|
|
107 |
}
|
108 |
|
109 |
if(wfConfig::get('deleteTablesOnDeact')){
|
|
|
|
|
|
|
|
|
110 |
wfConfig::updateTableExists(false);
|
111 |
$schema = new wfSchema();
|
112 |
$schema->dropAll();
|
@@ -220,7 +232,10 @@ class wordfence {
|
|
220 |
wfScanner::shared()->scheduleScans();
|
221 |
}
|
222 |
}
|
223 |
-
|
|
|
|
|
|
|
224 |
wfConfig::set('keyType', $keyType);
|
225 |
}
|
226 |
catch(Exception $e){
|
@@ -961,9 +976,52 @@ SQL
|
|
961 |
$wpdb->query($wpdb->prepare("UPDATE `{$blocksTable}` SET `parameters` = %s WHERE `id` = %d", json_encode($parameters), $b->id));
|
962 |
}
|
963 |
}
|
964 |
-
|
965 |
wfConfig::set('needsGeoIPSync', true, wfConfig::DONT_AUTOLOAD);
|
966 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
967 |
//Check the How does Wordfence get IPs setting
|
968 |
wfUtils::requestDetectProxyCallback();
|
969 |
|
@@ -1199,6 +1257,8 @@ SQL
|
|
1199 |
add_filter('update_feedback', 'wordfence::restoreReadmeForUpgrade');
|
1200 |
}
|
1201 |
|
|
|
|
|
1202 |
}
|
1203 |
public static function _pluginPageActionLinks($links) {
|
1204 |
if (!wfConfig::get('isPaid')) {
|
@@ -4964,6 +5024,10 @@ HTACCESS;
|
|
4964 |
self::ajax_lh_callback();
|
4965 |
exit;
|
4966 |
}
|
|
|
|
|
|
|
|
|
4967 |
|
4968 |
$wfFunc = !empty($_GET['_wfsf']) && is_string($_GET['_wfsf']) ? $_GET['_wfsf'] : '';
|
4969 |
|
@@ -5480,15 +5544,18 @@ HTML;
|
|
5480 |
'saveOptions', 'restoreDefaults', 'enableAllOptionsPage', 'createBlock', 'deleteBlocks', 'makePermanentBlocks', 'getBlocks',
|
5481 |
'installAutoPrepend', 'uninstallAutoPrepend',
|
5482 |
'installLicense', 'recordTOUPP', 'mailingSignup',
|
|
|
5483 |
) as $func){
|
5484 |
add_action('wp_ajax_wordfence_' . $func, 'wordfence::ajaxReceiver');
|
5485 |
}
|
|
|
|
|
5486 |
|
5487 |
if(isset($_GET['page']) && preg_match('/^Wordfence/', @$_GET['page']) ){
|
5488 |
wp_enqueue_style('wp-pointer');
|
5489 |
wp_enqueue_script('wp-pointer');
|
5490 |
wp_enqueue_style('wordfence-font', wfUtils::getBaseURL() . wfUtils::versionedAsset('css/wf-roboto-font.css'), '', WORDFENCE_VERSION);
|
5491 |
-
wp_enqueue_style('wordfence-font-awesome-style'
|
5492 |
wp_enqueue_style('wordfence-main-style', wfUtils::getBaseURL() . wfUtils::versionedAsset('css/main.css'), '', WORDFENCE_VERSION);
|
5493 |
wp_enqueue_style('wordfence-ionicons-style', wfUtils::getBaseURL() . wfUtils::versionedAsset('css/wf-ionicons.css'), '', WORDFENCE_VERSION);
|
5494 |
wp_enqueue_style('wordfence-colorbox-style', wfUtils::getBaseURL() . wfUtils::versionedAsset('css/wf-colorbox.css'), '', WORDFENCE_VERSION);
|
@@ -5513,6 +5580,8 @@ HTML;
|
|
5513 |
wp_enqueue_style('wp-pointer');
|
5514 |
wp_enqueue_script('wp-pointer');
|
5515 |
wp_enqueue_script('wordfenceAdminExtjs', wfUtils::getBaseURL() . wfUtils::versionedAsset('js/wfglobal.js'), array('jquery'), WORDFENCE_VERSION);
|
|
|
|
|
5516 |
self::setupAdminVars();
|
5517 |
}
|
5518 |
|
@@ -5755,12 +5824,15 @@ HTML;
|
|
5755 |
add_submenu_page("Wordfence", "All Options", "All Options", "activate_plugins", "WordfenceOptions", 'wordfence::menu_options');
|
5756 |
}
|
5757 |
add_submenu_page('Wordfence', 'Help', 'Help', 'activate_plugins', 'WordfenceSupport', 'wordfence::menu_support');
|
5758 |
-
|
|
|
|
|
|
|
5759 |
if (wfConfig::get('isPaid')) {
|
5760 |
-
add_submenu_page("Wordfence", "Protect More Sites", "<strong id=\"wfMenuCallout\" style=\"color: #FCB214;\">Protect More Sites</strong>", "activate_plugins", "WordfenceProtectMoreSites", 'wordfence::
|
5761 |
}
|
5762 |
else {
|
5763 |
-
add_submenu_page("Wordfence", "Upgrade To Premium", "<strong id=\"wfMenuCallout\" style=\"color: #FCB214;\">Upgrade To Premium</strong>", "activate_plugins", "WordfenceUpgradeToPremium", 'wordfence::
|
5764 |
}
|
5765 |
add_filter('clean_url', 'wordfence::_patchWordfenceSubmenuCallout', 10, 3);
|
5766 |
}
|
@@ -5775,6 +5847,9 @@ HTML;
|
|
5775 |
}
|
5776 |
return $url;
|
5777 |
}
|
|
|
|
|
|
|
5778 |
public static function _retargetWordfenceSubmenuCallout() {
|
5779 |
echo <<<JQUERY
|
5780 |
<script type="text/javascript">
|
@@ -6045,6 +6120,15 @@ JQUERY;
|
|
6045 |
require('menu_support.php');
|
6046 |
}
|
6047 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6048 |
public static function fsActionRestoreFileCallback() {
|
6049 |
$issueID = filter_input(INPUT_GET, 'issueID', FILTER_SANITIZE_NUMBER_INT);
|
6050 |
$response = self::ajax_restoreFile_callback($issueID);
|
@@ -8013,8 +8097,263 @@ if (file_exists(%1$s)) {
|
|
8013 |
if (!$output) { ob_end_clean(); }
|
8014 |
return true;
|
8015 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8016 |
}
|
8017 |
|
|
|
8018 |
class wfWAFAutoPrependHelper {
|
8019 |
|
8020 |
private $serverConfig;
|
41 |
require_once(dirname(__FILE__) . '/wfDateLocalization.php');
|
42 |
require_once(dirname(__FILE__) . '/wfAdminNoticeQueue.php');
|
43 |
|
44 |
+
require_once('wfJWT.php');
|
45 |
+
require_once('wfCentralAPI.php');
|
46 |
+
|
47 |
if (class_exists('WP_REST_Users_Controller')) { //WP 4.7+
|
48 |
require_once('wfRESTAPI.php');
|
49 |
}
|
50 |
+
if (wfCentral::isSupported()) { //WP 4.4.0+
|
51 |
+
require_once('rest-api/wfRESTAuthenticationController.php');
|
52 |
+
require_once('rest-api/wfRESTConfigController.php');
|
53 |
+
require_once('rest-api/wfRESTScanController.php');
|
54 |
+
}
|
55 |
|
56 |
class wordfence {
|
57 |
public static $printStatus = false;
|
115 |
}
|
116 |
|
117 |
if(wfConfig::get('deleteTablesOnDeact')){
|
118 |
+
if (wfCentral::isSupported() && wfCentral::isConnected()) {
|
119 |
+
self::ajax_wfcentral_disconnect_callback();
|
120 |
+
}
|
121 |
+
|
122 |
wfConfig::updateTableExists(false);
|
123 |
$schema = new wfSchema();
|
124 |
$schema->dropAll();
|
232 |
wfScanner::shared()->scheduleScans();
|
233 |
}
|
234 |
}
|
235 |
+
if (isset($keyData['showWfCentralUI'])) {
|
236 |
+
wfConfig::set('showWfCentralUI', (int) $keyData['showWfCentralUI']);
|
237 |
+
}
|
238 |
+
|
239 |
wfConfig::set('keyType', $keyType);
|
240 |
}
|
241 |
catch(Exception $e){
|
976 |
$wpdb->query($wpdb->prepare("UPDATE `{$blocksTable}` SET `parameters` = %s WHERE `id` = %d", json_encode($parameters), $b->id));
|
977 |
}
|
978 |
}
|
979 |
+
|
980 |
wfConfig::set('needsGeoIPSync', true, wfConfig::DONT_AUTOLOAD);
|
981 |
+
|
982 |
+
// Set the default scan options based on scan type.
|
983 |
+
if (!wfConfig::get('config720Migration', false)) {
|
984 |
+
// Replace critical/warning checkboxes with setting based on numeric severity value.
|
985 |
+
$alertOnCritical = wfConfig::get('alertOn_critical');
|
986 |
+
$alertOnWarnings = wfConfig::get('alertOn_warnings');
|
987 |
+
wfConfig::set('alertOn_scanIssues', $alertOnCritical || $alertOnWarnings);
|
988 |
+
if ($alertOnCritical && ! $alertOnWarnings) {
|
989 |
+
wfConfig::set('alertOn_severityLevel', wfIssues::SEVERITY_HIGH);
|
990 |
+
} else {
|
991 |
+
wfConfig::set('alertOn_severityLevel', wfIssues::SEVERITY_LOW);
|
992 |
+
}
|
993 |
+
|
994 |
+
// Update severity for existing issues where they are still using the old severity values.
|
995 |
+
foreach (wfIssues::$issueSeverities as $issueType => $severity) {
|
996 |
+
$wpdb->query($wpdb->prepare("UPDATE $issuesTable SET severity = %d
|
997 |
+
WHERE `type` = %s
|
998 |
+
AND severity in (0,1,2)
|
999 |
+
", $severity, $issueType));
|
1000 |
+
}
|
1001 |
+
|
1002 |
+
$syncedOptions = array();
|
1003 |
+
switch (wfConfig::get('scanType')) {
|
1004 |
+
case wfScanner::SCAN_TYPE_LIMITED:
|
1005 |
+
$syncedOptions = wfScanner::limitedScanTypeOptions();
|
1006 |
+
break;
|
1007 |
+
case wfScanner::SCAN_TYPE_STANDARD:
|
1008 |
+
$syncedOptions = wfScanner::standardScanTypeOptions();
|
1009 |
+
break;
|
1010 |
+
case wfScanner::SCAN_TYPE_HIGH_SENSITIVITY:
|
1011 |
+
$syncedOptions = wfScanner::highSensitivityScanTypeOptions();
|
1012 |
+
break;
|
1013 |
+
}
|
1014 |
+
if ($syncedOptions) {
|
1015 |
+
foreach ($syncedOptions as $key => $value) {
|
1016 |
+
if (is_bool($value)) {
|
1017 |
+
wfConfig::set($key, $value ? 1 : 0);
|
1018 |
+
}
|
1019 |
+
}
|
1020 |
+
}
|
1021 |
+
|
1022 |
+
wfConfig::set('config720Migration', true);
|
1023 |
+
}
|
1024 |
+
|
1025 |
//Check the How does Wordfence get IPs setting
|
1026 |
wfUtils::requestDetectProxyCallback();
|
1027 |
|
1257 |
add_filter('update_feedback', 'wordfence::restoreReadmeForUpgrade');
|
1258 |
}
|
1259 |
|
1260 |
+
add_action('rest_api_init', 'wordfence::initRestAPI');
|
1261 |
+
|
1262 |
}
|
1263 |
public static function _pluginPageActionLinks($links) {
|
1264 |
if (!wfConfig::get('isPaid')) {
|
5024 |
self::ajax_lh_callback();
|
5025 |
exit;
|
5026 |
}
|
5027 |
+
if (!empty($_GET['wfcentral_admin_redirect'])) {
|
5028 |
+
wp_safe_redirect(remove_query_arg('wfcentral_admin_redirect', network_admin_url('admin.php?page=Wordfence' . rawurlencode(ucwords(preg_replace('/\W/', '', $_GET['wfcentral_admin_redirect']))) . '&' . $_SERVER['QUERY_STRING'])));
|
5029 |
+
exit;
|
5030 |
+
}
|
5031 |
|
5032 |
$wfFunc = !empty($_GET['_wfsf']) && is_string($_GET['_wfsf']) ? $_GET['_wfsf'] : '';
|
5033 |
|
5544 |
'saveOptions', 'restoreDefaults', 'enableAllOptionsPage', 'createBlock', 'deleteBlocks', 'makePermanentBlocks', 'getBlocks',
|
5545 |
'installAutoPrepend', 'uninstallAutoPrepend',
|
5546 |
'installLicense', 'recordTOUPP', 'mailingSignup',
|
5547 |
+
'wfcentral_step1', 'wfcentral_step2', 'wfcentral_step3', 'wfcentral_step4', 'wfcentral_step5', 'wfcentral_step6', 'wfcentral_disconnect',
|
5548 |
) as $func){
|
5549 |
add_action('wp_ajax_wordfence_' . $func, 'wordfence::ajaxReceiver');
|
5550 |
}
|
5551 |
+
|
5552 |
+
wp_register_style('wordfence-font-awesome-style', wfUtils::getBaseURL() . wfUtils::versionedAsset('css/wf-font-awesome.css'), '', WORDFENCE_VERSION);
|
5553 |
|
5554 |
if(isset($_GET['page']) && preg_match('/^Wordfence/', @$_GET['page']) ){
|
5555 |
wp_enqueue_style('wp-pointer');
|
5556 |
wp_enqueue_script('wp-pointer');
|
5557 |
wp_enqueue_style('wordfence-font', wfUtils::getBaseURL() . wfUtils::versionedAsset('css/wf-roboto-font.css'), '', WORDFENCE_VERSION);
|
5558 |
+
wp_enqueue_style('wordfence-font-awesome-style');
|
5559 |
wp_enqueue_style('wordfence-main-style', wfUtils::getBaseURL() . wfUtils::versionedAsset('css/main.css'), '', WORDFENCE_VERSION);
|
5560 |
wp_enqueue_style('wordfence-ionicons-style', wfUtils::getBaseURL() . wfUtils::versionedAsset('css/wf-ionicons.css'), '', WORDFENCE_VERSION);
|
5561 |
wp_enqueue_style('wordfence-colorbox-style', wfUtils::getBaseURL() . wfUtils::versionedAsset('css/wf-colorbox.css'), '', WORDFENCE_VERSION);
|
5580 |
wp_enqueue_style('wp-pointer');
|
5581 |
wp_enqueue_script('wp-pointer');
|
5582 |
wp_enqueue_script('wordfenceAdminExtjs', wfUtils::getBaseURL() . wfUtils::versionedAsset('js/wfglobal.js'), array('jquery'), WORDFENCE_VERSION);
|
5583 |
+
wp_enqueue_style('wordfence-font-awesome-style');
|
5584 |
+
wp_enqueue_style('wordfence-global-style', wfUtils::getBaseURL() . wfUtils::versionedAsset('css/wf-global.css'), '', WORDFENCE_VERSION);
|
5585 |
self::setupAdminVars();
|
5586 |
}
|
5587 |
|
5824 |
add_submenu_page("Wordfence", "All Options", "All Options", "activate_plugins", "WordfenceOptions", 'wordfence::menu_options');
|
5825 |
}
|
5826 |
add_submenu_page('Wordfence', 'Help', 'Help', 'activate_plugins', 'WordfenceSupport', 'wordfence::menu_support');
|
5827 |
+
if (wfCentral::isSupported()) {
|
5828 |
+
add_submenu_page(wfConfig::get('showWfCentralUI', false) ? 'Wordfence' : null, 'Wordfence Central', 'Wordfence Central', 'activate_plugins', 'WordfenceCentral', 'wordfence::menu_wordfence_central');
|
5829 |
+
}
|
5830 |
+
|
5831 |
if (wfConfig::get('isPaid')) {
|
5832 |
+
add_submenu_page("Wordfence", "Protect More Sites", "<strong id=\"wfMenuCallout\" style=\"color: #FCB214;\">Protect More Sites</strong>", "activate_plugins", "WordfenceProtectMoreSites", 'wordfence::_menu_noop');
|
5833 |
}
|
5834 |
else {
|
5835 |
+
add_submenu_page("Wordfence", "Upgrade To Premium", "<strong id=\"wfMenuCallout\" style=\"color: #FCB214;\">Upgrade To Premium</strong>", "activate_plugins", "WordfenceUpgradeToPremium", 'wordfence::_menu_noop');
|
5836 |
}
|
5837 |
add_filter('clean_url', 'wordfence::_patchWordfenceSubmenuCallout', 10, 3);
|
5838 |
}
|
5847 |
}
|
5848 |
return $url;
|
5849 |
}
|
5850 |
+
public static function _menu_noop() {
|
5851 |
+
//Do nothing
|
5852 |
+
}
|
5853 |
public static function _retargetWordfenceSubmenuCallout() {
|
5854 |
echo <<<JQUERY
|
5855 |
<script type="text/javascript">
|
6120 |
require('menu_support.php');
|
6121 |
}
|
6122 |
|
6123 |
+
public static function menu_wordfence_central() {
|
6124 |
+
wfConfig::set('showWfCentralUI', 1);
|
6125 |
+
|
6126 |
+
wp_enqueue_style('wordfence-select2-css', wfUtils::getBaseURL() . wfUtils::versionedAsset('css/wfselect2.min.css'), array(), WORDFENCE_VERSION);
|
6127 |
+
wp_enqueue_script('wordfence-select2-js', wfUtils::getBaseURL() . wfUtils::versionedAsset('js/wfselect2.min.js'), array('jquery'), WORDFENCE_VERSION);
|
6128 |
+
|
6129 |
+
require('menu_wordfence_central.php');
|
6130 |
+
}
|
6131 |
+
|
6132 |
public static function fsActionRestoreFileCallback() {
|
6133 |
$issueID = filter_input(INPUT_GET, 'issueID', FILTER_SANITIZE_NUMBER_INT);
|
6134 |
$response = self::ajax_restoreFile_callback($issueID);
|
8097 |
if (!$output) { ob_end_clean(); }
|
8098 |
return true;
|
8099 |
}
|
8100 |
+
|
8101 |
+
public static function initRestAPI() {
|
8102 |
+
$auth = new wfRESTAuthenticationController();
|
8103 |
+
$auth->registerRoutes();
|
8104 |
+
|
8105 |
+
$config = new wfRESTConfigController();
|
8106 |
+
$config->registerRoutes();
|
8107 |
+
|
8108 |
+
$scan = new wfRESTScanController();
|
8109 |
+
$scan->registerRoutes();
|
8110 |
+
}
|
8111 |
+
|
8112 |
+
public static function ajax_wfcentral_step1_callback() {
|
8113 |
+
// Step 1: Makes GET request to `/central/api/site/access-token` endpoint authenticated with the auth grant supplied by the user.
|
8114 |
+
// - Receives site GUID, public key, short lived JWT.
|
8115 |
+
|
8116 |
+
$authGrant = isset($_REQUEST['auth-grant']) ? $_REQUEST['auth-grant'] : null;
|
8117 |
+
if (!$authGrant) {
|
8118 |
+
return array(
|
8119 |
+
'err' => 1,
|
8120 |
+
'errorMsg' => __("Auth grant is invalid.", 'wordfence'),
|
8121 |
+
);
|
8122 |
+
}
|
8123 |
+
|
8124 |
+
$request = new wfCentralAPIRequest('/site/access-token', 'GET', $authGrant);
|
8125 |
+
$response = $request->execute();
|
8126 |
+
|
8127 |
+
if ($response->isError()) {
|
8128 |
+
return $response->returnErrorArray();
|
8129 |
+
}
|
8130 |
+
|
8131 |
+
$body = $response->getJSONBody();
|
8132 |
+
if (!is_array($body) || !isset($body['data']['attributes'])) {
|
8133 |
+
return array(
|
8134 |
+
'err' => 1,
|
8135 |
+
'errorMsg' => sprintf(__("Invalid response from Wordfence Central: %s"), $response->getBody()),
|
8136 |
+
);
|
8137 |
+
}
|
8138 |
+
if (!array_key_exists('id', $body['data'])) {
|
8139 |
+
return array(
|
8140 |
+
'err' => 1,
|
8141 |
+
'errorMsg' => sprintf(__("Invalid response from Wordfence Central. Parameter %s not found in response."), 'id'),
|
8142 |
+
);
|
8143 |
+
}
|
8144 |
+
|
8145 |
+
$data = $body['data']['attributes'];
|
8146 |
+
$expected = array(
|
8147 |
+
'public-key',
|
8148 |
+
'access-token',
|
8149 |
+
);
|
8150 |
+
foreach ($expected as $key) {
|
8151 |
+
if (!array_key_exists($key, $data)) {
|
8152 |
+
return array(
|
8153 |
+
'err' => 1,
|
8154 |
+
'errorMsg' => sprintf(__("Invalid response from Wordfence Central. Parameter %s not found in response."), $key),
|
8155 |
+
);
|
8156 |
+
}
|
8157 |
+
}
|
8158 |
+
|
8159 |
+
wfConfig::set('wordfenceCentralSiteID', $body['data']['id']);
|
8160 |
+
wfConfig::set('wordfenceCentralPK', pack("H*", $data['public-key']));
|
8161 |
+
wfConfig::set('wordfenceCentralAccessToken', $data['access-token']);
|
8162 |
+
wfConfig::set('wordfenceCentralCurrentStep', 2);
|
8163 |
+
|
8164 |
+
wfConfig::set('wordfenceCentralDisconnected', false);
|
8165 |
+
wfConfig::set('wordfenceCentralDisconnectTime', null);
|
8166 |
+
wfConfig::set('wordfenceCentralDisconnectEmail', null);
|
8167 |
+
|
8168 |
+
return array(
|
8169 |
+
'success' => 1,
|
8170 |
+
);
|
8171 |
+
}
|
8172 |
+
|
8173 |
+
public static function ajax_wfcentral_step2_callback() {
|
8174 |
+
// Step 2: Makes POST request to `/central/api/wf/site/<guid>` endpoint passing in the new public key.
|
8175 |
+
// Uses JWT from auth grant endpoint as auth.
|
8176 |
+
|
8177 |
+
require_once WORDFENCE_PATH . '/vendor/paragonie/sodium_compat/autoload.php';
|
8178 |
+
|
8179 |
+
$accessToken = wfConfig::get('wordfenceCentralAccessToken');
|
8180 |
+
if (!$accessToken) {
|
8181 |
+
return array(
|
8182 |
+
'err' => 1,
|
8183 |
+
'errorMsg' => __("Access token not found.", 'wordfence'),
|
8184 |
+
);
|
8185 |
+
}
|
8186 |
+
|
8187 |
+
$keypair = ParagonIE_Sodium_Compat::crypto_sign_keypair();
|
8188 |
+
$publicKey = ParagonIE_Sodium_Compat::crypto_sign_publickey($keypair);
|
8189 |
+
$secretKey = ParagonIE_Sodium_Compat::crypto_sign_secretkey($keypair);
|
8190 |
+
wfConfig::set('wordfenceCentralSecretKey', $secretKey);
|
8191 |
+
|
8192 |
+
$request = new wfCentralAPIRequest('/site/' . wfConfig::get('wordfenceCentralSiteID'), 'POST',
|
8193 |
+
$accessToken, array(
|
8194 |
+
'data' => array(
|
8195 |
+
'attributes' => array(
|
8196 |
+
'public-key' => ParagonIE_Sodium_Compat::bin2hex($publicKey),
|
8197 |
+
),
|
8198 |
+
),
|
8199 |
+
));
|
8200 |
+
$response = $request->execute();
|
8201 |
+
|
8202 |
+
if ($response->isError()) {
|
8203 |
+
return $response->returnErrorArray();
|
8204 |
+
}
|
8205 |
+
|
8206 |
+
wfConfig::set('wordfenceCentralCurrentStep', 3);
|
8207 |
+
|
8208 |
+
return array(
|
8209 |
+
'success' => 1,
|
8210 |
+
);
|
8211 |
+
}
|
8212 |
+
|
8213 |
+
public static function ajax_wfcentral_step3_callback() {
|
8214 |
+
// Step 3: Makes GET request to `/central/api/wf/site/<guid>` endpoint signed using Wordfence plugin private key.
|
8215 |
+
// - Expects 200 response with site data.
|
8216 |
+
|
8217 |
+
try {
|
8218 |
+
$request = new wfCentralAuthenticatedAPIRequest('/site/' . wfConfig::get('wordfenceCentralSiteID'));
|
8219 |
+
$response = $request->execute();
|
8220 |
+
if ($response->isError()) {
|
8221 |
+
return $response->returnErrorArray();
|
8222 |
+
}
|
8223 |
+
|
8224 |
+
$body = $response->getJSONBody();
|
8225 |
+
if (!is_array($body) || !isset($body['data']['attributes'])) {
|
8226 |
+
return array(
|
8227 |
+
'error' => 1,
|
8228 |
+
'errorMsg' => __('Invalid response from Wordfence Central.', 'wordfence'),
|
8229 |
+
);
|
8230 |
+
}
|
8231 |
+
wfConfig::set('wordfenceCentralSiteData', json_encode($body['data']['attributes']));
|
8232 |
+
wfConfig::set('wordfenceCentralCurrentStep', 4);
|
8233 |
+
|
8234 |
+
return array(
|
8235 |
+
'success' => 1,
|
8236 |
+
);
|
8237 |
+
|
8238 |
+
} catch (wfCentralAPIException $e) {
|
8239 |
+
return array(
|
8240 |
+
'error' => 1,
|
8241 |
+
'errorMsg' => $e->getMessage(),
|
8242 |
+
);
|
8243 |
+
}
|
8244 |
+
}
|
8245 |
+
|
8246 |
+
public static function ajax_wfcentral_step4_callback() {
|
8247 |
+
// Step 4: Poll for PUT request at `/wp-json/wp/v2/wordfence-auth-grant/` endpoint signed using Wordfence Central private key with short lived JWT.
|
8248 |
+
// - Expects verifiable signature of incoming request from Wordfence Central.
|
8249 |
+
// - Stores auth grant JWT.
|
8250 |
+
|
8251 |
+
$wfCentralAuthGrant = wfConfig::get('wordfenceCentralUserSiteAuthGrant');
|
8252 |
+
if ($wfCentralAuthGrant) {
|
8253 |
+
wfConfig::set('wordfenceCentralCurrentStep', 5);
|
8254 |
+
return array(
|
8255 |
+
'success' => 1,
|
8256 |
+
);
|
8257 |
+
}
|
8258 |
+
return array(
|
8259 |
+
'success' => 0,
|
8260 |
+
);
|
8261 |
+
}
|
8262 |
+
|
8263 |
+
public static function ajax_wfcentral_step5_callback() {
|
8264 |
+
// Step 5: Makes POST request to `/central/api/site/<guid>/access-token` endpoint signed using Wordfence plugin private key with auth grant JWT.
|
8265 |
+
// - Expects 200 response with access token.
|
8266 |
+
|
8267 |
+
$wfCentralAuthGrant = wfConfig::get('wordfenceCentralUserSiteAuthGrant');
|
8268 |
+
if (!$wfCentralAuthGrant) {
|
8269 |
+
return array(
|
8270 |
+
'error' => 1,
|
8271 |
+
'errorMsg' => __('Auth grant not found.', 'wordfence'),
|
8272 |
+
);
|
8273 |
+
}
|
8274 |
+
|
8275 |
+
try {
|
8276 |
+
$request = new wfCentralAuthenticatedAPIRequest(
|
8277 |
+
sprintf('/site/%s/access-token', wfConfig::get('wordfenceCentralSiteID')),
|
8278 |
+
'POST',
|
8279 |
+
array(
|
8280 |
+
'data' => array(
|
8281 |
+
'attributes' => array(
|
8282 |
+
'auth-grant' => $wfCentralAuthGrant,
|
8283 |
+
),
|
8284 |
+
),
|
8285 |
+
));
|
8286 |
+
$response = $request->execute();
|
8287 |
+
if ($response->isError()) {
|
8288 |
+
return $response->returnErrorArray();
|
8289 |
+
}
|
8290 |
+
|
8291 |
+
$body = $response->getJSONBody();
|
8292 |
+
if (!is_array($body) || !isset($body['access-token'])) {
|
8293 |
+
return array(
|
8294 |
+
'error' => 1,
|
8295 |
+
'errorMsg' => __('Invalid response from Wordfence Central.', 'wordfence'),
|
8296 |
+
);
|
8297 |
+
}
|
8298 |
+
wfConfig::set('wordfenceCentralUserSiteAccessToken', $body['access-token']);
|
8299 |
+
wfConfig::set('wordfenceCentralCurrentStep', 6);
|
8300 |
+
|
8301 |
+
return array(
|
8302 |
+
'success' => 1,
|
8303 |
+
'access-token' => $body['access-token'],
|
8304 |
+
'redirect-url' => sprintf(WORDFENCE_CENTRAL_URL_SEC . '/sites/%s?access-token=%s',
|
8305 |
+
rawurlencode(wfConfig::get('wordfenceCentralSiteID')), rawurlencode($body['access-token'])),
|
8306 |
+
);
|
8307 |
+
|
8308 |
+
} catch (wfCentralAPIException $e) {
|
8309 |
+
return array(
|
8310 |
+
'error' => 1,
|
8311 |
+
'errorMsg' => $e->getMessage(),
|
8312 |
+
);
|
8313 |
+
}
|
8314 |
+
}
|
8315 |
+
public static function ajax_wfcentral_step6_callback() {
|
8316 |
+
$wfCentralUserSiteAccessToken = wfConfig::get('wordfenceCentralUserSiteAccessToken');
|
8317 |
+
if (!$wfCentralUserSiteAccessToken) {
|
8318 |
+
return array(
|
8319 |
+
'error' => 1,
|
8320 |
+
'errorMsg' => __('Access token not found.', 'wordfence'),
|
8321 |
+
);
|
8322 |
+
}
|
8323 |
+
|
8324 |
+
$status = wfConfig::get('scanStageStatuses');
|
8325 |
+
wfCentral::updateScanStatus($status);
|
8326 |
+
|
8327 |
+
wfConfig::set('wordfenceCentralConnectTime', time());
|
8328 |
+
wfConfig::set('wordfenceCentralConnectEmail', wp_get_current_user()->user_email);
|
8329 |
+
|
8330 |
+
return array(
|
8331 |
+
'success' => 1,
|
8332 |
+
'access-token' => $wfCentralUserSiteAccessToken,
|
8333 |
+
'redirect-url' => sprintf(WORDFENCE_CENTRAL_URL_SEC . '/sites/%s?access-token=%s',
|
8334 |
+
rawurlencode(wfConfig::get('wordfenceCentralSiteID')), rawurlencode($wfCentralUserSiteAccessToken)),
|
8335 |
+
);
|
8336 |
+
}
|
8337 |
+
|
8338 |
+
public static function ajax_wfcentral_disconnect_callback() {
|
8339 |
+
try {
|
8340 |
+
$request = new wfCentralAuthenticatedAPIRequest(
|
8341 |
+
sprintf('/site/%s', wfConfig::get('wordfenceCentralSiteID')),
|
8342 |
+
'DELETE');
|
8343 |
+
$response = $request->execute();
|
8344 |
+
} catch (wfCentralAPIException $e) {
|
8345 |
+
|
8346 |
+
}
|
8347 |
+
|
8348 |
+
wfRESTConfigController::disconnectConfig();
|
8349 |
+
|
8350 |
+
return array(
|
8351 |
+
'success' => 1,
|
8352 |
+
);
|
8353 |
+
}
|
8354 |
}
|
8355 |
|
8356 |
+
|
8357 |
class wfWAFAutoPrependHelper {
|
8358 |
|
8359 |
private $serverConfig;
|
lib/wordfenceConstants.php
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
<?php
|
2 |
-
define('WORDFENCE_API_VERSION', '2.
|
3 |
define('WORDFENCE_API_URL_SEC', 'https://noc1.wordfence.com/');
|
4 |
define('WORDFENCE_API_URL_NONSEC', 'http://noc1.wordfence.com/');
|
5 |
define('WORDFENCE_API_URL_BASE_SEC', WORDFENCE_API_URL_SEC . 'v' . WORDFENCE_API_VERSION . '/');
|
@@ -8,6 +8,9 @@ define('WORDFENCE_BREACH_URL_BASE_SEC', WORDFENCE_API_URL_SEC . 'passwords/');
|
|
8 |
define('WORDFENCE_BREACH_URL_BASE_NONSEC', WORDFENCE_API_URL_NONSEC . 'passwords/');
|
9 |
define('WORDFENCE_HACKATTEMPT_URL', 'http://noc3.wordfence.com/');
|
10 |
define('WORDFENCE_HACKATTEMPT_URL_SEC', 'https://noc3.wordfence.com/');
|
|
|
|
|
|
|
11 |
define('WORDFENCE_MAX_SCAN_LOCK_TIME', 86400); //Increased this from 10 mins to 1 day because very big scans run for a long time. Users can use kill.
|
12 |
define('WORDFENCE_DEFAULT_MAX_SCAN_TIME', 10800);
|
13 |
define('WORDFENCE_TRANSIENTS_TIMEOUT', 3600); //how long are items cached in seconds e.g. files downloaded for diffing
|
1 |
<?php
|
2 |
+
define('WORDFENCE_API_VERSION', '2.26');
|
3 |
define('WORDFENCE_API_URL_SEC', 'https://noc1.wordfence.com/');
|
4 |
define('WORDFENCE_API_URL_NONSEC', 'http://noc1.wordfence.com/');
|
5 |
define('WORDFENCE_API_URL_BASE_SEC', WORDFENCE_API_URL_SEC . 'v' . WORDFENCE_API_VERSION . '/');
|
8 |
define('WORDFENCE_BREACH_URL_BASE_NONSEC', WORDFENCE_API_URL_NONSEC . 'passwords/');
|
9 |
define('WORDFENCE_HACKATTEMPT_URL', 'http://noc3.wordfence.com/');
|
10 |
define('WORDFENCE_HACKATTEMPT_URL_SEC', 'https://noc3.wordfence.com/');
|
11 |
+
if (!defined('WORDFENCE_CENTRAL_URL_SEC')) { define('WORDFENCE_CENTRAL_URL_SEC', 'https://www.wordfence.com/central'); }
|
12 |
+
if (!defined('WORDFENCE_CENTRAL_API_URL_SEC')) { define('WORDFENCE_CENTRAL_API_URL_SEC', 'https://www.wordfence.com/api/wf'); }
|
13 |
+
if (!defined('WORDFENCE_CENTRAL_PUBLIC_KEY')) { define('WORDFENCE_CENTRAL_PUBLIC_KEY', "\xb6\x33\x81\x05\xdf\xdf\xec\xcf\xf3\xe3\x36\xc6\xf0\x99\xc6\xf7\xca\x05\x36\xca\x87\x54\x53\x43\x31\xf2\xc6\x0d\xe1\x3d\x55\x0f"); }
|
14 |
define('WORDFENCE_MAX_SCAN_LOCK_TIME', 86400); //Increased this from 10 mins to 1 day because very big scans run for a long time. Users can use kill.
|
15 |
define('WORDFENCE_DEFAULT_MAX_SCAN_TIME', 10800);
|
16 |
define('WORDFENCE_TRANSIENTS_TIMEOUT', 3600); //how long are items cached in seconds e.g. files downloaded for diffing
|
lib/wordfenceHash.php
CHANGED
@@ -157,7 +157,7 @@ class wordfenceHash {
|
|
157 |
$this->alertedOnUnknownWordPressVersion = true;
|
158 |
$added = $this->engine->addIssue(
|
159 |
'coreUnknown',
|
160 |
-
|
161 |
'coreUnknown' . $wp_version,
|
162 |
'coreUnknown' . $wp_version,
|
163 |
'Unknown WordPress core version: ' . $wp_version,
|
@@ -251,8 +251,8 @@ class wordfenceHash {
|
|
251 |
$md5 = $malwareList[$i][1];
|
252 |
$name = $malwareList[$i][2];
|
253 |
$added = $this->engine->addIssue(
|
254 |
-
'file',
|
255 |
-
|
256 |
$this->path . $file,
|
257 |
$md5,
|
258 |
'This file is suspected malware: ' . $file,
|
@@ -478,7 +478,7 @@ class wordfenceHash {
|
|
478 |
if ($fileContents && (!preg_match('/<\?' . 'php[\r\n\s\t]*\/\/[\r\n\s\t]*Silence is golden\.[\r\n\s\t]*(?:\?>)?[\r\n\s\t]*$/s', $fileContents))) {
|
479 |
$this->engine->addPendingIssue(
|
480 |
'knownfile',
|
481 |
-
|
482 |
'coreModified' . $file,
|
483 |
'coreModified' . $file . $md5,
|
484 |
'WordPress core file modified: ' . $file,
|
@@ -514,7 +514,7 @@ class wordfenceHash {
|
|
514 |
$cKey = $this->knownFiles['plugins'][$file][2];
|
515 |
$this->engine->addPendingIssue(
|
516 |
'knownfile',
|
517 |
-
|
518 |
'modifiedplugin' . $file,
|
519 |
'modifiedplugin' . $file . $md5,
|
520 |
'Modified plugin file: ' . $file,
|
@@ -554,7 +554,7 @@ class wordfenceHash {
|
|
554 |
$cKey = $this->knownFiles['themes'][$file][2];
|
555 |
$this->engine->addPendingIssue(
|
556 |
'knownfile',
|
557 |
-
|
558 |
'modifiedtheme' . $file,
|
559 |
'modifiedtheme' . $file . $md5,
|
560 |
'Modified theme file: ' . $file,
|
@@ -584,7 +584,7 @@ class wordfenceHash {
|
|
584 |
if ($this->isPreviousCoreFile($shac)) {
|
585 |
$added = $this->engine->addIssue(
|
586 |
'knownfile',
|
587 |
-
|
588 |
'coreUnknown' . $file,
|
589 |
'coreUnknown' . $file . $md5,
|
590 |
sprintf(__('Old WordPress core file not removed during update: %s', 'wordfence'), $file),
|
@@ -601,7 +601,7 @@ class wordfenceHash {
|
|
601 |
else {
|
602 |
$added = $this->engine->addIssue(
|
603 |
'knownfile',
|
604 |
-
|
605 |
'coreUnknown' . $file,
|
606 |
'coreUnknown' . $file . $md5,
|
607 |
'Unknown file in WordPress core: ' . $file,
|
157 |
$this->alertedOnUnknownWordPressVersion = true;
|
158 |
$added = $this->engine->addIssue(
|
159 |
'coreUnknown',
|
160 |
+
wfIssues::SEVERITY_MEDIUM,
|
161 |
'coreUnknown' . $wp_version,
|
162 |
'coreUnknown' . $wp_version,
|
163 |
'Unknown WordPress core version: ' . $wp_version,
|
251 |
$md5 = $malwareList[$i][1];
|
252 |
$name = $malwareList[$i][2];
|
253 |
$added = $this->engine->addIssue(
|
254 |
+
'file',
|
255 |
+
wfIssues::SEVERITY_CRITICAL,
|
256 |
$this->path . $file,
|
257 |
$md5,
|
258 |
'This file is suspected malware: ' . $file,
|
478 |
if ($fileContents && (!preg_match('/<\?' . 'php[\r\n\s\t]*\/\/[\r\n\s\t]*Silence is golden\.[\r\n\s\t]*(?:\?>)?[\r\n\s\t]*$/s', $fileContents))) {
|
479 |
$this->engine->addPendingIssue(
|
480 |
'knownfile',
|
481 |
+
wfIssues::SEVERITY_HIGH,
|
482 |
'coreModified' . $file,
|
483 |
'coreModified' . $file . $md5,
|
484 |
'WordPress core file modified: ' . $file,
|
514 |
$cKey = $this->knownFiles['plugins'][$file][2];
|
515 |
$this->engine->addPendingIssue(
|
516 |
'knownfile',
|
517 |
+
wfIssues::SEVERITY_MEDIUM,
|
518 |
'modifiedplugin' . $file,
|
519 |
'modifiedplugin' . $file . $md5,
|
520 |
'Modified plugin file: ' . $file,
|
554 |
$cKey = $this->knownFiles['themes'][$file][2];
|
555 |
$this->engine->addPendingIssue(
|
556 |
'knownfile',
|
557 |
+
wfIssues::SEVERITY_MEDIUM,
|
558 |
'modifiedtheme' . $file,
|
559 |
'modifiedtheme' . $file . $md5,
|
560 |
'Modified theme file: ' . $file,
|
584 |
if ($this->isPreviousCoreFile($shac)) {
|
585 |
$added = $this->engine->addIssue(
|
586 |
'knownfile',
|
587 |
+
wfIssues::SEVERITY_LOW,
|
588 |
'coreUnknown' . $file,
|
589 |
'coreUnknown' . $file . $md5,
|
590 |
sprintf(__('Old WordPress core file not removed during update: %s', 'wordfence'), $file),
|
601 |
else {
|
602 |
$added = $this->engine->addIssue(
|
603 |
'knownfile',
|
604 |
+
wfIssues::SEVERITY_HIGH,
|
605 |
'coreUnknown' . $file,
|
606 |
'coreUnknown' . $file . $md5,
|
607 |
'Unknown file in WordPress core: ' . $file,
|
lib/wordfenceScanner.php
CHANGED
@@ -342,7 +342,7 @@ class wordfenceScanner {
|
|
342 |
if ($treatAsBinary && wfUtils::strpos($data, '$allowed'.'Sites') !== false && wfUtils::strpos($data, "define ('VER"."SION', '1.") !== false && wfUtils::strpos($data, "TimThum"."b script created by") !== false) {
|
343 |
$this->addResult(array(
|
344 |
'type' => 'file',
|
345 |
-
'severity' =>
|
346 |
'ignoreP' => $this->path . $file,
|
347 |
'ignoreC' => $fileSum,
|
348 |
'shortMsg' => __('File is an old version of TimThumb which is vulnerable.', 'wordfence'),
|
@@ -404,7 +404,7 @@ class wordfenceScanner {
|
|
404 |
if (!$logOnly) {
|
405 |
$this->addResult(array(
|
406 |
'type' => 'file',
|
407 |
-
'severity' =>
|
408 |
'ignoreP' => $this->path . $file,
|
409 |
'ignoreC' => $fileSum,
|
410 |
'shortMsg' => __('File appears to be malicious: ', 'wordfence') . esc_html($file),
|
@@ -445,7 +445,7 @@ class wordfenceScanner {
|
|
445 |
if ($badStringFound) {
|
446 |
$this->addResult(array(
|
447 |
'type' => 'file',
|
448 |
-
'severity' =>
|
449 |
'ignoreP' => $this->path . $file,
|
450 |
'ignoreC' => $fileSum,
|
451 |
'shortMsg' => __('This file may contain malicious executable code: ', 'wordfence') . esc_html($file),
|
@@ -509,7 +509,7 @@ class wordfenceScanner {
|
|
509 |
if ($result['badList'] == 'goog-malware-shavar') {
|
510 |
$this->addResult(array(
|
511 |
'type' => 'file',
|
512 |
-
'severity' =>
|
513 |
'ignoreP' => $this->path . $file,
|
514 |
'ignoreC' => md5_file($this->path . $file),
|
515 |
'shortMsg' => __('File contains suspected malware URL: ', 'wordfence') . esc_html($file),
|
@@ -527,7 +527,7 @@ class wordfenceScanner {
|
|
527 |
else if ($result['badList'] == 'googpub-phish-shavar') {
|
528 |
$this->addResult(array(
|
529 |
'type' => 'file',
|
530 |
-
'severity' =>
|
531 |
'ignoreP' => $this->path . $file,
|
532 |
'ignoreC' => md5_file($this->path . $file),
|
533 |
'shortMsg' => __('File contains suspected phishing URL: ', 'wordfence') . esc_html($file),
|
@@ -545,7 +545,7 @@ class wordfenceScanner {
|
|
545 |
else if ($result['badList'] == 'wordfence-dbl') {
|
546 |
$this->addResult(array(
|
547 |
'type' => 'file',
|
548 |
-
'severity' =>
|
549 |
'ignoreP' => $this->path . $file,
|
550 |
'ignoreC' => md5_file($this->path . $file),
|
551 |
'shortMsg' => __('File contains suspected malware URL: ', 'wordfence') . esc_html($file),
|
342 |
if ($treatAsBinary && wfUtils::strpos($data, '$allowed'.'Sites') !== false && wfUtils::strpos($data, "define ('VER"."SION', '1.") !== false && wfUtils::strpos($data, "TimThum"."b script created by") !== false) {
|
343 |
$this->addResult(array(
|
344 |
'type' => 'file',
|
345 |
+
'severity' => wfIssues::SEVERITY_CRITICAL,
|
346 |
'ignoreP' => $this->path . $file,
|
347 |
'ignoreC' => $fileSum,
|
348 |
'shortMsg' => __('File is an old version of TimThumb which is vulnerable.', 'wordfence'),
|
404 |
if (!$logOnly) {
|
405 |
$this->addResult(array(
|
406 |
'type' => 'file',
|
407 |
+
'severity' => wfIssues::SEVERITY_CRITICAL,
|
408 |
'ignoreP' => $this->path . $file,
|
409 |
'ignoreC' => $fileSum,
|
410 |
'shortMsg' => __('File appears to be malicious: ', 'wordfence') . esc_html($file),
|
445 |
if ($badStringFound) {
|
446 |
$this->addResult(array(
|
447 |
'type' => 'file',
|
448 |
+
'severity' => wfIssues::SEVERITY_CRITICAL,
|
449 |
'ignoreP' => $this->path . $file,
|
450 |
'ignoreC' => $fileSum,
|
451 |
'shortMsg' => __('This file may contain malicious executable code: ', 'wordfence') . esc_html($file),
|
509 |
if ($result['badList'] == 'goog-malware-shavar') {
|
510 |
$this->addResult(array(
|
511 |
'type' => 'file',
|
512 |
+
'severity' => wfIssues::SEVERITY_CRITICAL,
|
513 |
'ignoreP' => $this->path . $file,
|
514 |
'ignoreC' => md5_file($this->path . $file),
|
515 |
'shortMsg' => __('File contains suspected malware URL: ', 'wordfence') . esc_html($file),
|
527 |
else if ($result['badList'] == 'googpub-phish-shavar') {
|
528 |
$this->addResult(array(
|
529 |
'type' => 'file',
|
530 |
+
'severity' => wfIssues::SEVERITY_CRITICAL,
|
531 |
'ignoreP' => $this->path . $file,
|
532 |
'ignoreC' => md5_file($this->path . $file),
|
533 |
'shortMsg' => __('File contains suspected phishing URL: ', 'wordfence') . esc_html($file),
|
545 |
else if ($result['badList'] == 'wordfence-dbl') {
|
546 |
$this->addResult(array(
|
547 |
'type' => 'file',
|
548 |
+
'severity' => wfIssues::SEVERITY_CRITICAL,
|
549 |
'ignoreP' => $this->path . $file,
|
550 |
'ignoreC' => md5_file($this->path . $file),
|
551 |
'shortMsg' => __('File contains suspected malware URL: ', 'wordfence') . esc_html($file),
|
models/scanner/wfScanner.php
CHANGED
@@ -626,6 +626,9 @@ class wfScanner {
|
|
626 |
|
627 |
$runningStatus[$stageID]['started'] += 1;
|
628 |
wfConfig::set_ser('scanStageStatuses', $runningStatus, false, wfConfig::DONT_AUTOLOAD);
|
|
|
|
|
|
|
629 |
}
|
630 |
|
631 |
/**
|
@@ -656,6 +659,10 @@ class wfScanner {
|
|
656 |
}
|
657 |
|
658 |
wfConfig::set_ser('scanStageStatuses', $runningStatus, false, wfConfig::DONT_AUTOLOAD);
|
|
|
|
|
|
|
|
|
659 |
}
|
660 |
|
661 |
/**
|
626 |
|
627 |
$runningStatus[$stageID]['started'] += 1;
|
628 |
wfConfig::set_ser('scanStageStatuses', $runningStatus, false, wfConfig::DONT_AUTOLOAD);
|
629 |
+
if (wfCentral::isConnected()) {
|
630 |
+
wfCentral::updateScanStatus($runningStatus);
|
631 |
+
}
|
632 |
}
|
633 |
|
634 |
/**
|
659 |
}
|
660 |
|
661 |
wfConfig::set_ser('scanStageStatuses', $runningStatus, false, wfConfig::DONT_AUTOLOAD);
|
662 |
+
if (wfCentral::isConnected()) {
|
663 |
+
wfCentral::updateScanStatus($runningStatus);
|
664 |
+
}
|
665 |
+
|
666 |
}
|
667 |
|
668 |
/**
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: security, firewall, malware scanner, web application firewall, antivirus,
|
|
4 |
Requires at least: 3.9
|
5 |
Requires PHP: 5.3
|
6 |
Tested up to: 5.0.3
|
7 |
-
Stable tag: 7.
|
8 |
|
9 |
Secure your website with the most comprehensive WordPress security plugin. Firewall, malware scan, blocking, live traffic, login security & more.
|
10 |
|
@@ -31,6 +31,12 @@ Wordfence includes an endpoint firewall and malware scanner that were built from
|
|
31 |
* Checks your content safety by scanning file contents, posts and comments for dangerous URLs and suspicious content.
|
32 |
* [Premium] Checks to see if your site or IP have been blacklisted for malicious activity, generating spam or other security issue.
|
33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
#### SECURITY TOOLS
|
35 |
* With Live Traffic, monitor visits and hack attempts not shown in other analytics packages in real time; including origin, their IP address, the time of day and time spent on your site.
|
36 |
* [Premium] Stop brute force attacks permanently by using two factor authentication, one of the most secure forms of remote system authentication available.
|
@@ -171,6 +177,14 @@ Secure your website with Wordfence.
|
|
171 |
|
172 |
== Changelog ==
|
173 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
174 |
= 7.1.20 - January 8, 2019 =
|
175 |
* Fix: Fixed a commit error with 7.1.19
|
176 |
|
4 |
Requires at least: 3.9
|
5 |
Requires PHP: 5.3
|
6 |
Tested up to: 5.0.3
|
7 |
+
Stable tag: 7.2.0
|
8 |
|
9 |
Secure your website with the most comprehensive WordPress security plugin. Firewall, malware scan, blocking, live traffic, login security & more.
|
10 |
|
31 |
* Checks your content safety by scanning file contents, posts and comments for dangerous URLs and suspicious content.
|
32 |
* [Premium] Checks to see if your site or IP have been blacklisted for malicious activity, generating spam or other security issue.
|
33 |
|
34 |
+
#### WORDFENCE CENTRAL
|
35 |
+
* Wordfence Central is a powerful and efficient way to manage the security for multiple sites in one place.
|
36 |
+
* Efficiently assess the security status of all your websites in one view. View detailed security findings without leaving Wordfence Central.
|
37 |
+
* Powerful templates make configuring Wordfence a breeze.
|
38 |
+
* Free to use for unlimited sites.
|
39 |
+
|
40 |
#### SECURITY TOOLS
|
41 |
* With Live Traffic, monitor visits and hack attempts not shown in other analytics packages in real time; including origin, their IP address, the time of day and time spent on your site.
|
42 |
* [Premium] Stop brute force attacks permanently by using two factor authentication, one of the most secure forms of remote system authentication available.
|
177 |
|
178 |
== Changelog ==
|
179 |
|
180 |
+
= 7.2.1 - February 5, 2019 =
|
181 |
+
* Improvement: Integrated Wordfence with Wordfence Central, a new service allowing you to manage multiple Wordfence installations from a single interface.
|
182 |
+
* Improvement: Added a help link to the mode display when a host disabling Live Traffic is active.
|
183 |
+
* Improvement: Added an option for whitelisting ManageWP in "Whitelisted Services".
|
184 |
+
* Fix: Enqueued fonts used in admin notices on all admin pages.
|
185 |
+
* Fix: Change false positive user-reports link to use https.
|
186 |
+
* Fix: Fix reference to non-existent function when registering menus.
|
187 |
+
|
188 |
= 7.1.20 - January 8, 2019 =
|
189 |
* Fix: Fixed a commit error with 7.1.19
|
190 |
|
vendor/composer/autoload_files.php
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
// autoload_files.php @generated by Composer
|
4 |
+
|
5 |
+
$vendorDir = dirname(dirname(__FILE__));
|
6 |
+
$baseDir = dirname($vendorDir);
|
7 |
+
|
8 |
+
return array(
|
9 |
+
'5255c38a0faeba867671b61dfda6d864' => $vendorDir . '/paragonie/random_compat/lib/random.php',
|
10 |
+
'3109cb1a231dcd04bee1f9f620d46975' => $vendorDir . '/paragonie/sodium_compat/autoload.php',
|
11 |
+
);
|
vendor/paragonie/random_compat/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
The MIT License (MIT)
|
2 |
+
|
3 |
+
Copyright (c) 2015 Paragon Initiative Enterprises
|
4 |
+
|
5 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6 |
+
of this software and associated documentation files (the "Software"), to deal
|
7 |
+
in the Software without restriction, including without limitation the rights
|
8 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9 |
+
copies of the Software, and to permit persons to whom the Software is
|
10 |
+
furnished to do so, subject to the following conditions:
|
11 |
+
|
12 |
+
The above copyright notice and this permission notice shall be included in all
|
13 |
+
copies or substantial portions of the Software.
|
14 |
+
|
15 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21 |
+
SOFTWARE.
|
22 |
+
|
vendor/paragonie/random_compat/dist/random_compat.phar.pubkey
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
-----BEGIN PUBLIC KEY-----
|
2 |
+
MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEEd+wCqJDrx5B4OldM0dQE0ZMX+lx1ZWm
|
3 |
+
pui0SUqD4G29L3NGsz9UhJ/0HjBdbnkhIK5xviT0X5vtjacF6ajgcCArbTB+ds+p
|
4 |
+
+h7Q084NuSuIpNb6YPfoUFgC/CL9kAoc
|
5 |
+
-----END PUBLIC KEY-----
|
vendor/paragonie/random_compat/dist/random_compat.phar.pubkey.asc
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
-----BEGIN PGP SIGNATURE-----
|
2 |
+
Version: GnuPG v2.0.22 (MingW32)
|
3 |
+
|
4 |
+
iQEcBAABAgAGBQJWtW1hAAoJEGuXocKCZATaJf0H+wbZGgskK1dcRTsuVJl9IWip
|
5 |
+
QwGw/qIKI280SD6/ckoUMxKDCJiFuPR14zmqnS36k7N5UNPnpdTJTS8T11jttSpg
|
6 |
+
1LCmgpbEIpgaTah+cELDqFCav99fS+bEiAL5lWDAHBTE/XPjGVCqeehyPYref4IW
|
7 |
+
NDBIEsvnHPHPLsn6X5jq4+Yj5oUixgxaMPiR+bcO4Sh+RzOVB6i2D0upWfRXBFXA
|
8 |
+
NNnsg9/zjvoC7ZW73y9uSH+dPJTt/Vgfeiv52/v41XliyzbUyLalf02GNPY+9goV
|
9 |
+
JHG1ulEEBJOCiUD9cE1PUIJwHA/HqyhHIvV350YoEFiHl8iSwm7SiZu5kPjaq74=
|
10 |
+
=B6+8
|
11 |
+
-----END PGP SIGNATURE-----
|
vendor/paragonie/random_compat/lib/byte_safe_strings.php
ADDED
@@ -0,0 +1,181 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Random_* Compatibility Library
|
4 |
+
* for using the new PHP 7 random_* API in PHP 5 projects
|
5 |
+
*
|
6 |
+
* The MIT License (MIT)
|
7 |
+
*
|
8 |
+
* Copyright (c) 2015 - 2017 Paragon Initiative Enterprises
|
9 |
+
*
|
10 |
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
11 |
+
* of this software and associated documentation files (the "Software"), to deal
|
12 |
+
* in the Software without restriction, including without limitation the rights
|
13 |
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
14 |
+
* copies of the Software, and to permit persons to whom the Software is
|
15 |
+
* furnished to do so, subject to the following conditions:
|
16 |
+
*
|
17 |
+
* The above copyright notice and this permission notice shall be included in
|
18 |
+
* all copies or substantial portions of the Software.
|
19 |
+
*
|
20 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
21 |
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
22 |
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
23 |
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
24 |
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
25 |
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
26 |
+
* SOFTWARE.
|
27 |
+
*/
|
28 |
+
|
29 |
+
if (!is_callable('RandomCompat_strlen')) {
|
30 |
+
if (
|
31 |
+
defined('MB_OVERLOAD_STRING') &&
|
32 |
+
ini_get('mbstring.func_overload') & MB_OVERLOAD_STRING
|
33 |
+
) {
|
34 |
+
/**
|
35 |
+
* strlen() implementation that isn't brittle to mbstring.func_overload
|
36 |
+
*
|
37 |
+
* This version uses mb_strlen() in '8bit' mode to treat strings as raw
|
38 |
+
* binary rather than UTF-8, ISO-8859-1, etc
|
39 |
+
*
|
40 |
+
* @param string $binary_string
|
41 |
+
*
|
42 |
+
* @throws TypeError
|
43 |
+
*
|
44 |
+
* @return int
|
45 |
+
*/
|
46 |
+
function RandomCompat_strlen($binary_string)
|
47 |
+
{
|
48 |
+
if (!is_string($binary_string)) {
|
49 |
+
throw new TypeError(
|
50 |
+
'RandomCompat_strlen() expects a string'
|
51 |
+
);
|
52 |
+
}
|
53 |
+
|
54 |
+
return (int) mb_strlen($binary_string, '8bit');
|
55 |
+
}
|
56 |
+
|
57 |
+
} else {
|
58 |
+
/**
|
59 |
+
* strlen() implementation that isn't brittle to mbstring.func_overload
|
60 |
+
*
|
61 |
+
* This version just used the default strlen()
|
62 |
+
*
|
63 |
+
* @param string $binary_string
|
64 |
+
*
|
65 |
+
* @throws TypeError
|
66 |
+
*
|
67 |
+
* @return int
|
68 |
+
*/
|
69 |
+
function RandomCompat_strlen($binary_string)
|
70 |
+
{
|
71 |
+
if (!is_string($binary_string)) {
|
72 |
+
throw new TypeError(
|
73 |
+
'RandomCompat_strlen() expects a string'
|
74 |
+
);
|
75 |
+
}
|
76 |
+
return (int) strlen($binary_string);
|
77 |
+
}
|
78 |
+
}
|
79 |
+
}
|
80 |
+
|
81 |
+
if (!is_callable('RandomCompat_substr')) {
|
82 |
+
|
83 |
+
if (
|
84 |
+
defined('MB_OVERLOAD_STRING')
|
85 |
+
&&
|
86 |
+
ini_get('mbstring.func_overload') & MB_OVERLOAD_STRING
|
87 |
+
) {
|
88 |
+
/**
|
89 |
+
* substr() implementation that isn't brittle to mbstring.func_overload
|
90 |
+
*
|
91 |
+
* This version uses mb_substr() in '8bit' mode to treat strings as raw
|
92 |
+
* binary rather than UTF-8, ISO-8859-1, etc
|
93 |
+
*
|
94 |
+
* @param string $binary_string
|
95 |
+
* @param int $start
|
96 |
+
* @param int $length (optional)
|
97 |
+
*
|
98 |
+
* @throws TypeError
|
99 |
+
*
|
100 |
+
* @return string
|
101 |
+
*/
|
102 |
+
function RandomCompat_substr($binary_string, $start, $length = null)
|
103 |
+
{
|
104 |
+
if (!is_string($binary_string)) {
|
105 |
+
throw new TypeError(
|
106 |
+
'RandomCompat_substr(): First argument should be a string'
|
107 |
+
);
|
108 |
+
}
|
109 |
+
|
110 |
+
if (!is_int($start)) {
|
111 |
+
throw new TypeError(
|
112 |
+
'RandomCompat_substr(): Second argument should be an integer'
|
113 |
+
);
|
114 |
+
}
|
115 |
+
|
116 |
+
if ($length === null) {
|
117 |
+
/**
|
118 |
+
* mb_substr($str, 0, NULL, '8bit') returns an empty string on
|
119 |
+
* PHP 5.3, so we have to find the length ourselves.
|
120 |
+
*/
|
121 |
+
$length = RandomCompat_strlen($binary_string) - $start;
|
122 |
+
} elseif (!is_int($length)) {
|
123 |
+
throw new TypeError(
|
124 |
+
'RandomCompat_substr(): Third argument should be an integer, or omitted'
|
125 |
+
);
|
126 |
+
}
|
127 |
+
|
128 |
+
// Consistency with PHP's behavior
|
129 |
+
if ($start === RandomCompat_strlen($binary_string) && $length === 0) {
|
130 |
+
return '';
|
131 |
+
}
|
132 |
+
if ($start > RandomCompat_strlen($binary_string)) {
|
133 |
+
return '';
|
134 |
+
}
|
135 |
+
|
136 |
+
return (string) mb_substr($binary_string, $start, $length, '8bit');
|
137 |
+
}
|
138 |
+
|
139 |
+
} else {
|
140 |
+
|
141 |
+
/**
|
142 |
+
* substr() implementation that isn't brittle to mbstring.func_overload
|
143 |
+
*
|
144 |
+
* This version just uses the default substr()
|
145 |
+
*
|
146 |
+
* @param string $binary_string
|
147 |
+
* @param int $start
|
148 |
+
* @param int $length (optional)
|
149 |
+
*
|
150 |
+
* @throws TypeError
|
151 |
+
*
|
152 |
+
* @return string
|
153 |
+
*/
|
154 |
+
function RandomCompat_substr($binary_string, $start, $length = null)
|
155 |
+
{
|
156 |
+
if (!is_string($binary_string)) {
|
157 |
+
throw new TypeError(
|
158 |
+
'RandomCompat_substr(): First argument should be a string'
|
159 |
+
);
|
160 |
+
}
|
161 |
+
|
162 |
+
if (!is_int($start)) {
|
163 |
+
throw new TypeError(
|
164 |
+
'RandomCompat_substr(): Second argument should be an integer'
|
165 |
+
);
|
166 |
+
}
|
167 |
+
|
168 |
+
if ($length !== null) {
|
169 |
+
if (!is_int($length)) {
|
170 |
+
throw new TypeError(
|
171 |
+
'RandomCompat_substr(): Third argument should be an integer, or omitted'
|
172 |
+
);
|
173 |
+
}
|
174 |
+
|
175 |
+
return (string) substr($binary_string, $start, $length);
|
176 |
+
}
|
177 |
+
|
178 |
+
return (string) substr($binary_string, $start);
|
179 |
+
}
|
180 |
+
}
|
181 |
+
}
|
vendor/paragonie/random_compat/lib/cast_to_int.php
ADDED
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Random_* Compatibility Library
|
4 |
+
* for using the new PHP 7 random_* API in PHP 5 projects
|
5 |
+
*
|
6 |
+
* The MIT License (MIT)
|
7 |
+
*
|
8 |
+
* Copyright (c) 2015 - 2017 Paragon Initiative Enterprises
|
9 |
+
*
|
10 |
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
11 |
+
* of this software and associated documentation files (the "Software"), to deal
|
12 |
+
* in the Software without restriction, including without limitation the rights
|
13 |
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
14 |
+
* copies of the Software, and to permit persons to whom the Software is
|
15 |
+
* furnished to do so, subject to the following conditions:
|
16 |
+
*
|
17 |
+
* The above copyright notice and this permission notice shall be included in
|
18 |
+
* all copies or substantial portions of the Software.
|
19 |
+
*
|
20 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
21 |
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
22 |
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
23 |
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
24 |
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
25 |
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
26 |
+
* SOFTWARE.
|
27 |
+
*/
|
28 |
+
|
29 |
+
if (!is_callable('RandomCompat_intval')) {
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Cast to an integer if we can, safely.
|
33 |
+
*
|
34 |
+
* If you pass it a float in the range (~PHP_INT_MAX, PHP_INT_MAX)
|
35 |
+
* (non-inclusive), it will sanely cast it to an int. If you it's equal to
|
36 |
+
* ~PHP_INT_MAX or PHP_INT_MAX, we let it fail as not an integer. Floats
|
37 |
+
* lose precision, so the <= and => operators might accidentally let a float
|
38 |
+
* through.
|
39 |
+
*
|
40 |
+
* @param int|float $number The number we want to convert to an int
|
41 |
+
* @param bool $fail_open Set to true to not throw an exception
|
42 |
+
*
|
43 |
+
* @return float|int
|
44 |
+
* @psalm-suppress InvalidReturnType
|
45 |
+
*
|
46 |
+
* @throws TypeError
|
47 |
+
*/
|
48 |
+
function RandomCompat_intval($number, $fail_open = false)
|
49 |
+
{
|
50 |
+
if (is_int($number) || is_float($number)) {
|
51 |
+
$number += 0;
|
52 |
+
} elseif (is_numeric($number)) {
|
53 |
+
$number += 0;
|
54 |
+
}
|
55 |
+
|
56 |
+
if (
|
57 |
+
is_float($number)
|
58 |
+
&&
|
59 |
+
$number > ~PHP_INT_MAX
|
60 |
+
&&
|
61 |
+
$number < PHP_INT_MAX
|
62 |
+
) {
|
63 |
+
$number = (int) $number;
|
64 |
+
}
|
65 |
+
|
66 |
+
if (is_int($number)) {
|
67 |
+
return (int) $number;
|
68 |
+
} elseif (!$fail_open) {
|
69 |
+
throw new TypeError(
|
70 |
+
'Expected an integer.'
|
71 |
+
);
|
72 |
+
}
|
73 |
+
return $number;
|
74 |
+
}
|
75 |
+
}
|
vendor/paragonie/random_compat/lib/error_polyfill.php
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Random_* Compatibility Library
|
4 |
+
* for using the new PHP 7 random_* API in PHP 5 projects
|
5 |
+
*
|
6 |
+
* The MIT License (MIT)
|
7 |
+
*
|
8 |
+
* Copyright (c) 2015 - 2017 Paragon Initiative Enterprises
|
9 |
+
*
|
10 |
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
11 |
+
* of this software and associated documentation files (the "Software"), to deal
|
12 |
+
* in the Software without restriction, including without limitation the rights
|
13 |
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
14 |
+
* copies of the Software, and to permit persons to whom the Software is
|
15 |
+
* furnished to do so, subject to the following conditions:
|
16 |
+
*
|
17 |
+
* The above copyright notice and this permission notice shall be included in
|
18 |
+
* all copies or substantial portions of the Software.
|
19 |
+
*
|
20 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
21 |
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
22 |
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
23 |
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
24 |
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
25 |
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
26 |
+
* SOFTWARE.
|
27 |
+
*/
|
28 |
+
|
29 |
+
if (!class_exists('Error', false)) {
|
30 |
+
// We can't really avoid making this extend Exception in PHP 5.
|
31 |
+
class Error extends Exception
|
32 |
+
{
|
33 |
+
|
34 |
+
}
|
35 |
+
}
|
36 |
+
|
37 |
+
if (!class_exists('TypeError', false)) {
|
38 |
+
if (is_subclass_of('Error', 'Exception')) {
|
39 |
+
class TypeError extends Error
|
40 |
+
{
|
41 |
+
|
42 |
+
}
|
43 |
+
} else {
|
44 |
+
class TypeError extends Exception
|
45 |
+
{
|
46 |
+
|
47 |
+
}
|
48 |
+
}
|
49 |
+
}
|
vendor/paragonie/random_compat/lib/random.php
ADDED
@@ -0,0 +1,225 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Random_* Compatibility Library
|
4 |
+
* for using the new PHP 7 random_* API in PHP 5 projects
|
5 |
+
*
|
6 |
+
* @version 2.0.10
|
7 |
+
* @released 2017-03-13
|
8 |
+
*
|
9 |
+
* The MIT License (MIT)
|
10 |
+
*
|
11 |
+
* Copyright (c) 2015 - 2017 Paragon Initiative Enterprises
|
12 |
+
*
|
13 |
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
14 |
+
* of this software and associated documentation files (the "Software"), to deal
|
15 |
+
* in the Software without restriction, including without limitation the rights
|
16 |
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
17 |
+
* copies of the Software, and to permit persons to whom the Software is
|
18 |
+
* furnished to do so, subject to the following conditions:
|
19 |
+
*
|
20 |
+
* The above copyright notice and this permission notice shall be included in
|
21 |
+
* all copies or substantial portions of the Software.
|
22 |
+
*
|
23 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
24 |
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
25 |
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
26 |
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
27 |
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
28 |
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
29 |
+
* SOFTWARE.
|
30 |
+
*/
|
31 |
+
|
32 |
+
if (!defined('PHP_VERSION_ID')) {
|
33 |
+
// This constant was introduced in PHP 5.2.7
|
34 |
+
$RandomCompatversion = array_map('intval', explode('.', PHP_VERSION));
|
35 |
+
define(
|
36 |
+
'PHP_VERSION_ID',
|
37 |
+
$RandomCompatversion[0] * 10000
|
38 |
+
+ $RandomCompatversion[1] * 100
|
39 |
+
+ $RandomCompatversion[2]
|
40 |
+
);
|
41 |
+
$RandomCompatversion = null;
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* PHP 7.0.0 and newer have these functions natively.
|
46 |
+
*/
|
47 |
+
if (PHP_VERSION_ID >= 70000) {
|
48 |
+
return;
|
49 |
+
}
|
50 |
+
|
51 |
+
if (!defined('RANDOM_COMPAT_READ_BUFFER')) {
|
52 |
+
define('RANDOM_COMPAT_READ_BUFFER', 8);
|
53 |
+
}
|
54 |
+
|
55 |
+
$RandomCompatDIR = dirname(__FILE__);
|
56 |
+
|
57 |
+
require_once $RandomCompatDIR . '/byte_safe_strings.php';
|
58 |
+
require_once $RandomCompatDIR . '/cast_to_int.php';
|
59 |
+
require_once $RandomCompatDIR . '/error_polyfill.php';
|
60 |
+
|
61 |
+
if (!is_callable('random_bytes')) {
|
62 |
+
/**
|
63 |
+
* PHP 5.2.0 - 5.6.x way to implement random_bytes()
|
64 |
+
*
|
65 |
+
* We use conditional statements here to define the function in accordance
|
66 |
+
* to the operating environment. It's a micro-optimization.
|
67 |
+
*
|
68 |
+
* In order of preference:
|
69 |
+
* 1. Use libsodium if available.
|
70 |
+
* 2. fread() /dev/urandom if available (never on Windows)
|
71 |
+
* 3. mcrypt_create_iv($bytes, MCRYPT_DEV_URANDOM)
|
72 |
+
* 4. COM('CAPICOM.Utilities.1')->GetRandom()
|
73 |
+
*
|
74 |
+
* See RATIONALE.md for our reasoning behind this particular order
|
75 |
+
*/
|
76 |
+
if (extension_loaded('libsodium')) {
|
77 |
+
// See random_bytes_libsodium.php
|
78 |
+
if (PHP_VERSION_ID >= 50300 && is_callable('\\Sodium\\randombytes_buf')) {
|
79 |
+
require_once $RandomCompatDIR . '/random_bytes_libsodium.php';
|
80 |
+
} elseif (method_exists('Sodium', 'randombytes_buf')) {
|
81 |
+
require_once $RandomCompatDIR . '/random_bytes_libsodium_legacy.php';
|
82 |
+
}
|
83 |
+
}
|
84 |
+
|
85 |
+
/**
|
86 |
+
* Reading directly from /dev/urandom:
|
87 |
+
*/
|
88 |
+
if (DIRECTORY_SEPARATOR === '/') {
|
89 |
+
// DIRECTORY_SEPARATOR === '/' on Unix-like OSes -- this is a fast
|
90 |
+
// way to exclude Windows.
|
91 |
+
$RandomCompatUrandom = true;
|
92 |
+
$RandomCompat_basedir = ini_get('open_basedir');
|
93 |
+
|
94 |
+
if (!empty($RandomCompat_basedir)) {
|
95 |
+
$RandomCompat_open_basedir = explode(
|
96 |
+
PATH_SEPARATOR,
|
97 |
+
strtolower($RandomCompat_basedir)
|
98 |
+
);
|
99 |
+
$RandomCompatUrandom = (array() !== array_intersect(
|
100 |
+
array('/dev', '/dev/', '/dev/urandom'),
|
101 |
+
$RandomCompat_open_basedir
|
102 |
+
));
|
103 |
+
$RandomCompat_open_basedir = null;
|
104 |
+
}
|
105 |
+
|
106 |
+
if (
|
107 |
+
!is_callable('random_bytes')
|
108 |
+
&&
|
109 |
+
$RandomCompatUrandom
|
110 |
+
&&
|
111 |
+
@is_readable('/dev/urandom')
|
112 |
+
) {
|
113 |
+
// Error suppression on is_readable() in case of an open_basedir
|
114 |
+
// or safe_mode failure. All we care about is whether or not we
|
115 |
+
// can read it at this point. If the PHP environment is going to
|
116 |
+
// panic over trying to see if the file can be read in the first
|
117 |
+
// place, that is not helpful to us here.
|
118 |
+
|
119 |
+
// See random_bytes_dev_urandom.php
|
120 |
+
require_once $RandomCompatDIR . '/random_bytes_dev_urandom.php';
|
121 |
+
}
|
122 |
+
// Unset variables after use
|
123 |
+
$RandomCompat_basedir = null;
|
124 |
+
} else {
|
125 |
+
$RandomCompatUrandom = false;
|
126 |
+
}
|
127 |
+
|
128 |
+
/**
|
129 |
+
* mcrypt_create_iv()
|
130 |
+
*
|
131 |
+
* We only want to use mcypt_create_iv() if:
|
132 |
+
*
|
133 |
+
* - random_bytes() hasn't already been defined
|
134 |
+
* - the mcrypt extensions is loaded
|
135 |
+
* - One of these two conditions is true:
|
136 |
+
* - We're on Windows (DIRECTORY_SEPARATOR !== '/')
|
137 |
+
* - We're not on Windows and /dev/urandom is readabale
|
138 |
+
* (i.e. we're not in a chroot jail)
|
139 |
+
* - Special case:
|
140 |
+
* - If we're not on Windows, but the PHP version is between
|
141 |
+
* 5.6.10 and 5.6.12, we don't want to use mcrypt. It will
|
142 |
+
* hang indefinitely. This is bad.
|
143 |
+
* - If we're on Windows, we want to use PHP >= 5.3.7 or else
|
144 |
+
* we get insufficient entropy errors.
|
145 |
+
*/
|
146 |
+
if (
|
147 |
+
!is_callable('random_bytes')
|
148 |
+
&&
|
149 |
+
// Windows on PHP < 5.3.7 is broken, but non-Windows is not known to be.
|
150 |
+
(DIRECTORY_SEPARATOR === '/' || PHP_VERSION_ID >= 50307)
|
151 |
+
&&
|
152 |
+
// Prevent this code from hanging indefinitely on non-Windows;
|
153 |
+
// see https://bugs.php.net/bug.php?id=69833
|
154 |
+
(
|
155 |
+
DIRECTORY_SEPARATOR !== '/' ||
|
156 |
+
(PHP_VERSION_ID <= 50609 || PHP_VERSION_ID >= 50613)
|
157 |
+
)
|
158 |
+
&&
|
159 |
+
extension_loaded('mcrypt')
|
160 |
+
) {
|
161 |
+
// See random_bytes_mcrypt.php
|
162 |
+
require_once $RandomCompatDIR . '/random_bytes_mcrypt.php';
|
163 |
+
}
|
164 |
+
$RandomCompatUrandom = null;
|
165 |
+
|
166 |
+
/**
|
167 |
+
* This is a Windows-specific fallback, for when the mcrypt extension
|
168 |
+
* isn't loaded.
|
169 |
+
*/
|
170 |
+
if (
|
171 |
+
!is_callable('random_bytes')
|
172 |
+
&&
|
173 |
+
extension_loaded('com_dotnet')
|
174 |
+
&&
|
175 |
+
class_exists('COM')
|
176 |
+
) {
|
177 |
+
$RandomCompat_disabled_classes = preg_split(
|
178 |
+
'#\s*,\s*#',
|
179 |
+
strtolower(ini_get('disable_classes'))
|
180 |
+
);
|
181 |
+
|
182 |
+
if (!in_array('com', $RandomCompat_disabled_classes)) {
|
183 |
+
try {
|
184 |
+
$RandomCompatCOMtest = new COM('CAPICOM.Utilities.1');
|
185 |
+
if (method_exists($RandomCompatCOMtest, 'GetRandom')) {
|
186 |
+
// See random_bytes_com_dotnet.php
|
187 |
+
require_once $RandomCompatDIR . '/random_bytes_com_dotnet.php';
|
188 |
+
}
|
189 |
+
} catch (com_exception $e) {
|
190 |
+
// Don't try to use it.
|
191 |
+
}
|
192 |
+
}
|
193 |
+
$RandomCompat_disabled_classes = null;
|
194 |
+
$RandomCompatCOMtest = null;
|
195 |
+
}
|
196 |
+
|
197 |
+
/**
|
198 |
+
* throw new Exception
|
199 |
+
*/
|
200 |
+
if (!is_callable('random_bytes')) {
|
201 |
+
/**
|
202 |
+
* We don't have any more options, so let's throw an exception right now
|
203 |
+
* and hope the developer won't let it fail silently.
|
204 |
+
*
|
205 |
+
* @param mixed $length
|
206 |
+
* @psalm-suppress MissingReturnType
|
207 |
+
* @throws Exception
|
208 |
+
* @return string
|
209 |
+
*/
|
210 |
+
function random_bytes($length)
|
211 |
+
{
|
212 |
+
unset($length); // Suppress "variable not used" warnings.
|
213 |
+
throw new Exception(
|
214 |
+
'There is no suitable CSPRNG installed on your system'
|
215 |
+
);
|
216 |
+
return '';
|
217 |
+
}
|
218 |
+
}
|
219 |
+
}
|
220 |
+
|
221 |
+
if (!is_callable('random_int')) {
|
222 |
+
require_once $RandomCompatDIR . '/random_int.php';
|
223 |
+
}
|
224 |
+
|
225 |
+
$RandomCompatDIR = null;
|
vendor/paragonie/random_compat/lib/random_bytes_com_dotnet.php
ADDED
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Random_* Compatibility Library
|
4 |
+
* for using the new PHP 7 random_* API in PHP 5 projects
|
5 |
+
*
|
6 |
+
* The MIT License (MIT)
|
7 |
+
*
|
8 |
+
* Copyright (c) 2015 - 2017 Paragon Initiative Enterprises
|
9 |
+
*
|
10 |
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
11 |
+
* of this software and associated documentation files (the "Software"), to deal
|
12 |
+
* in the Software without restriction, including without limitation the rights
|
13 |
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
14 |
+
* copies of the Software, and to permit persons to whom the Software is
|
15 |
+
* furnished to do so, subject to the following conditions:
|
16 |
+
*
|
17 |
+
* The above copyright notice and this permission notice shall be included in
|
18 |
+
* all copies or substantial portions of the Software.
|
19 |
+
*
|
20 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
21 |
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
22 |
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
23 |
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
24 |
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
25 |
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
26 |
+
* SOFTWARE.
|
27 |
+
*/
|
28 |
+
|
29 |
+
if (!is_callable('random_bytes')) {
|
30 |
+
/**
|
31 |
+
* Windows with PHP < 5.3.0 will not have the function
|
32 |
+
* openssl_random_pseudo_bytes() available, so let's use
|
33 |
+
* CAPICOM to work around this deficiency.
|
34 |
+
*
|
35 |
+
* @param int $bytes
|
36 |
+
*
|
37 |
+
* @throws Exception
|
38 |
+
*
|
39 |
+
* @return string
|
40 |
+
*/
|
41 |
+
function random_bytes($bytes)
|
42 |
+
{
|
43 |
+
try {
|
44 |
+
$bytes = RandomCompat_intval($bytes);
|
45 |
+
} catch (TypeError $ex) {
|
46 |
+
throw new TypeError(
|
47 |
+
'random_bytes(): $bytes must be an integer'
|
48 |
+
);
|
49 |
+
}
|
50 |
+
|
51 |
+
if ($bytes < 1) {
|
52 |
+
throw new Error(
|
53 |
+
'Length must be greater than 0'
|
54 |
+
);
|
55 |
+
}
|
56 |
+
|
57 |
+
$buf = '';
|
58 |
+
if (!class_exists('COM')) {
|
59 |
+
throw new Error(
|
60 |
+
'COM does not exist'
|
61 |
+
);
|
62 |
+
}
|
63 |
+
$util = new COM('CAPICOM.Utilities.1');
|
64 |
+
$execCount = 0;
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Let's not let it loop forever. If we run N times and fail to
|
68 |
+
* get N bytes of random data, then CAPICOM has failed us.
|
69 |
+
*/
|
70 |
+
do {
|
71 |
+
$buf .= base64_decode($util->GetRandom($bytes, 0));
|
72 |
+
if (RandomCompat_strlen($buf) >= $bytes) {
|
73 |
+
/**
|
74 |
+
* Return our random entropy buffer here:
|
75 |
+
*/
|
76 |
+
return RandomCompat_substr($buf, 0, $bytes);
|
77 |
+
}
|
78 |
+
++$execCount;
|
79 |
+
} while ($execCount < $bytes);
|
80 |
+
|
81 |
+
/**
|
82 |
+
* If we reach here, PHP has failed us.
|
83 |
+
*/
|
84 |
+
throw new Exception(
|
85 |
+
'Could not gather sufficient random data'
|
86 |
+
);
|
87 |
+
}
|
88 |
+
}
|
vendor/paragonie/random_compat/lib/random_bytes_dev_urandom.php
ADDED
@@ -0,0 +1,167 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Random_* Compatibility Library
|
4 |
+
* for using the new PHP 7 random_* API in PHP 5 projects
|
5 |
+
*
|
6 |
+
* The MIT License (MIT)
|
7 |
+
*
|
8 |
+
* Copyright (c) 2015 - 2017 Paragon Initiative Enterprises
|
9 |
+
*
|
10 |
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
11 |
+
* of this software and associated documentation files (the "Software"), to deal
|
12 |
+
* in the Software without restriction, including without limitation the rights
|
13 |
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
14 |
+
* copies of the Software, and to permit persons to whom the Software is
|
15 |
+
* furnished to do so, subject to the following conditions:
|
16 |
+
*
|
17 |
+
* The above copyright notice and this permission notice shall be included in
|
18 |
+
* all copies or substantial portions of the Software.
|
19 |
+
*
|
20 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
21 |
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
22 |
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
23 |
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
24 |
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
25 |
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
26 |
+
* SOFTWARE.
|
27 |
+
*/
|
28 |
+
|
29 |
+
if (!defined('RANDOM_COMPAT_READ_BUFFER')) {
|
30 |
+
define('RANDOM_COMPAT_READ_BUFFER', 8);
|
31 |
+
}
|
32 |
+
|
33 |
+
if (!is_callable('random_bytes')) {
|
34 |
+
/**
|
35 |
+
* Unless open_basedir is enabled, use /dev/urandom for
|
36 |
+
* random numbers in accordance with best practices
|
37 |
+
*
|
38 |
+
* Why we use /dev/urandom and not /dev/random
|
39 |
+
* @ref http://sockpuppet.org/blog/2014/02/25/safely-generate-random-numbers
|
40 |
+
*
|
41 |
+
* @param int $bytes
|
42 |
+
*
|
43 |
+
* @throws Exception
|
44 |
+
*
|
45 |
+
* @return string
|
46 |
+
*/
|
47 |
+
function random_bytes($bytes)
|
48 |
+
{
|
49 |
+
static $fp = null;
|
50 |
+
/**
|
51 |
+
* This block should only be run once
|
52 |
+
*/
|
53 |
+
if (empty($fp)) {
|
54 |
+
/**
|
55 |
+
* We use /dev/urandom if it is a char device.
|
56 |
+
* We never fall back to /dev/random
|
57 |
+
*/
|
58 |
+
$fp = fopen('/dev/urandom', 'rb');
|
59 |
+
if (!empty($fp)) {
|
60 |
+
$st = fstat($fp);
|
61 |
+
if (($st['mode'] & 0170000) !== 020000) {
|
62 |
+
fclose($fp);
|
63 |
+
$fp = false;
|
64 |
+
}
|
65 |
+
}
|
66 |
+
|
67 |
+
if (!empty($fp)) {
|
68 |
+
/**
|
69 |
+
* stream_set_read_buffer() does not exist in HHVM
|
70 |
+
*
|
71 |
+
* If we don't set the stream's read buffer to 0, PHP will
|
72 |
+
* internally buffer 8192 bytes, which can waste entropy
|
73 |
+
*
|
74 |
+
* stream_set_read_buffer returns 0 on success
|
75 |
+
*/
|
76 |
+
if (is_callable('stream_set_read_buffer')) {
|
77 |
+
stream_set_read_buffer($fp, RANDOM_COMPAT_READ_BUFFER);
|
78 |
+
}
|
79 |
+
if (is_callable('stream_set_chunk_size')) {
|
80 |
+
stream_set_chunk_size($fp, RANDOM_COMPAT_READ_BUFFER);
|
81 |
+
}
|
82 |
+
}
|
83 |
+
}
|
84 |
+
|
85 |
+
try {
|
86 |
+
$bytes = RandomCompat_intval($bytes);
|
87 |
+
} catch (TypeError $ex) {
|
88 |
+
throw new TypeError(
|
89 |
+
'random_bytes(): $bytes must be an integer'
|
90 |
+
);
|
91 |
+
}
|
92 |
+
|
93 |
+
if ($bytes < 1) {
|
94 |
+
throw new Error(
|
95 |
+
'Length must be greater than 0'
|
96 |
+
);
|
97 |
+
}
|
98 |
+
|
99 |
+
/**
|
100 |
+
* This if() block only runs if we managed to open a file handle
|
101 |
+
*
|
102 |
+
* It does not belong in an else {} block, because the above
|
103 |
+
* if (empty($fp)) line is logic that should only be run once per
|
104 |
+
* page load.
|
105 |
+
*/
|
106 |
+
if (!empty($fp)) {
|
107 |
+
/**
|
108 |
+
* @var int
|
109 |
+
*/
|
110 |
+
$remaining = $bytes;
|
111 |
+
|
112 |
+
/**
|
113 |
+
* @var string|bool
|
114 |
+
*/
|
115 |
+
$buf = '';
|
116 |
+
|
117 |
+
/**
|
118 |
+
* We use fread() in a loop to protect against partial reads
|
119 |
+
*/
|
120 |
+
do {
|
121 |
+
/**
|
122 |
+
* @var string|bool
|
123 |
+
*/
|
124 |
+
$read = fread($fp, $remaining);
|
125 |
+
if (!is_string($read)) {
|
126 |
+
if ($read === false) {
|
127 |
+
/**
|
128 |
+
* We cannot safely read from the file. Exit the
|
129 |
+
* do-while loop and trigger the exception condition
|
130 |
+
*
|
131 |
+
* @var string|bool
|
132 |
+
*/
|
133 |
+
$buf = false;
|
134 |
+
break;
|
135 |
+
}
|
136 |
+
}
|
137 |
+
/**
|
138 |
+
* Decrease the number of bytes returned from remaining
|
139 |
+
*/
|
140 |
+
$remaining -= RandomCompat_strlen($read);
|
141 |
+
/**
|
142 |
+
* @var string|bool
|
143 |
+
*/
|
144 |
+
$buf = $buf . $read;
|
145 |
+
} while ($remaining > 0);
|
146 |
+
|
147 |
+
/**
|
148 |
+
* Is our result valid?
|
149 |
+
*/
|
150 |
+
if (is_string($buf)) {
|
151 |
+
if (RandomCompat_strlen($buf) === $bytes) {
|
152 |
+
/**
|
153 |
+
* Return our random entropy buffer here:
|
154 |
+
*/
|
155 |
+
return $buf;
|
156 |
+
}
|
157 |
+
}
|
158 |
+
}
|
159 |
+
|
160 |
+
/**
|
161 |
+
* If we reach here, PHP has failed us.
|
162 |
+
*/
|
163 |
+
throw new Exception(
|
164 |
+
'Error reading from source device'
|
165 |
+
);
|
166 |
+
}
|
167 |
+
}
|
vendor/paragonie/random_compat/lib/random_bytes_libsodium.php
ADDED
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Random_* Compatibility Library
|
4 |
+
* for using the new PHP 7 random_* API in PHP 5 projects
|
5 |
+
*
|
6 |
+
* The MIT License (MIT)
|
7 |
+
*
|
8 |
+
* Copyright (c) 2015 - 2017 Paragon Initiative Enterprises
|
9 |
+
*
|
10 |
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
11 |
+
* of this software and associated documentation files (the "Software"), to deal
|
12 |
+
* in the Software without restriction, including without limitation the rights
|
13 |
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
14 |
+
* copies of the Software, and to permit persons to whom the Software is
|
15 |
+
* furnished to do so, subject to the following conditions:
|
16 |
+
*
|
17 |
+
* The above copyright notice and this permission notice shall be included in
|
18 |
+
* all copies or substantial portions of the Software.
|
19 |
+
*
|
20 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
21 |
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
22 |
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
23 |
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
24 |
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
25 |
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
26 |
+
* SOFTWARE.
|
27 |
+
*/
|
28 |
+
|
29 |
+
if (!is_callable('random_bytes')) {
|
30 |
+
/**
|
31 |
+
* If the libsodium PHP extension is loaded, we'll use it above any other
|
32 |
+
* solution.
|
33 |
+
*
|
34 |
+
* libsodium-php project:
|
35 |
+
* @ref https://github.com/jedisct1/libsodium-php
|
36 |
+
*
|
37 |
+
* @param int $bytes
|
38 |
+
*
|
39 |
+
* @throws Exception
|
40 |
+
*
|
41 |
+
* @return string
|
42 |
+
*/
|
43 |
+
function random_bytes($bytes)
|
44 |
+
{
|
45 |
+
try {
|
46 |
+
$bytes = RandomCompat_intval($bytes);
|
47 |
+
} catch (TypeError $ex) {
|
48 |
+
throw new TypeError(
|
49 |
+
'random_bytes(): $bytes must be an integer'
|
50 |
+
);
|
51 |
+
}
|
52 |
+
|
53 |
+
if ($bytes < 1) {
|
54 |
+
throw new Error(
|
55 |
+
'Length must be greater than 0'
|
56 |
+
);
|
57 |
+
}
|
58 |
+
|
59 |
+
/**
|
60 |
+
* \Sodium\randombytes_buf() doesn't allow more than 2147483647 bytes to be
|
61 |
+
* generated in one invocation.
|
62 |
+
*/
|
63 |
+
if ($bytes > 2147483647) {
|
64 |
+
$buf = '';
|
65 |
+
for ($i = 0; $i < $bytes; $i += 1073741824) {
|
66 |
+
$n = ($bytes - $i) > 1073741824
|
67 |
+
? 1073741824
|
68 |
+
: $bytes - $i;
|
69 |
+
$buf .= \Sodium\randombytes_buf($n);
|
70 |
+
}
|
71 |
+
} else {
|
72 |
+
$buf = \Sodium\randombytes_buf($bytes);
|
73 |
+
}
|
74 |
+
|
75 |
+
if ($buf !== false) {
|
76 |
+
if (RandomCompat_strlen($buf) === $bytes) {
|
77 |
+
return $buf;
|
78 |
+
}
|
79 |
+
}
|
80 |
+
|
81 |
+
/**
|
82 |
+
* If we reach here, PHP has failed us.
|
83 |
+
*/
|
84 |
+
throw new Exception(
|
85 |
+
'Could not gather sufficient random data'
|
86 |
+
);
|
87 |
+
}
|
88 |
+
}
|
vendor/paragonie/random_compat/lib/random_bytes_libsodium_legacy.php
ADDED
@@ -0,0 +1,92 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Random_* Compatibility Library
|
4 |
+
* for using the new PHP 7 random_* API in PHP 5 projects
|
5 |
+
*
|
6 |
+
* The MIT License (MIT)
|
7 |
+
*
|
8 |
+
* Copyright (c) 2015 - 2017 Paragon Initiative Enterprises
|
9 |
+
*
|
10 |
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
11 |
+
* of this software and associated documentation files (the "Software"), to deal
|
12 |
+
* in the Software without restriction, including without limitation the rights
|
13 |
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
14 |
+
* copies of the Software, and to permit persons to whom the Software is
|
15 |
+
* furnished to do so, subject to the following conditions:
|
16 |
+
*
|
17 |
+
* The above copyright notice and this permission notice shall be included in
|
18 |
+
* all copies or substantial portions of the Software.
|
19 |
+
*
|
20 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
21 |
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
22 |
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
23 |
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
24 |
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
25 |
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
26 |
+
* SOFTWARE.
|
27 |
+
*/
|
28 |
+
|
29 |
+
if (!is_callable('random_bytes')) {
|
30 |
+
/**
|
31 |
+
* If the libsodium PHP extension is loaded, we'll use it above any other
|
32 |
+
* solution.
|
33 |
+
*
|
34 |
+
* libsodium-php project:
|
35 |
+
* @ref https://github.com/jedisct1/libsodium-php
|
36 |
+
*
|
37 |
+
* @param int $bytes
|
38 |
+
*
|
39 |
+
* @throws Exception
|
40 |
+
*
|
41 |
+
* @return string
|
42 |
+
*/
|
43 |
+
function random_bytes($bytes)
|
44 |
+
{
|
45 |
+
try {
|
46 |
+
$bytes = RandomCompat_intval($bytes);
|
47 |
+
} catch (TypeError $ex) {
|
48 |
+
throw new TypeError(
|
49 |
+
'random_bytes(): $bytes must be an integer'
|
50 |
+
);
|
51 |
+
}
|
52 |
+
|
53 |
+
if ($bytes < 1) {
|
54 |
+
throw new Error(
|
55 |
+
'Length must be greater than 0'
|
56 |
+
);
|
57 |
+
}
|
58 |
+
|
59 |
+
/**
|
60 |
+
* @var string
|
61 |
+
*/
|
62 |
+
$buf = '';
|
63 |
+
|
64 |
+
/**
|
65 |
+
* \Sodium\randombytes_buf() doesn't allow more than 2147483647 bytes to be
|
66 |
+
* generated in one invocation.
|
67 |
+
*/
|
68 |
+
if ($bytes > 2147483647) {
|
69 |
+
for ($i = 0; $i < $bytes; $i += 1073741824) {
|
70 |
+
$n = ($bytes - $i) > 1073741824
|
71 |
+
? 1073741824
|
72 |
+
: $bytes - $i;
|
73 |
+
$buf .= Sodium::randombytes_buf((int) $n);
|
74 |
+
}
|
75 |
+
} else {
|
76 |
+
$buf .= Sodium::randombytes_buf((int) $bytes);
|
77 |
+
}
|
78 |
+
|
79 |
+
if (is_string($buf)) {
|
80 |
+
if (RandomCompat_strlen($buf) === $bytes) {
|
81 |
+
return $buf;
|
82 |
+
}
|
83 |
+
}
|
84 |
+
|
85 |
+
/**
|
86 |
+
* If we reach here, PHP has failed us.
|
87 |
+
*/
|
88 |
+
throw new Exception(
|
89 |
+
'Could not gather sufficient random data'
|
90 |
+
);
|
91 |
+
}
|
92 |
+
}
|
vendor/paragonie/random_compat/lib/random_bytes_mcrypt.php
ADDED
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Random_* Compatibility Library
|
4 |
+
* for using the new PHP 7 random_* API in PHP 5 projects
|
5 |
+
*
|
6 |
+
* The MIT License (MIT)
|
7 |
+
*
|
8 |
+
* Copyright (c) 2015 - 2017 Paragon Initiative Enterprises
|
9 |
+
*
|
10 |
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
11 |
+
* of this software and associated documentation files (the "Software"), to deal
|
12 |
+
* in the Software without restriction, including without limitation the rights
|
13 |
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
14 |
+
* copies of the Software, and to permit persons to whom the Software is
|
15 |
+
* furnished to do so, subject to the following conditions:
|
16 |
+
*
|
17 |
+
* The above copyright notice and this permission notice shall be included in
|
18 |
+
* all copies or substantial portions of the Software.
|
19 |
+
*
|
20 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
21 |
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
22 |
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
23 |
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
24 |
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
25 |
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
26 |
+
* SOFTWARE.
|
27 |
+
*/
|
28 |
+
|
29 |
+
if (!is_callable('random_bytes')) {
|
30 |
+
/**
|
31 |
+
* Powered by ext/mcrypt (and thankfully NOT libmcrypt)
|
32 |
+
*
|
33 |
+
* @ref https://bugs.php.net/bug.php?id=55169
|
34 |
+
* @ref https://github.com/php/php-src/blob/c568ffe5171d942161fc8dda066bce844bdef676/ext/mcrypt/mcrypt.c#L1321-L1386
|
35 |
+
*
|
36 |
+
* @param int $bytes
|
37 |
+
*
|
38 |
+
* @throws Exception
|
39 |
+
*
|
40 |
+
* @return string
|
41 |
+
*/
|
42 |
+
function random_bytes($bytes)
|
43 |
+
{
|
44 |
+
try {
|
45 |
+
$bytes = RandomCompat_intval($bytes);
|
46 |
+
} catch (TypeError $ex) {
|
47 |
+
throw new TypeError(
|
48 |
+
'random_bytes(): $bytes must be an integer'
|
49 |
+
);
|
50 |
+
}
|
51 |
+
|
52 |
+
if ($bytes < 1) {
|
53 |
+
throw new Error(
|
54 |
+
'Length must be greater than 0'
|
55 |
+
);
|
56 |
+
}
|
57 |
+
|
58 |
+
$buf = @mcrypt_create_iv($bytes, MCRYPT_DEV_URANDOM);
|
59 |
+
if (
|
60 |
+
$buf !== false
|
61 |
+
&&
|
62 |
+
RandomCompat_strlen($buf) === $bytes
|
63 |
+
) {
|
64 |
+
/**
|
65 |
+
* Return our random entropy buffer here:
|
66 |
+
*/
|
67 |
+
return $buf;
|
68 |
+
}
|
69 |
+
|
70 |
+
/**
|
71 |
+
* If we reach here, PHP has failed us.
|
72 |
+
*/
|
73 |
+
throw new Exception(
|
74 |
+
'Could not gather sufficient random data'
|
75 |
+
);
|
76 |
+
}
|
77 |
+
}
|
vendor/paragonie/random_compat/lib/random_int.php
ADDED
@@ -0,0 +1,190 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if (!is_callable('random_int')) {
|
4 |
+
/**
|
5 |
+
* Random_* Compatibility Library
|
6 |
+
* for using the new PHP 7 random_* API in PHP 5 projects
|
7 |
+
*
|
8 |
+
* The MIT License (MIT)
|
9 |
+
*
|
10 |
+
* Copyright (c) 2015 - 2017 Paragon Initiative Enterprises
|
11 |
+
*
|
12 |
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
13 |
+
* of this software and associated documentation files (the "Software"), to deal
|
14 |
+
* in the Software without restriction, including without limitation the rights
|
15 |
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
16 |
+
* copies of the Software, and to permit persons to whom the Software is
|
17 |
+
* furnished to do so, subject to the following conditions:
|
18 |
+
*
|
19 |
+
* The above copyright notice and this permission notice shall be included in
|
20 |
+
* all copies or substantial portions of the Software.
|
21 |
+
*
|
22 |
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
23 |
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
24 |
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
25 |
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
26 |
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
27 |
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
28 |
+
* SOFTWARE.
|
29 |
+
*/
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Fetch a random integer between $min and $max inclusive
|
33 |
+
*
|
34 |
+
* @param int $min
|
35 |
+
* @param int $max
|
36 |
+
*
|
37 |
+
* @throws Exception
|
38 |
+
*
|
39 |
+
* @return int
|
40 |
+
*/
|
41 |
+
function random_int($min, $max)
|
42 |
+
{
|
43 |
+
/**
|
44 |
+
* Type and input logic checks
|
45 |
+
*
|
46 |
+
* If you pass it a float in the range (~PHP_INT_MAX, PHP_INT_MAX)
|
47 |
+
* (non-inclusive), it will sanely cast it to an int. If you it's equal to
|
48 |
+
* ~PHP_INT_MAX or PHP_INT_MAX, we let it fail as not an integer. Floats
|
49 |
+
* lose precision, so the <= and => operators might accidentally let a float
|
50 |
+
* through.
|
51 |
+
*/
|
52 |
+
|
53 |
+
try {
|
54 |
+
$min = RandomCompat_intval($min);
|
55 |
+
} catch (TypeError $ex) {
|
56 |
+
throw new TypeError(
|
57 |
+
'random_int(): $min must be an integer'
|
58 |
+
);
|
59 |
+
}
|
60 |
+
|
61 |
+
try {
|
62 |
+
$max = RandomCompat_intval($max);
|
63 |
+
} catch (TypeError $ex) {
|
64 |
+
throw new TypeError(
|
65 |
+
'random_int(): $max must be an integer'
|
66 |
+
);
|
67 |
+
}
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Now that we've verified our weak typing system has given us an integer,
|
71 |
+
* let's validate the logic then we can move forward with generating random
|
72 |
+
* integers along a given range.
|
73 |
+
*/
|
74 |
+
if ($min > $max) {
|
75 |
+
throw new Error(
|
76 |
+
'Minimum value must be less than or equal to the maximum value'
|
77 |
+
);
|
78 |
+
}
|
79 |
+
|
80 |
+
if ($max === $min) {
|
81 |
+
return (int) $min;
|
82 |
+
}
|
83 |
+
|
84 |
+
/**
|
85 |
+
* Initialize variables to 0
|
86 |
+
*
|
87 |
+
* We want to store:
|
88 |
+
* $bytes => the number of random bytes we need
|
89 |
+
* $mask => an integer bitmask (for use with the &) operator
|
90 |
+
* so we can minimize the number of discards
|
91 |
+
*/
|
92 |
+
$attempts = $bits = $bytes = $mask = $valueShift = 0;
|
93 |
+
|
94 |
+
/**
|
95 |
+
* At this point, $range is a positive number greater than 0. It might
|
96 |
+
* overflow, however, if $max - $min > PHP_INT_MAX. PHP will cast it to
|
97 |
+
* a float and we will lose some precision.
|
98 |
+
*/
|
99 |
+
$range = $max - $min;
|
100 |
+
|
101 |
+
/**
|
102 |
+
* Test for integer overflow:
|
103 |
+
*/
|
104 |
+
if (!is_int($range)) {
|
105 |
+
|
106 |
+
/**
|
107 |
+
* Still safely calculate wider ranges.
|
108 |
+
* Provided by @CodesInChaos, @oittaa
|
109 |
+
*
|
110 |
+
* @ref https://gist.github.com/CodesInChaos/03f9ea0b58e8b2b8d435
|
111 |
+
*
|
112 |
+
* We use ~0 as a mask in this case because it generates all 1s
|
113 |
+
*
|
114 |
+
* @ref https://eval.in/400356 (32-bit)
|
115 |
+
* @ref http://3v4l.org/XX9r5 (64-bit)
|
116 |
+
*/
|
117 |
+
$bytes = PHP_INT_SIZE;
|
118 |
+
$mask = ~0;
|
119 |
+
|
120 |
+
} else {
|
121 |
+
|
122 |
+
/**
|
123 |
+
* $bits is effectively ceil(log($range, 2)) without dealing with
|
124 |
+
* type juggling
|
125 |
+
*/
|
126 |
+
while ($range > 0) {
|
127 |
+
if ($bits % 8 === 0) {
|
128 |
+
++$bytes;
|
129 |
+
}
|
130 |
+
++$bits;
|
131 |
+
$range >>= 1;
|
132 |
+
$mask = $mask << 1 | 1;
|
133 |
+
}
|
134 |
+
$valueShift = $min;
|
135 |
+
}
|
136 |
+
|
137 |
+
$val = 0;
|
138 |
+
/**
|
139 |
+
* Now that we have our parameters set up, let's begin generating
|
140 |
+
* random integers until one falls between $min and $max
|
141 |
+
*/
|
142 |
+
do {
|
143 |
+
/**
|
144 |
+
* The rejection probability is at most 0.5, so this corresponds
|
145 |
+
* to a failure probability of 2^-128 for a working RNG
|
146 |
+
*/
|
147 |
+
if ($attempts > 128) {
|
148 |
+
throw new Exception(
|
149 |
+
'random_int: RNG is broken - too many rejections'
|
150 |
+
);
|
151 |
+
}
|
152 |
+
|
153 |
+
/**
|
154 |
+
* Let's grab the necessary number of random bytes
|
155 |
+
*/
|
156 |
+
$randomByteString = random_bytes($bytes);
|
157 |
+
|
158 |
+
/**
|
159 |
+
* Let's turn $randomByteString into an integer
|
160 |
+
*
|
161 |
+
* This uses bitwise operators (<< and |) to build an integer
|
162 |
+
* out of the values extracted from ord()
|
163 |
+
*
|
164 |
+
* Example: [9F] | [6D] | [32] | [0C] =>
|
165 |
+
* 159 + 27904 + 3276800 + 201326592 =>
|
166 |
+
* 204631455
|
167 |
+
*/
|
168 |
+
$val &= 0;
|
169 |
+
for ($i = 0; $i < $bytes; ++$i) {
|
170 |
+
$val |= ord($randomByteString[$i]) << ($i * 8);
|
171 |
+
}
|
172 |
+
|
173 |
+
/**
|
174 |
+
* Apply mask
|
175 |
+
*/
|
176 |
+
$val &= $mask;
|
177 |
+
$val += $valueShift;
|
178 |
+
|
179 |
+
++$attempts;
|
180 |
+
/**
|
181 |
+
* If $val overflows to a floating point number,
|
182 |
+
* ... or is larger than $max,
|
183 |
+
* ... or smaller than $min,
|
184 |
+
* then try again.
|
185 |
+
*/
|
186 |
+
} while (!is_int($val) || $val > $max || $val < $min);
|
187 |
+
|
188 |
+
return (int) $val;
|
189 |
+
}
|
190 |
+
}
|
vendor/paragonie/random_compat/psalm-autoload.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
require_once 'lib/byte_safe_strings.php';
|
4 |
+
require_once 'lib/cast_to_int.php';
|
5 |
+
require_once 'lib/error_polyfill.php';
|
6 |
+
require_once 'other/ide_stubs/libsodium.php';
|
7 |
+
require_once 'lib/random.php';
|
8 |
+
|
9 |
+
$int = random_int(0, 65536);
|
vendor/paragonie/sodium_compat/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* ISC License
|
3 |
+
*
|
4 |
+
* Copyright (c) 2016-2018
|
5 |
+
* Paragon Initiative Enterprises <security at paragonie dot com>
|
6 |
+
*
|
7 |
+
* Copyright (c) 2013-2018
|
8 |
+
* Frank Denis <j at pureftpd dot org>
|
9 |
+
*
|
10 |
+
* Permission to use, copy, modify, and/or distribute this software for any
|
11 |
+
* purpose with or without fee is hereby granted, provided that the above
|
12 |
+
* copyright notice and this permission notice appear in all copies.
|
13 |
+
*
|
14 |
+
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
15 |
+
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
16 |
+
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
17 |
+
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
18 |
+
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
19 |
+
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
20 |
+
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
21 |
+
*/
|
vendor/paragonie/sodium_compat/autoload-fast.php
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
require_once 'autoload.php';
|
4 |
+
ParagonIE_Sodium_Compat::$fastMult = true;
|
vendor/paragonie/sodium_compat/autoload-pedantic.php
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
require_once 'autoload.php';
|
4 |
+
define('DO_PEDANTIC_TEST', true);
|
5 |
+
|
6 |
+
ParagonIE_Sodium_Compat::$fastMult = true;
|
vendor/paragonie/sodium_compat/autoload.php
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if (!is_callable('sodiumCompatAutoloader')) {
|
4 |
+
/**
|
5 |
+
* Sodium_Compat autoloader.
|
6 |
+
*
|
7 |
+
* @param string $class Class name to be autoloaded.
|
8 |
+
*
|
9 |
+
* @return bool Stop autoloading?
|
10 |
+
*/
|
11 |
+
function sodiumCompatAutoloader($class)
|
12 |
+
{
|
13 |
+
$namespace = 'ParagonIE_Sodium_';
|
14 |
+
// Does the class use the namespace prefix?
|
15 |
+
$len = strlen($namespace);
|
16 |
+
if (strncmp($namespace, $class, $len) !== 0) {
|
17 |
+
// no, move to the next registered autoloader
|
18 |
+
return false;
|
19 |
+
}
|
20 |
+
|
21 |
+
// Get the relative class name
|
22 |
+
$relative_class = substr($class, $len);
|
23 |
+
|
24 |
+
// Replace the namespace prefix with the base directory, replace namespace
|
25 |
+
// separators with directory separators in the relative class name, append
|
26 |
+
// with .php
|
27 |
+
$file = dirname(__FILE__) . '/src/' . str_replace('_', '/', $relative_class) . '.php';
|
28 |
+
// if the file exists, require it
|
29 |
+
if (file_exists($file)) {
|
30 |
+
require_once $file;
|
31 |
+
return true;
|
32 |
+
}
|
33 |
+
return false;
|
34 |
+
}
|
35 |
+
|
36 |
+
// Now that we have an autoloader, let's register it!
|
37 |
+
spl_autoload_register('sodiumCompatAutoloader');
|
38 |
+
}
|
39 |
+
|
40 |
+
require_once dirname(__FILE__) . '/src/SodiumException.php';
|
41 |
+
if (PHP_VERSION_ID >= 50300) {
|
42 |
+
// Namespaces didn't exist before 5.3.0, so don't even try to use this
|
43 |
+
// unless PHP >= 5.3.0
|
44 |
+
require_once dirname(__FILE__) . '/lib/namespaced.php';
|
45 |
+
require_once dirname(__FILE__) . '/lib/sodium_compat.php';
|
46 |
+
}
|
47 |
+
if (PHP_VERSION_ID < 70200 || !extension_loaded('sodium')) {
|
48 |
+
require_once dirname(__FILE__) . '/lib/php72compat.php';
|
49 |
+
}
|
vendor/paragonie/sodium_compat/lib/constants.php
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Sodium;
|
3 |
+
|
4 |
+
use ParagonIE_Sodium_Compat;
|
5 |
+
|
6 |
+
const CRYPTO_AEAD_AES256GCM_KEYBYTES = ParagonIE_Sodium_Compat::CRYPTO_AEAD_AES256GCM_KEYBYTES;
|
7 |
+
const CRYPTO_AEAD_AES256GCM_NSECBYTES = ParagonIE_Sodium_Compat::CRYPTO_AEAD_AES256GCM_NSECBYTES;
|
8 |
+
const CRYPTO_AEAD_AES256GCM_NPUBBYTES = ParagonIE_Sodium_Compat::CRYPTO_AEAD_AES256GCM_NPUBBYTES;
|
9 |
+
const CRYPTO_AEAD_AES256GCM_ABYTES = ParagonIE_Sodium_Compat::CRYPTO_AEAD_AES256GCM_ABYTES;
|
10 |
+
const CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES = ParagonIE_Sodium_Compat::CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES;
|
11 |
+
const CRYPTO_AEAD_CHACHA20POLY1305_NSECBYTES = ParagonIE_Sodium_Compat::CRYPTO_AEAD_CHACHA20POLY1305_NSECBYTES;
|
12 |
+
const CRYPTO_AEAD_CHACHA20POLY1305_NPUBBYTES = ParagonIE_Sodium_Compat::CRYPTO_AEAD_CHACHA20POLY1305_NPUBBYTES;
|
13 |
+
const CRYPTO_AEAD_CHACHA20POLY1305_ABYTES = ParagonIE_Sodium_Compat::CRYPTO_AEAD_CHACHA20POLY1305_ABYTES;
|
14 |
+
const CRYPTO_AEAD_CHACHA20POLY1305_IETF_KEYBYTES = ParagonIE_Sodium_Compat::CRYPTO_AEAD_CHACHA20POLY1305_IETF_KEYBYTES;
|
15 |
+
const CRYPTO_AEAD_CHACHA20POLY1305_IETF_NSECBYTES = ParagonIE_Sodium_Compat::CRYPTO_AEAD_CHACHA20POLY1305_IETF_NSECBYTES;
|
16 |
+
const CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES = ParagonIE_Sodium_Compat::CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES;
|
17 |
+
const CRYPTO_AEAD_CHACHA20POLY1305_IETF_ABYTES = ParagonIE_Sodium_Compat::CRYPTO_AEAD_CHACHA20POLY1305_IETF_ABYTES;
|
18 |
+
const CRYPTO_AUTH_BYTES = ParagonIE_Sodium_Compat::CRYPTO_AUTH_BYTES;
|
19 |
+
const CRYPTO_AUTH_KEYBYTES = ParagonIE_Sodium_Compat::CRYPTO_AUTH_KEYBYTES;
|
20 |
+
const CRYPTO_BOX_SEALBYTES = ParagonIE_Sodium_Compat::CRYPTO_BOX_SEALBYTES;
|
21 |
+
const CRYPTO_BOX_SECRETKEYBYTES = ParagonIE_Sodium_Compat::CRYPTO_BOX_SECRETKEYBYTES;
|
22 |
+
const CRYPTO_BOX_PUBLICKEYBYTES = ParagonIE_Sodium_Compat::CRYPTO_BOX_PUBLICKEYBYTES;
|
23 |
+
const CRYPTO_BOX_KEYPAIRBYTES = ParagonIE_Sodium_Compat::CRYPTO_BOX_KEYPAIRBYTES;
|
24 |
+
const CRYPTO_BOX_MACBYTES = ParagonIE_Sodium_Compat::CRYPTO_BOX_MACBYTES;
|
25 |
+
const CRYPTO_BOX_NONCEBYTES = ParagonIE_Sodium_Compat::CRYPTO_BOX_NONCEBYTES;
|
26 |
+
const CRYPTO_BOX_SEEDBYTES = ParagonIE_Sodium_Compat::CRYPTO_BOX_SEEDBYTES;
|
27 |
+
const CRYPTO_KX_BYTES = ParagonIE_Sodium_Compat::CRYPTO_KX_BYTES;
|
28 |
+
const CRYPTO_KX_SEEDBYTES = ParagonIE_Sodium_Compat::CRYPTO_KX_SEEDBYTES;
|
29 |
+
const CRYPTO_KX_PUBLICKEYBYTES = ParagonIE_Sodium_Compat::CRYPTO_KX_PUBLICKEYBYTES;
|
30 |
+
const CRYPTO_KX_SECRETKEYBYTES = ParagonIE_Sodium_Compat::CRYPTO_KX_SECRETKEYBYTES;
|
31 |
+
const CRYPTO_GENERICHASH_BYTES = ParagonIE_Sodium_Compat::CRYPTO_GENERICHASH_BYTES;
|
32 |
+
const CRYPTO_GENERICHASH_BYTES_MIN = ParagonIE_Sodium_Compat::CRYPTO_GENERICHASH_BYTES_MIN;
|
33 |
+
const CRYPTO_GENERICHASH_BYTES_MAX = ParagonIE_Sodium_Compat::CRYPTO_GENERICHASH_BYTES_MAX;
|
34 |
+
const CRYPTO_GENERICHASH_KEYBYTES = ParagonIE_Sodium_Compat::CRYPTO_GENERICHASH_KEYBYTES;
|
35 |
+
const CRYPTO_GENERICHASH_KEYBYTES_MIN = ParagonIE_Sodium_Compat::CRYPTO_GENERICHASH_KEYBYTES_MIN;
|
36 |
+
const CRYPTO_GENERICHASH_KEYBYTES_MAX = ParagonIE_Sodium_Compat::CRYPTO_GENERICHASH_KEYBYTES_MAX;
|
37 |
+
const CRYPTO_SCALARMULT_BYTES = ParagonIE_Sodium_Compat::CRYPTO_SCALARMULT_BYTES;
|
38 |
+
const CRYPTO_SCALARMULT_SCALARBYTES = ParagonIE_Sodium_Compat::CRYPTO_SCALARMULT_SCALARBYTES;
|
39 |
+
const CRYPTO_SHORTHASH_BYTES = ParagonIE_Sodium_Compat::CRYPTO_SHORTHASH_BYTES;
|
40 |
+
const CRYPTO_SHORTHASH_KEYBYTES = ParagonIE_Sodium_Compat::CRYPTO_SHORTHASH_KEYBYTES;
|
41 |
+
const CRYPTO_SECRETBOX_KEYBYTES = ParagonIE_Sodium_Compat::CRYPTO_SECRETBOX_KEYBYTES;
|
42 |
+
const CRYPTO_SECRETBOX_MACBYTES = ParagonIE_Sodium_Compat::CRYPTO_SECRETBOX_MACBYTES;
|
43 |
+
const CRYPTO_SECRETBOX_NONCEBYTES = ParagonIE_Sodium_Compat::CRYPTO_SECRETBOX_NONCEBYTES;
|
44 |
+
const CRYPTO_SIGN_BYTES = ParagonIE_Sodium_Compat::CRYPTO_SIGN_BYTES;
|
45 |
+
const CRYPTO_SIGN_SEEDBYTES = ParagonIE_Sodium_Compat::CRYPTO_SIGN_SEEDBYTES;
|
46 |
+
const CRYPTO_SIGN_PUBLICKEYBYTES = ParagonIE_Sodium_Compat::CRYPTO_SIGN_PUBLICKEYBYTES;
|
47 |
+
const CRYPTO_SIGN_SECRETKEYBYTES = ParagonIE_Sodium_Compat::CRYPTO_SIGN_SECRETKEYBYTES;
|
48 |
+
const CRYPTO_SIGN_KEYPAIRBYTES = ParagonIE_Sodium_Compat::CRYPTO_SIGN_KEYPAIRBYTES;
|
49 |
+
const CRYPTO_STREAM_KEYBYTES = ParagonIE_Sodium_Compat::CRYPTO_STREAM_KEYBYTES;
|
50 |
+
const CRYPTO_STREAM_NONCEBYTES = ParagonIE_Sodium_Compat::CRYPTO_STREAM_NONCEBYTES;
|
vendor/paragonie/sodium_compat/lib/namespaced.php
ADDED
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if (PHP_VERSION_ID < 50300) {
|
4 |
+
return;
|
5 |
+
}
|
6 |
+
|
7 |
+
/*
|
8 |
+
* This file is just for convenience, to allow developers to reduce verbosity when
|
9 |
+
* they add this project to their libraries.
|
10 |
+
*
|
11 |
+
* Replace this:
|
12 |
+
*
|
13 |
+
* $x = ParagonIE_Sodium_Compat::crypto_aead_xchacha20poly1305_encrypt(...$args);
|
14 |
+
*
|
15 |
+
* with this:
|
16 |
+
*
|
17 |
+
* use ParagonIE\Sodium\Compat;
|
18 |
+
*
|
19 |
+
* $x = Compat::crypto_aead_xchacha20poly1305_encrypt(...$args);
|
20 |
+
*/
|
21 |
+
spl_autoload_register(function ($class) {
|
22 |
+
if ($class[0] === '\\') {
|
23 |
+
$class = substr($class, 1);
|
24 |
+
}
|
25 |
+
$namespace = 'ParagonIE\\Sodium';
|
26 |
+
// Does the class use the namespace prefix?
|
27 |
+
$len = strlen($namespace);
|
28 |
+
if (strncmp($namespace, $class, $len) !== 0) {
|
29 |
+
// no, move to the next registered autoloader
|
30 |
+
return false;
|
31 |
+
}
|
32 |
+
|
33 |
+
// Get the relative class name
|
34 |
+
$relative_class = substr($class, $len);
|
35 |
+
|
36 |
+
// Replace the namespace prefix with the base directory, replace namespace
|
37 |
+
// separators with directory separators in the relative class name, append
|
38 |
+
// with .php
|
39 |
+
$file = dirname(__DIR__) . '/namespaced/' . str_replace('\\', '/', $relative_class) . '.php';
|
40 |
+
// if the file exists, require it
|
41 |
+
if (file_exists($file)) {
|
42 |
+
require_once $file;
|
43 |
+
return true;
|
44 |
+
}
|
45 |
+
return false;
|
46 |
+
});
|
vendor/paragonie/sodium_compat/lib/php72compat.php
ADDED
@@ -0,0 +1,1052 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* This file will monkey patch the pure-PHP implementation in place of the
|
5 |
+
* PECL functions and constants, but only if they do not already exist.
|
6 |
+
*
|
7 |
+
* Thus, the functions or constants just proxy to the appropriate
|
8 |
+
* ParagonIE_Sodium_Compat method or class constant, respectively.
|
9 |
+
*/
|
10 |
+
foreach (array(
|
11 |
+
'CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES',
|
12 |
+
'CRYPTO_AEAD_CHACHA20POLY1305_NSECBYTES',
|
13 |
+
'CRYPTO_AEAD_CHACHA20POLY1305_NPUBBYTES',
|
14 |
+
'CRYPTO_AEAD_CHACHA20POLY1305_ABYTES',
|
15 |
+
'CRYPTO_AEAD_AES256GCM_KEYBYTES',
|
16 |
+
'CRYPTO_AEAD_AES256GCM_NSECBYTES',
|
17 |
+
'CRYPTO_AEAD_AES256GCM_NPUBBYTES',
|
18 |
+
'CRYPTO_AEAD_AES256GCM_ABYTES',
|
19 |
+
'CRYPTO_AEAD_CHACHA20POLY1305_IETF_KEYBYTES',
|
20 |
+
'CRYPTO_AEAD_CHACHA20POLY1305_IETF_NSECBYTES',
|
21 |
+
'CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES',
|
22 |
+
'CRYPTO_AEAD_CHACHA20POLY1305_IETF_ABYTES',
|
23 |
+
'CRYPTO_AUTH_BYTES',
|
24 |
+
'CRYPTO_AUTH_KEYBYTES',
|
25 |
+
'CRYPTO_BOX_SEALBYTES',
|
26 |
+
'CRYPTO_BOX_SECRETKEYBYTES',
|
27 |
+
'CRYPTO_BOX_PUBLICKEYBYTES',
|
28 |
+
'CRYPTO_BOX_KEYPAIRBYTES',
|
29 |
+
'CRYPTO_BOX_MACBYTES',
|
30 |
+
'CRYPTO_BOX_NONCEBYTES',
|
31 |
+
'CRYPTO_BOX_SEEDBYTES',
|
32 |
+
'CRYPTO_KX_BYTES',
|
33 |
+
'CRYPTO_KX_SEEDBYTES',
|
34 |
+
'CRYPTO_KX_PUBLICKEYBYTES',
|
35 |
+
'CRYPTO_KX_SECRETKEYBYTES',
|
36 |
+
'CRYPTO_GENERICHASH_BYTES',
|
37 |
+
'CRYPTO_GENERICHASH_BYTES_MIN',
|
38 |
+
'CRYPTO_GENERICHASH_BYTES_MAX',
|
39 |
+
'CRYPTO_GENERICHASH_KEYBYTES',
|
40 |
+
'CRYPTO_GENERICHASH_KEYBYTES_MIN',
|
41 |
+
'CRYPTO_GENERICHASH_KEYBYTES_MAX',
|
42 |
+
'CRYPTO_PWHASH_SALTBYTES',
|
43 |
+
'CRYPTO_PWHASH_STRPREFIX',
|
44 |
+
'CRYPTO_PWHASH_ALG_ARGON2I13',
|
45 |
+
'CRYPTO_PWHASH_ALG_ARGON2ID13',
|
46 |
+
'CRYPTO_PWHASH_MEMLIMIT_INTERACTIVE',
|
47 |
+
'CRYPTO_PWHASH_OPSLIMIT_INTERACTIVE',
|
48 |
+
'CRYPTO_PWHASH_MEMLIMIT_MODERATE',
|
49 |
+
'CRYPTO_PWHASH_OPSLIMIT_MODERATE',
|
50 |
+
'CRYPTO_PWHASH_MEMLIMIT_SENSITIVE',
|
51 |
+
'CRYPTO_PWHASH_OPSLIMIT_SENSITIVE',
|
52 |
+
'CRYPTO_SCALARMULT_BYTES',
|
53 |
+
'CRYPTO_SCALARMULT_SCALARBYTES',
|
54 |
+
'CRYPTO_SHORTHASH_BYTES',
|
55 |
+
'CRYPTO_SHORTHASH_KEYBYTES',
|
56 |
+
'CRYPTO_SECRETBOX_KEYBYTES',
|
57 |
+
'CRYPTO_SECRETBOX_MACBYTES',
|
58 |
+
'CRYPTO_SECRETBOX_NONCEBYTES',
|
59 |
+
'CRYPTO_SIGN_BYTES',
|
60 |
+
'CRYPTO_SIGN_SEEDBYTES',
|
61 |
+
'CRYPTO_SIGN_PUBLICKEYBYTES',
|
62 |
+
'CRYPTO_SIGN_SECRETKEYBYTES',
|
63 |
+
'CRYPTO_SIGN_KEYPAIRBYTES',
|
64 |
+
'CRYPTO_STREAM_KEYBYTES',
|
65 |
+
'CRYPTO_STREAM_NONCEBYTES',
|
66 |
+
) as $constant
|
67 |
+
) {
|
68 |
+
if (!defined("SODIUM_$constant")) {
|
69 |
+
define("SODIUM_$constant", constant("ParagonIE_Sodium_Compat::$constant"));
|
70 |
+
}
|
71 |
+
}
|
72 |
+
|
73 |
+
if (!is_callable('sodium_bin2hex')) {
|
74 |
+
/**
|
75 |
+
* @see ParagonIE_Sodium_Compat::hex2bin()
|
76 |
+
* @param string $string
|
77 |
+
* @return string
|
78 |
+
* @throws SodiumException
|
79 |
+
* @throws TypeError
|
80 |
+
*/
|
81 |
+
function sodium_bin2hex($string)
|
82 |
+
{
|
83 |
+
return ParagonIE_Sodium_Compat::bin2hex($string);
|
84 |
+
}
|
85 |
+
}
|
86 |
+
if (!is_callable('sodium_compare')) {
|
87 |
+
/**
|
88 |
+
* @see ParagonIE_Sodium_Compat::compare()
|
89 |
+
* @param string $a
|
90 |
+
* @param string $b
|
91 |
+
* @return int
|
92 |
+
* @throws SodiumException
|
93 |
+
* @throws TypeError
|
94 |
+
*/
|
95 |
+
function sodium_compare($a, $b)
|
96 |
+
{
|
97 |
+
return ParagonIE_Sodium_Compat::compare($a, $b);
|
98 |
+
}
|
99 |
+
}
|
100 |
+
if (!is_callable('sodium_crypto_aead_aes256gcm_decrypt')) {
|
101 |
+
/**
|
102 |
+
* @see ParagonIE_Sodium_Compat::crypto_aead_aes256gcm_decrypt()
|
103 |
+
* @param string $message
|
104 |
+
* @param string $assocData
|
105 |
+
* @param string $nonce
|
106 |
+
* @param string $key
|
107 |
+
* @return string
|
108 |
+
*/
|
109 |
+
function sodium_crypto_aead_aes256gcm_decrypt($message, $assocData, $nonce, $key)
|
110 |
+
{
|
111 |
+
try {
|
112 |
+
return ParagonIE_Sodium_Compat::crypto_aead_aes256gcm_decrypt($message, $assocData, $nonce, $key);
|
113 |
+
} catch (Error $ex) {
|
114 |
+
return false;
|
115 |
+
} catch (Exception $ex) {
|
116 |
+
return false;
|
117 |
+
}
|
118 |
+
}
|
119 |
+
}
|
120 |
+
if (!is_callable('sodium_crypto_aead_aes256gcm_encrypt')) {
|
121 |
+
/**
|
122 |
+
* @see ParagonIE_Sodium_Compat::crypto_aead_aes256gcm_encrypt()
|
123 |
+
* @param string $message
|
124 |
+
* @param string $assocData
|
125 |
+
* @param string $nonce
|
126 |
+
* @param string $key
|
127 |
+
* @return string
|
128 |
+
* @throws SodiumException
|
129 |
+
* @throws TypeError
|
130 |
+
*/
|
131 |
+
function sodium_crypto_aead_aes256gcm_encrypt($message, $assocData, $nonce, $key)
|
132 |
+
{
|
133 |
+
return ParagonIE_Sodium_Compat::crypto_aead_aes256gcm_encrypt($message, $assocData, $nonce, $key);
|
134 |
+
}
|
135 |
+
}
|
136 |
+
if (!is_callable('sodium_crypto_aead_aes256gcm_is_available')) {
|
137 |
+
/**
|
138 |
+
* @see ParagonIE_Sodium_Compat::crypto_aead_aes256gcm_is_available()
|
139 |
+
* @return bool
|
140 |
+
*/
|
141 |
+
function sodium_crypto_aead_aes256gcm_is_available()
|
142 |
+
{
|
143 |
+
return ParagonIE_Sodium_Compat::crypto_aead_aes256gcm_is_available();
|
144 |
+
}
|
145 |
+
}
|
146 |
+
if (!is_callable('sodium_crypto_aead_chacha20poly1305_decrypt')) {
|
147 |
+
/**
|
148 |
+
* @see ParagonIE_Sodium_Compat::crypto_aead_chacha20poly1305_decrypt()
|
149 |
+
* @param string $message
|
150 |
+
* @param string $assocData
|
151 |
+
* @param string $nonce
|
152 |
+
* @param string $key
|
153 |
+
* @return string
|
154 |
+
*/
|
155 |
+
function sodium_crypto_aead_chacha20poly1305_decrypt($message, $assocData, $nonce, $key)
|
156 |
+
{
|
157 |
+
try {
|
158 |
+
return ParagonIE_Sodium_Compat::crypto_aead_chacha20poly1305_decrypt($message, $assocData, $nonce, $key);
|
159 |
+
} catch (Error $ex) {
|
160 |
+
return false;
|
161 |
+
} catch (Exception $ex) {
|
162 |
+
return false;
|
163 |
+
}
|
164 |
+
}
|
165 |
+
}
|
166 |
+
if (!is_callable('sodium_crypto_aead_chacha20poly1305_encrypt')) {
|
167 |
+
/**
|
168 |
+
* @see ParagonIE_Sodium_Compat::crypto_aead_chacha20poly1305_encrypt()
|
169 |
+
* @param string $message
|
170 |
+
* @param string $assocData
|
171 |
+
* @param string $nonce
|
172 |
+
* @param string $key
|
173 |
+
* @return string
|
174 |
+
* @throws SodiumException
|
175 |
+
* @throws TypeError
|
176 |
+
*/
|
177 |
+
function sodium_crypto_aead_chacha20poly1305_encrypt($message, $assocData, $nonce, $key)
|
178 |
+
{
|
179 |
+
return ParagonIE_Sodium_Compat::crypto_aead_chacha20poly1305_encrypt($message, $assocData, $nonce, $key);
|
180 |
+
}
|
181 |
+
}
|
182 |
+
if (!is_callable('sodium_crypto_aead_chacha20poly1305_keygen')) {
|
183 |
+
/**
|
184 |
+
* @see ParagonIE_Sodium_Compat::crypto_aead_chacha20poly1305_keygen()
|
185 |
+
* @return string
|
186 |
+
*/
|
187 |
+
function sodium_crypto_aead_chacha20poly1305_keygen()
|
188 |
+
{
|
189 |
+
return ParagonIE_Sodium_Compat::crypto_aead_chacha20poly1305_keygen();
|
190 |
+
}
|
191 |
+
}
|
192 |
+
if (!is_callable('sodium_crypto_aead_chacha20poly1305_ietf_decrypt')) {
|
193 |
+
/**
|
194 |
+
* @see ParagonIE_Sodium_Compat::crypto_aead_chacha20poly1305_ietf_decrypt()
|
195 |
+
* @param string $message
|
196 |
+
* @param string $assocData
|
197 |
+
* @param string $nonce
|
198 |
+
* @param string $key
|
199 |
+
* @return string
|
200 |
+
*/
|
201 |
+
function sodium_crypto_aead_chacha20poly1305_ietf_decrypt($message, $assocData, $nonce, $key)
|
202 |
+
{
|
203 |
+
try {
|
204 |
+
return ParagonIE_Sodium_Compat::crypto_aead_chacha20poly1305_ietf_decrypt($message, $assocData, $nonce, $key);
|
205 |
+
} catch (Error $ex) {
|
206 |
+
return false;
|
207 |
+
} catch (Exception $ex) {
|
208 |
+
return false;
|
209 |
+
}
|
210 |
+
}
|
211 |
+
}
|
212 |
+
if (!is_callable('sodium_crypto_aead_chacha20poly1305_ietf_encrypt')) {
|
213 |
+
/**
|
214 |
+
* @see ParagonIE_Sodium_Compat::crypto_aead_chacha20poly1305_ietf_encrypt()
|
215 |
+
* @param string $message
|
216 |
+
* @param string $assocData
|
217 |
+
* @param string $nonce
|
218 |
+
* @param string $key
|
219 |
+
* @return string
|
220 |
+
* @throws SodiumException
|
221 |
+
* @throws TypeError
|
222 |
+
*/
|
223 |
+
function sodium_crypto_aead_chacha20poly1305_ietf_encrypt($message, $assocData, $nonce, $key)
|
224 |
+
{
|
225 |
+
return ParagonIE_Sodium_Compat::crypto_aead_chacha20poly1305_ietf_encrypt($message, $assocData, $nonce, $key);
|
226 |
+
}
|
227 |
+
}
|
228 |
+
if (!is_callable('sodium_crypto_aead_chacha20poly1305_ietf_keygen')) {
|
229 |
+
/**
|
230 |
+
* @see ParagonIE_Sodium_Compat::crypto_aead_chacha20poly1305_ietf_keygen()
|
231 |
+
* @return string
|
232 |
+
*/
|
233 |
+
function sodium_crypto_aead_chacha20poly1305_ietf_keygen()
|
234 |
+
{
|
235 |
+
return ParagonIE_Sodium_Compat::crypto_aead_chacha20poly1305_ietf_keygen();
|
236 |
+
}
|
237 |
+
}
|
238 |
+
if (!is_callable('sodium_crypto_aead_xchacha20poly1305_ietf_decrypt')) {
|
239 |
+
/**
|
240 |
+
* @see ParagonIE_Sodium_Compat::crypto_aead_xchacha20poly1305_ietf_decrypt()
|
241 |
+
* @param string $message
|
242 |
+
* @param string $assocData
|
243 |
+
* @param string $nonce
|
244 |
+
* @param string $key
|
245 |
+
* @return string
|
246 |
+
*/
|
247 |
+
function sodium_crypto_aead_xchacha20poly1305_ietf_decrypt($message, $assocData, $nonce, $key)
|
248 |
+
{
|
249 |
+
try {
|
250 |
+
return ParagonIE_Sodium_Compat::crypto_aead_xchacha20poly1305_ietf_decrypt($message, $assocData, $nonce, $key);
|
251 |
+
} catch (Error $ex) {
|
252 |
+
return false;
|
253 |
+
} catch (Exception $ex) {
|
254 |
+
return false;
|
255 |
+
}
|
256 |
+
}
|
257 |
+
}
|
258 |
+
if (!is_callable('sodium_crypto_aead_xchacha20poly1305_ietf_encrypt')) {
|
259 |
+
/**
|
260 |
+
* @see ParagonIE_Sodium_Compat::crypto_aead_xchacha20poly1305_ietf_encrypt()
|
261 |
+
* @param string $message
|
262 |
+
* @param string $assocData
|
263 |
+
* @param string $nonce
|
264 |
+
* @param string $key
|
265 |
+
* @return string
|
266 |
+
* @throws SodiumException
|
267 |
+
* @throws TypeError
|
268 |
+
*/
|
269 |
+
function sodium_crypto_aead_xchacha20poly1305_ietf_encrypt($message, $assocData, $nonce, $key)
|
270 |
+
{
|
271 |
+
return ParagonIE_Sodium_Compat::crypto_aead_xchacha20poly1305_ietf_encrypt($message, $assocData, $nonce, $key);
|
272 |
+
}
|
273 |
+
}
|
274 |
+
if (!is_callable('sodium_crypto_aead_xchacha20poly1305_ietf_keygen')) {
|
275 |
+
/**
|
276 |
+
* @see ParagonIE_Sodium_Compat::crypto_aead_xchacha20poly1305_ietf_keygen()
|
277 |
+
* @return string
|
278 |
+
*/
|
279 |
+
function sodium_crypto_aead_xchacha20poly1305_ietf_keygen()
|
280 |
+
{
|
281 |
+
return ParagonIE_Sodium_Compat::crypto_aead_xchacha20poly1305_ietf_keygen();
|
282 |
+
}
|
283 |
+
}
|
284 |
+
if (!is_callable('sodium_crypto_auth')) {
|
285 |
+
/**
|
286 |
+
* @see ParagonIE_Sodium_Compat::crypto_auth()
|
287 |
+
* @param string $message
|
288 |
+
* @param string $key
|
289 |
+
* @return string
|
290 |
+
* @throws SodiumException
|
291 |
+
* @throws TypeError
|
292 |
+
*/
|
293 |
+
function sodium_crypto_auth($message, $key)
|
294 |
+
{
|
295 |
+
return ParagonIE_Sodium_Compat::crypto_auth($message, $key);
|
296 |
+
}
|
297 |
+
}
|
298 |
+
if (!is_callable('sodium_crypto_auth_keygen')) {
|
299 |
+
/**
|
300 |
+
* @see ParagonIE_Sodium_Compat::crypto_auth_keygen()
|
301 |
+
* @return string
|
302 |
+
*/
|
303 |
+
function sodium_crypto_auth_keygen()
|
304 |
+
{
|
305 |
+
return ParagonIE_Sodium_Compat::crypto_auth_keygen();
|
306 |
+
}
|
307 |
+
}
|
308 |
+
if (!is_callable('sodium_crypto_auth_verify')) {
|
309 |
+
/**
|
310 |
+
* @see ParagonIE_Sodium_Compat::crypto_auth_verify()
|
311 |
+
* @param string $mac
|
312 |
+
* @param string $message
|
313 |
+
* @param string $key
|
314 |
+
* @return bool
|
315 |
+
* @throws SodiumException
|
316 |
+
* @throws TypeError
|
317 |
+
*/
|
318 |
+
function sodium_crypto_auth_verify($mac, $message, $key)
|
319 |
+
{
|
320 |
+
return ParagonIE_Sodium_Compat::crypto_auth_verify($mac, $message, $key);
|
321 |
+
}
|
322 |
+
}
|
323 |
+
if (!is_callable('sodium_crypto_box')) {
|
324 |
+
/**
|
325 |
+
* @see ParagonIE_Sodium_Compat::crypto_box()
|
326 |
+
* @param string $message
|
327 |
+
* @param string $nonce
|
328 |
+
* @param string $kp
|
329 |
+
* @return string
|
330 |
+
* @throws SodiumException
|
331 |
+
* @throws TypeError
|
332 |
+
*/
|
333 |
+
function sodium_crypto_box($message, $nonce, $kp)
|
334 |
+
{
|
335 |
+
return ParagonIE_Sodium_Compat::crypto_box($message, $nonce, $kp);
|
336 |
+
}
|
337 |
+
}
|
338 |
+
if (!is_callable('sodium_crypto_box_keypair')) {
|
339 |
+
/**
|
340 |
+
* @see ParagonIE_Sodium_Compat::crypto_box_keypair()
|
341 |
+
* @return string
|
342 |
+
* @throws SodiumException
|
343 |
+
* @throws TypeError
|
344 |
+
*/
|
345 |
+
function sodium_crypto_box_keypair()
|
346 |
+
{
|
347 |
+
return ParagonIE_Sodium_Compat::crypto_box_keypair();
|
348 |
+
}
|
349 |
+
}
|
350 |
+
if (!is_callable('sodium_crypto_box_keypair_from_secretkey_and_publickey')) {
|
351 |
+
/**
|
352 |
+
* @see ParagonIE_Sodium_Compat::crypto_box_keypair_from_secretkey_and_publickey()
|
353 |
+
* @param string $sk
|
354 |
+
* @param string $pk
|
355 |
+
* @return string
|
356 |
+
* @throws SodiumException
|
357 |
+
* @throws TypeError
|
358 |
+
*/
|
359 |
+
function sodium_crypto_box_keypair_from_secretkey_and_publickey($sk, $pk)
|
360 |
+
{
|
361 |
+
return ParagonIE_Sodium_Compat::crypto_box_keypair_from_secretkey_and_publickey($sk, $pk);
|
362 |
+
}
|
363 |
+
}
|
364 |
+
if (!is_callable('sodium_crypto_box_open')) {
|
365 |
+
/**
|
366 |
+
* @see ParagonIE_Sodium_Compat::crypto_box_open()
|
367 |
+
* @param string $message
|
368 |
+
* @param string $nonce
|
369 |
+
* @param string $kp
|
370 |
+
* @return string|bool
|
371 |
+
*/
|
372 |
+
function sodium_crypto_box_open($message, $nonce, $kp)
|
373 |
+
{
|
374 |
+
try {
|
375 |
+
return ParagonIE_Sodium_Compat::crypto_box_open($message, $nonce, $kp);
|
376 |
+
} catch (Error $ex) {
|
377 |
+
return false;
|
378 |
+
} catch (Exception $ex) {
|
379 |
+
return false;
|
380 |
+
}
|
381 |
+
}
|
382 |
+
}
|
383 |
+
if (!is_callable('sodium_crypto_box_publickey')) {
|
384 |
+
/**
|
385 |
+
* @see ParagonIE_Sodium_Compat::crypto_box_publickey()
|
386 |
+
* @param string $keypair
|
387 |
+
* @return string
|
388 |
+
* @throws SodiumException
|
389 |
+
* @throws TypeError
|
390 |
+
*/
|
391 |
+
function sodium_crypto_box_publickey($keypair)
|
392 |
+
{
|
393 |
+
return ParagonIE_Sodium_Compat::crypto_box_publickey($keypair);
|
394 |
+
}
|
395 |
+
}
|
396 |
+
if (!is_callable('sodium_crypto_box_publickey_from_secretkey')) {
|
397 |
+
/**
|
398 |
+
* @see ParagonIE_Sodium_Compat::crypto_box_publickey_from_secretkey()
|
399 |
+
* @param string $sk
|
400 |
+
* @return string
|
401 |
+
* @throws SodiumException
|
402 |
+
* @throws TypeError
|
403 |
+
*/
|
404 |
+
function sodium_crypto_box_publickey_from_secretkey($sk)
|
405 |
+
{
|
406 |
+
return ParagonIE_Sodium_Compat::crypto_box_publickey_from_secretkey($sk);
|
407 |
+
}
|
408 |
+
}
|
409 |
+
if (!is_callable('sodium_crypto_box_seal')) {
|
410 |
+
/**
|
411 |
+
* @see ParagonIE_Sodium_Compat::crypto_box_seal()
|
412 |
+
* @param string $message
|
413 |
+
* @param string $publicKey
|
414 |
+
* @return string
|
415 |
+
* @throws SodiumException
|
416 |
+
* @throws TypeError
|
417 |
+
*/
|
418 |
+
function sodium_crypto_box_seal($message, $publicKey)
|
419 |
+
{
|
420 |
+
return ParagonIE_Sodium_Compat::crypto_box_seal($message, $publicKey);
|
421 |
+
}
|
422 |
+
}
|
423 |
+
if (!is_callable('sodium_crypto_box_seal_open')) {
|
424 |
+
/**
|
425 |
+
* @see ParagonIE_Sodium_Compat::crypto_box_seal_open()
|
426 |
+
* @param string $message
|
427 |
+
* @param string $kp
|
428 |
+
* @return string|bool
|
429 |
+
*/
|
430 |
+
function sodium_crypto_box_seal_open($message, $kp)
|
431 |
+
{
|
432 |
+
try {
|
433 |
+
return ParagonIE_Sodium_Compat::crypto_box_seal_open($message, $kp);
|
434 |
+
} catch (Error $ex) {
|
435 |
+
return false;
|
436 |
+
} catch (Exception $ex) {
|
437 |
+
return false;
|
438 |
+
}
|
439 |
+
}
|
440 |
+
}
|
441 |
+
if (!is_callable('sodium_crypto_box_secretkey')) {
|
442 |
+
/**
|
443 |
+
* @see ParagonIE_Sodium_Compat::crypto_box_secretkey()
|
444 |
+
* @param string $keypair
|
445 |
+
* @return string
|
446 |
+
* @throws SodiumException
|
447 |
+
* @throws TypeError
|
448 |
+
*/
|
449 |
+
function sodium_crypto_box_secretkey($keypair)
|
450 |
+
{
|
451 |
+
return ParagonIE_Sodium_Compat::crypto_box_secretkey($keypair);
|
452 |
+
}
|
453 |
+
}
|
454 |
+
if (!is_callable('sodium_crypto_box_seed_keypair')) {
|
455 |
+
/**
|
456 |
+
* @see ParagonIE_Sodium_Compat::crypto_box_seed_keypair()
|
457 |
+
* @param string $seed
|
458 |
+
* @return string
|
459 |
+
* @throws SodiumException
|
460 |
+
* @throws TypeError
|
461 |
+
*/
|
462 |
+
function sodium_crypto_box_seed_keypair($seed)
|
463 |
+
{
|
464 |
+
return ParagonIE_Sodium_Compat::crypto_box_seed_keypair($seed);
|
465 |
+
}
|
466 |
+
}
|
467 |
+
if (!is_callable('sodium_crypto_generichash')) {
|
468 |
+
/**
|
469 |
+
* @see ParagonIE_Sodium_Compat::crypto_generichash()
|
470 |
+
* @param string $message
|
471 |
+
* @param string|null $key
|
472 |
+
* @param int $outLen
|
473 |
+
* @return string
|
474 |
+
* @throws SodiumException
|
475 |
+
* @throws TypeError
|
476 |
+
*/
|
477 |
+
function sodium_crypto_generichash($message, $key = null, $outLen = 32)
|
478 |
+
{
|
479 |
+
return ParagonIE_Sodium_Compat::crypto_generichash($message, $key, $outLen);
|
480 |
+
}
|
481 |
+
}
|
482 |
+
if (!is_callable('sodium_crypto_generichash_final')) {
|
483 |
+
/**
|
484 |
+
* @see ParagonIE_Sodium_Compat::crypto_generichash_final()
|
485 |
+
* @param string|null $ctx
|
486 |
+
* @param int $outputLength
|
487 |
+
* @return string
|
488 |
+
* @throws SodiumException
|
489 |
+
* @throws TypeError
|
490 |
+
*/
|
491 |
+
function sodium_crypto_generichash_final(&$ctx, $outputLength = 32)
|
492 |
+
{
|
493 |
+
return ParagonIE_Sodium_Compat::crypto_generichash_final($ctx, $outputLength);
|
494 |
+
}
|
495 |
+
}
|
496 |
+
if (!is_callable('sodium_crypto_generichash_init')) {
|
497 |
+
/**
|
498 |
+
* @see ParagonIE_Sodium_Compat::crypto_generichash_init()
|
499 |
+
* @param string|null $key
|
500 |
+
* @param int $outLen
|
501 |
+
* @return string
|
502 |
+
* @throws SodiumException
|
503 |
+
* @throws TypeError
|
504 |
+
*/
|
505 |
+
function sodium_crypto_generichash_init($key = null, $outLen = 32)
|
506 |
+
{
|
507 |
+
return ParagonIE_Sodium_Compat::crypto_generichash_init($key, $outLen);
|
508 |
+
}
|
509 |
+
}
|
510 |
+
if (!is_callable('sodium_crypto_generichash_keygen')) {
|
511 |
+
/**
|
512 |
+
* @see ParagonIE_Sodium_Compat::crypto_generichash_keygen()
|
513 |
+
* @return string
|
514 |
+
*/
|
515 |
+
function sodium_crypto_generichash_keygen()
|
516 |
+
{
|
517 |
+
return ParagonIE_Sodium_Compat::crypto_generichash_keygen();
|
518 |
+
}
|
519 |
+
}
|
520 |
+
if (!is_callable('sodium_crypto_generichash_update')) {
|
521 |
+
/**
|
522 |
+
* @see ParagonIE_Sodium_Compat::crypto_generichash_update()
|
523 |
+
* @param string|null $ctx
|
524 |
+
* @param string $message
|
525 |
+
* @return void
|
526 |
+
* @throws SodiumException
|
527 |
+
* @throws TypeError
|
528 |
+
*/
|
529 |
+
function sodium_crypto_generichash_update(&$ctx, $message = '')
|
530 |
+
{
|
531 |
+
ParagonIE_Sodium_Compat::crypto_generichash_update($ctx, $message);
|
532 |
+
}
|
533 |
+
}
|
534 |
+
if (!is_callable('sodium_crypto_kx')) {
|
535 |
+
/**
|
536 |
+
* @see ParagonIE_Sodium_Compat::crypto_kx()
|
537 |
+
* @param string $my_secret
|
538 |
+
* @param string $their_public
|
539 |
+
* @param string $client_public
|
540 |
+
* @param string $server_public
|
541 |
+
* @return string
|
542 |
+
* @throws SodiumException
|
543 |
+
* @throws TypeError
|
544 |
+
*/
|
545 |
+
function sodium_crypto_kx($my_secret, $their_public, $client_public, $server_public)
|
546 |
+
{
|
547 |
+
return ParagonIE_Sodium_Compat::crypto_kx(
|
548 |
+
$my_secret,
|
549 |
+
$their_public,
|
550 |
+
$client_public,
|
551 |
+
$server_public
|
552 |
+
);
|
553 |
+
}
|
554 |
+
}
|
555 |
+
if (!is_callable('sodium_crypto_pwhash')) {
|
556 |
+
/**
|
557 |
+
* @see ParagonIE_Sodium_Compat::crypto_pwhash()
|
558 |
+
* @param int $outlen
|
559 |
+
* @param string $passwd
|
560 |
+
* @param string $salt
|
561 |
+
* @param int $opslimit
|
562 |
+
* @param int $memlimit
|
563 |
+
* @param int|null $algo
|
564 |
+
* @return string
|
565 |
+
* @throws SodiumException
|
566 |
+
* @throws TypeError
|
567 |
+
*/
|
568 |
+
function sodium_crypto_pwhash($outlen, $passwd, $salt, $opslimit, $memlimit, $algo = null)
|
569 |
+
{
|
570 |
+
return ParagonIE_Sodium_Compat::crypto_pwhash($outlen, $passwd, $salt, $opslimit, $memlimit, $algo);
|
571 |
+
}
|
572 |
+
}
|
573 |
+
if (!is_callable('sodium_crypto_pwhash_str')) {
|
574 |
+
/**
|
575 |
+
* @see ParagonIE_Sodium_Compat::crypto_pwhash_str()
|
576 |
+
* @param string $passwd
|
577 |
+
* @param int $opslimit
|
578 |
+
* @param int $memlimit
|
579 |
+
* @return string
|
580 |
+
* @throws SodiumException
|
581 |
+
* @throws TypeError
|
582 |
+
*/
|
583 |
+
function sodium_crypto_pwhash_str($passwd, $opslimit, $memlimit)
|
584 |
+
{
|
585 |
+
return ParagonIE_Sodium_Compat::crypto_pwhash_str($passwd, $opslimit, $memlimit);
|
586 |
+
}
|
587 |
+
}
|
588 |
+
if (!is_callable('sodium_crypto_pwhash_str_verify')) {
|
589 |
+
/**
|
590 |
+
* @see ParagonIE_Sodium_Compat::crypto_pwhash_str_verify()
|
591 |
+
* @param string $passwd
|
592 |
+
* @param string $hash
|
593 |
+
* @return bool
|
594 |
+
* @throws SodiumException
|
595 |
+
* @throws TypeError
|
596 |
+
*/
|
597 |
+
function sodium_crypto_pwhash_str_verify($passwd, $hash)
|
598 |
+
{
|
599 |
+
return ParagonIE_Sodium_Compat::crypto_pwhash_str_verify($passwd, $hash);
|
600 |
+
}
|
601 |
+
}
|
602 |
+
if (!is_callable('sodium_crypto_pwhash_scryptsalsa208sha256')) {
|
603 |
+
/**
|
604 |
+
* @see ParagonIE_Sodium_Compat::crypto_pwhash_scryptsalsa208sha256()
|
605 |
+
* @param int $outlen
|
606 |
+
* @param string $passwd
|
607 |
+
* @param string $salt
|
608 |
+
* @param int $opslimit
|
609 |
+
* @param int $memlimit
|
610 |
+
* @return string
|
611 |
+
* @throws SodiumException
|
612 |
+
* @throws TypeError
|
613 |
+
*/
|
614 |
+
function sodium_crypto_pwhash_scryptsalsa208sha256($outlen, $passwd, $salt, $opslimit, $memlimit)
|
615 |
+
{
|
616 |
+
return ParagonIE_Sodium_Compat::crypto_pwhash_scryptsalsa208sha256($outlen, $passwd, $salt, $opslimit, $memlimit);
|
617 |
+
}
|
618 |
+
}
|
619 |
+
if (!is_callable('sodium_crypto_pwhash_scryptsalsa208sha256_str')) {
|
620 |
+
/**
|
621 |
+
* @see ParagonIE_Sodium_Compat::crypto_pwhash_scryptsalsa208sha256_str()
|
622 |
+
* @param string $passwd
|
623 |
+
* @param int $opslimit
|
624 |
+
* @param int $memlimit
|
625 |
+
* @return string
|
626 |
+
* @throws SodiumException
|
627 |
+
* @throws TypeError
|
628 |
+
*/
|
629 |
+
function sodium_crypto_pwhash_scryptsalsa208sha256_str($passwd, $opslimit, $memlimit)
|
630 |
+
{
|
631 |
+
return ParagonIE_Sodium_Compat::crypto_pwhash_scryptsalsa208sha256_str($passwd, $opslimit, $memlimit);
|
632 |
+
}
|
633 |
+
}
|
634 |
+
if (!is_callable('sodium_crypto_pwhash_scryptsalsa208sha256_str_verify')) {
|
635 |
+
/**
|
636 |
+
* @see ParagonIE_Sodium_Compat::crypto_pwhash_scryptsalsa208sha256_str_verify()
|
637 |
+
* @param string $passwd
|
638 |
+
* @param string $hash
|
639 |
+
* @return bool
|
640 |
+
* @throws SodiumException
|
641 |
+
* @throws TypeError
|
642 |
+
*/
|
643 |
+
function sodium_crypto_pwhash_scryptsalsa208sha256_str_verify($passwd, $hash)
|
644 |
+
{
|
645 |
+
return ParagonIE_Sodium_Compat::crypto_pwhash_scryptsalsa208sha256_str_verify($passwd, $hash);
|
646 |
+
}
|
647 |
+
}
|
648 |
+
if (!is_callable('sodium_crypto_scalarmult')) {
|
649 |
+
/**
|
650 |
+
* @see ParagonIE_Sodium_Compat::crypto_scalarmult()
|
651 |
+
* @param string $n
|
652 |
+
* @param string $p
|
653 |
+
* @return string
|
654 |
+
* @throws SodiumException
|
655 |
+
* @throws TypeError
|
656 |
+
*/
|
657 |
+
function sodium_crypto_scalarmult($n, $p)
|
658 |
+
{
|
659 |
+
return ParagonIE_Sodium_Compat::crypto_scalarmult($n, $p);
|
660 |
+
}
|
661 |
+
}
|
662 |
+
if (!is_callable('sodium_crypto_scalarmult_base')) {
|
663 |
+
/**
|
664 |
+
* @see ParagonIE_Sodium_Compat::crypto_scalarmult_base()
|
665 |
+
* @param string $n
|
666 |
+
* @return string
|
667 |
+
* @throws SodiumException
|
668 |
+
* @throws TypeError
|
669 |
+
*/
|
670 |
+
function sodium_crypto_scalarmult_base($n)
|
671 |
+
{
|
672 |
+
return ParagonIE_Sodium_Compat::crypto_scalarmult_base($n);
|
673 |
+
}
|
674 |
+
}
|
675 |
+
if (!is_callable('sodium_crypto_secretbox')) {
|
676 |
+
/**
|
677 |
+
* @see ParagonIE_Sodium_Compat::crypto_secretbox()
|
678 |
+
* @param string $message
|
679 |
+
* @param string $nonce
|
680 |
+
* @param string $key
|
681 |
+
* @return string
|
682 |
+
* @throws SodiumException
|
683 |
+
* @throws TypeError
|
684 |
+
*/
|
685 |
+
function sodium_crypto_secretbox($message, $nonce, $key)
|
686 |
+
{
|
687 |
+
return ParagonIE_Sodium_Compat::crypto_secretbox($message, $nonce, $key);
|
688 |
+
}
|
689 |
+
}
|
690 |
+
if (!is_callable('sodium_crypto_secretbox_keygen')) {
|
691 |
+
/**
|
692 |
+
* @see ParagonIE_Sodium_Compat::crypto_secretbox_keygen()
|
693 |
+
* @return string
|
694 |
+
*/
|
695 |
+
function sodium_crypto_secretbox_keygen()
|
696 |
+
{
|
697 |
+
return ParagonIE_Sodium_Compat::crypto_secretbox_keygen();
|
698 |
+
}
|
699 |
+
}
|
700 |
+
if (!is_callable('sodium_crypto_secretbox_open')) {
|
701 |
+
/**
|
702 |
+
* @see ParagonIE_Sodium_Compat::crypto_secretbox_open()
|
703 |
+
* @param string $message
|
704 |
+
* @param string $nonce
|
705 |
+
* @param string $key
|
706 |
+
* @return string|bool
|
707 |
+
*/
|
708 |
+
function sodium_crypto_secretbox_open($message, $nonce, $key)
|
709 |
+
{
|
710 |
+
try {
|
711 |
+
return ParagonIE_Sodium_Compat::crypto_secretbox_open($message, $nonce, $key);
|
712 |
+
} catch (Error $ex) {
|
713 |
+
return false;
|
714 |
+
} catch (Exception $ex) {
|
715 |
+
return false;
|
716 |
+
}
|
717 |
+
}
|
718 |
+
}
|
719 |
+
if (!is_callable('sodium_crypto_shorthash')) {
|
720 |
+
/**
|
721 |
+
* @see ParagonIE_Sodium_Compat::crypto_shorthash()
|
722 |
+
* @param string $message
|
723 |
+
* @param string $key
|
724 |
+
* @return string
|
725 |
+
* @throws SodiumException
|
726 |
+
* @throws TypeError
|
727 |
+
*/
|
728 |
+
function sodium_crypto_shorthash($message, $key = '')
|
729 |
+
{
|
730 |
+
return ParagonIE_Sodium_Compat::crypto_shorthash($message, $key);
|
731 |
+
}
|
732 |
+
}
|
733 |
+
if (!is_callable('sodium_crypto_shorthash_keygen')) {
|
734 |
+
/**
|
735 |
+
* @see ParagonIE_Sodium_Compat::crypto_shorthash_keygen()
|
736 |
+
* @return string
|
737 |
+
*/
|
738 |
+
function sodium_crypto_shorthash_keygen()
|
739 |
+
{
|
740 |
+
return ParagonIE_Sodium_Compat::crypto_shorthash_keygen();
|
741 |
+
}
|
742 |
+
}
|
743 |
+
if (!is_callable('sodium_crypto_sign')) {
|
744 |
+
/**
|
745 |
+
* @see ParagonIE_Sodium_Compat::crypto_sign()
|
746 |
+
* @param string $message
|
747 |
+
* @param string $sk
|
748 |
+
* @return string
|
749 |
+
* @throws SodiumException
|
750 |
+
* @throws TypeError
|
751 |
+
*/
|
752 |
+
function sodium_crypto_sign($message, $sk)
|
753 |
+
{
|
754 |
+
return ParagonIE_Sodium_Compat::crypto_sign($message, $sk);
|
755 |
+
}
|
756 |
+
}
|
757 |
+
if (!is_callable('sodium_crypto_sign_detached')) {
|
758 |
+
/**
|
759 |
+
* @see ParagonIE_Sodium_Compat::crypto_sign_detached()
|
760 |
+
* @param string $message
|
761 |
+
* @param string $sk
|
762 |
+
* @return string
|
763 |
+
* @throws SodiumException
|
764 |
+
* @throws TypeError
|
765 |
+
*/
|
766 |
+
function sodium_crypto_sign_detached($message, $sk)
|
767 |
+
{
|
768 |
+
return ParagonIE_Sodium_Compat::crypto_sign_detached($message, $sk);
|
769 |
+
}
|
770 |
+
}
|
771 |
+
if (!is_callable('sodium_crypto_sign_keypair')) {
|
772 |
+
/**
|
773 |
+
* @see ParagonIE_Sodium_Compat::crypto_sign_keypair()
|
774 |
+
* @return string
|
775 |
+
* @throws SodiumException
|
776 |
+
* @throws TypeError
|
777 |
+
*/
|
778 |
+
function sodium_crypto_sign_keypair()
|
779 |
+
{
|
780 |
+
return ParagonIE_Sodium_Compat::crypto_sign_keypair();
|
781 |
+
}
|
782 |
+
}
|
783 |
+
if (!is_callable('sodium_crypto_sign_open')) {
|
784 |
+
/**
|
785 |
+
* @see ParagonIE_Sodium_Compat::crypto_sign_open()
|
786 |
+
* @param string $signedMessage
|
787 |
+
* @param string $pk
|
788 |
+
* @return string|bool
|
789 |
+
*/
|
790 |
+
function sodium_crypto_sign_open($signedMessage, $pk)
|
791 |
+
{
|
792 |
+
try {
|
793 |
+
return ParagonIE_Sodium_Compat::crypto_sign_open($signedMessage, $pk);
|
794 |
+
} catch (Error $ex) {
|
795 |
+
return false;
|
796 |
+
} catch (Exception $ex) {
|
797 |
+
return false;
|
798 |
+
}
|
799 |
+
}
|
800 |
+
}
|
801 |
+
if (!is_callable('sodium_crypto_sign_publickey')) {
|
802 |
+
/**
|
803 |
+
* @see ParagonIE_Sodium_Compat::crypto_sign_publickey()
|
804 |
+
* @param string $keypair
|
805 |
+
* @return string
|
806 |
+
* @throws SodiumException
|
807 |
+
* @throws TypeError
|
808 |
+
*/
|
809 |
+
function sodium_crypto_sign_publickey($keypair)
|
810 |
+
{
|
811 |
+
return ParagonIE_Sodium_Compat::crypto_sign_publickey($keypair);
|
812 |
+
}
|
813 |
+
}
|
814 |
+
if (!is_callable('sodium_crypto_sign_publickey_from_secretkey')) {
|
815 |
+
/**
|
816 |
+
* @see ParagonIE_Sodium_Compat::crypto_sign_publickey_from_secretkey()
|
817 |
+
* @param string $sk
|
818 |
+
* @return string
|
819 |
+
* @throws SodiumException
|
820 |
+
* @throws TypeError
|
821 |
+
*/
|
822 |
+
function sodium_crypto_sign_publickey_from_secretkey($sk)
|
823 |
+
{
|
824 |
+
return ParagonIE_Sodium_Compat::crypto_sign_publickey_from_secretkey($sk);
|
825 |
+
}
|
826 |
+
}
|
827 |
+
if (!is_callable('sodium_crypto_sign_secretkey')) {
|
828 |
+
/**
|
829 |
+
* @see ParagonIE_Sodium_Compat::crypto_sign_secretkey()
|
830 |
+
* @param string $keypair
|
831 |
+
* @return string
|
832 |
+
* @throws SodiumException
|
833 |
+
* @throws TypeError
|
834 |
+
*/
|
835 |
+
function sodium_crypto_sign_secretkey($keypair)
|
836 |
+
{
|
837 |
+
return ParagonIE_Sodium_Compat::crypto_sign_secretkey($keypair);
|
838 |
+
}
|
839 |
+
}
|
840 |
+
if (!is_callable('sodium_crypto_sign_seed_keypair')) {
|
841 |
+
/**
|
842 |
+
* @see ParagonIE_Sodium_Compat::crypto_sign_seed_keypair()
|
843 |
+
* @param string $seed
|
844 |
+
* @return string
|
845 |
+
* @throws SodiumException
|
846 |
+
* @throws TypeError
|
847 |
+
*/
|
848 |
+
function sodium_crypto_sign_seed_keypair($seed)
|
849 |
+
{
|
850 |
+
return ParagonIE_Sodium_Compat::crypto_sign_seed_keypair($seed);
|
851 |
+
}
|
852 |
+
}
|
853 |
+
if (!is_callable('sodium_crypto_sign_verify_detached')) {
|
854 |
+
/**
|
855 |
+
* @see ParagonIE_Sodium_Compat::crypto_sign_verify_detached()
|
856 |
+
* @param string $signature
|
857 |
+
* @param string $message
|
858 |
+
* @param string $pk
|
859 |
+
* @return bool
|
860 |
+
* @throws SodiumException
|
861 |
+
* @throws TypeError
|
862 |
+
*/
|
863 |
+
function sodium_crypto_sign_verify_detached($signature, $message, $pk)
|
864 |
+
{
|
865 |
+
return ParagonIE_Sodium_Compat::crypto_sign_verify_detached($signature, $message, $pk);
|
866 |
+
}
|
867 |
+
}
|
868 |
+
if (!is_callable('sodium_crypto_sign_ed25519_pk_to_curve25519')) {
|
869 |
+
/**
|
870 |
+
* @see ParagonIE_Sodium_Compat::crypto_sign_ed25519_pk_to_curve25519()
|
871 |
+
* @param string $pk
|
872 |
+
* @return string
|
873 |
+
* @throws SodiumException
|
874 |
+
* @throws TypeError
|
875 |
+
*/
|
876 |
+
function sodium_crypto_sign_ed25519_pk_to_curve25519($pk)
|
877 |
+
{
|
878 |
+
return ParagonIE_Sodium_Compat::crypto_sign_ed25519_pk_to_curve25519($pk);
|
879 |
+
}
|
880 |
+
}
|
881 |
+
if (!is_callable('sodium_crypto_sign_ed25519_sk_to_curve25519')) {
|
882 |
+
/**
|
883 |
+
* @see ParagonIE_Sodium_Compat::crypto_sign_ed25519_sk_to_curve25519()
|
884 |
+
* @param string $sk
|
885 |
+
* @return string
|
886 |
+
* @throws SodiumException
|
887 |
+
* @throws TypeError
|
888 |
+
*/
|
889 |
+
function sodium_crypto_sign_ed25519_sk_to_curve25519($sk)
|
890 |
+
{
|
891 |
+
return ParagonIE_Sodium_Compat::crypto_sign_ed25519_sk_to_curve25519($sk);
|
892 |
+
}
|
893 |
+
}
|
894 |
+
if (!is_callable('sodium_crypto_stream')) {
|
895 |
+
/**
|
896 |
+
* @see ParagonIE_Sodium_Compat::crypto_stream()
|
897 |
+
* @param int $len
|
898 |
+
* @param string $nonce
|
899 |
+
* @param string $key
|
900 |
+
* @return string
|
901 |
+
* @throws SodiumException
|
902 |
+
* @throws TypeError
|
903 |
+
*/
|
904 |
+
function sodium_crypto_stream($len, $nonce, $key)
|
905 |
+
{
|
906 |
+
return ParagonIE_Sodium_Compat::crypto_stream($len, $nonce, $key);
|
907 |
+
}
|
908 |
+
}
|
909 |
+
if (!is_callable('sodium_crypto_stream_keygen')) {
|
910 |
+
/**
|
911 |
+
* @see ParagonIE_Sodium_Compat::crypto_stream_keygen()
|
912 |
+
* @return string
|
913 |
+
*/
|
914 |
+
function sodium_crypto_stream_keygen()
|
915 |
+
{
|
916 |
+
return ParagonIE_Sodium_Compat::crypto_stream_keygen();
|
917 |
+
}
|
918 |
+
}
|
919 |
+
if (!is_callable('sodium_crypto_stream_xor')) {
|
920 |
+
/**
|
921 |
+
* @see ParagonIE_Sodium_Compat::crypto_stream_xor()
|
922 |
+
* @param string $message
|
923 |
+
* @param string $nonce
|
924 |
+
* @param string $key
|
925 |
+
* @return string
|
926 |
+
* @throws SodiumException
|
927 |
+
* @throws TypeError
|
928 |
+
*/
|
929 |
+
function sodium_crypto_stream_xor($message, $nonce, $key)
|
930 |
+
{
|
931 |
+
return ParagonIE_Sodium_Compat::crypto_stream_xor($message, $nonce, $key);
|
932 |
+
}
|
933 |
+
}
|
934 |
+
if (!is_callable('sodium_hex2bin')) {
|
935 |
+
/**
|
936 |
+
* @see ParagonIE_Sodium_Compat::hex2bin()
|
937 |
+
* @param string $string
|
938 |
+
* @return string
|
939 |
+
* @throws SodiumException
|
940 |
+
* @throws TypeError
|
941 |
+
*/
|
942 |
+
function sodium_hex2bin($string)
|
943 |
+
{
|
944 |
+
return ParagonIE_Sodium_Compat::hex2bin($string);
|
945 |
+
}
|
946 |
+
}
|
947 |
+
if (!is_callable('sodium_increment')) {
|
948 |
+
/**
|
949 |
+
* @see ParagonIE_Sodium_Compat::increment()
|
950 |
+
* @param &string $string
|
951 |
+
* @return void
|
952 |
+
* @throws SodiumException
|
953 |
+
* @throws TypeError
|
954 |
+
*/
|
955 |
+
function sodium_increment(&$string)
|
956 |
+
{
|
957 |
+
ParagonIE_Sodium_Compat::increment($string);
|
958 |
+
}
|
959 |
+
}
|
960 |
+
if (!is_callable('sodium_library_version_major')) {
|
961 |
+
/**
|
962 |
+
* @see ParagonIE_Sodium_Compat::library_version_major()
|
963 |
+
* @return int
|
964 |
+
*/
|
965 |
+
function sodium_library_version_major()
|
966 |
+
{
|
967 |
+
return ParagonIE_Sodium_Compat::library_version_major();
|
968 |
+
}
|
969 |
+
}
|
970 |
+
if (!is_callable('sodium_library_version_minor')) {
|
971 |
+
/**
|
972 |
+
* @see ParagonIE_Sodium_Compat::library_version_minor()
|
973 |
+
* @return int
|
974 |
+
*/
|
975 |
+
function sodium_library_version_minor()
|
976 |
+
{
|
977 |
+
return ParagonIE_Sodium_Compat::library_version_minor();
|
978 |
+
}
|
979 |
+
}
|
980 |
+
if (!is_callable('sodium_version_string')) {
|
981 |
+
/**
|
982 |
+
* @see ParagonIE_Sodium_Compat::version_string()
|
983 |
+
* @return string
|
984 |
+
*/
|
985 |
+
function sodium_version_string()
|
986 |
+
{
|
987 |
+
return ParagonIE_Sodium_Compat::version_string();
|
988 |
+
}
|
989 |
+
}
|
990 |
+
if (!is_callable('sodium_memcmp')) {
|
991 |
+
/**
|
992 |
+
* @see ParagonIE_Sodium_Compat::memcmp()
|
993 |
+
* @param string $a
|
994 |
+
* @param string $b
|
995 |
+
* @return int
|
996 |
+
* @throws SodiumException
|
997 |
+
* @throws TypeError
|
998 |
+
*/
|
999 |
+
function sodium_memcmp($a, $b)
|
1000 |
+
{
|
1001 |
+
return ParagonIE_Sodium_Compat::memcmp($a, $b);
|
1002 |
+
}
|
1003 |
+
}
|
1004 |
+
if (!is_callable('sodium_memzero')) {
|
1005 |
+
/**
|
1006 |
+
* @see ParagonIE_Sodium_Compat::memzero()
|
1007 |
+
* @param string &$str
|
1008 |
+
* @return void
|
1009 |
+
* @throws SodiumException
|
1010 |
+
* @throws TypeError
|
1011 |
+
*/
|
1012 |
+
function sodium_memzero(&$str)
|
1013 |
+
{
|
1014 |
+
ParagonIE_Sodium_Compat::memzero($str);
|
1015 |
+
}
|
1016 |
+
}
|
1017 |
+
if (!is_callable('sodium_randombytes_buf')) {
|
1018 |
+
/**
|
1019 |
+
* @see ParagonIE_Sodium_Compat::randombytes_buf()
|
1020 |
+
* @param int $amount
|
1021 |
+
* @return string
|
1022 |
+
* @throws Exception
|
1023 |
+
*/
|
1024 |
+
function sodium_randombytes_buf($amount)
|
1025 |
+
{
|
1026 |
+
return ParagonIE_Sodium_Compat::randombytes_buf($amount);
|
1027 |
+
}
|
1028 |
+
}
|
1029 |
+
|
1030 |
+
if (!is_callable('sodium_randombytes_uniform')) {
|
1031 |
+
/**
|
1032 |
+
* @see ParagonIE_Sodium_Compat::randombytes_uniform()
|
1033 |
+
* @param int $upperLimit
|
1034 |
+
* @return int
|
1035 |
+
* @throws Exception
|
1036 |
+
*/
|
1037 |
+
function sodium_randombytes_uniform($upperLimit)
|
1038 |
+
{
|
1039 |
+
return ParagonIE_Sodium_Compat::randombytes_uniform($upperLimit);
|
1040 |
+
}
|
1041 |
+
}
|
1042 |
+
|
1043 |
+
if (!is_callable('sodium_randombytes_random16')) {
|
1044 |
+
/**
|
1045 |
+
* @see ParagonIE_Sodium_Compat::randombytes_random16()
|
1046 |
+
* @return int
|
1047 |
+
*/
|
1048 |
+
function sodium_randombytes_random16()
|
1049 |
+
{
|
1050 |
+
return ParagonIE_Sodium_Compat::randombytes_random16();
|
1051 |
+
}
|
1052 |
+
}
|
vendor/paragonie/sodium_compat/lib/sodium_compat.php
ADDED
@@ -0,0 +1,835 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Sodium;
|
3 |
+
|
4 |
+
use ParagonIE_Sodium_Compat;
|
5 |
+
|
6 |
+
/**
|
7 |
+
* This file will monkey patch the pure-PHP implementation in place of the
|
8 |
+
* PECL functions, but only if they do not already exist.
|
9 |
+
*
|
10 |
+
* Thus, the functions just proxy to the appropriate ParagonIE_Sodium_Compat
|
11 |
+
* method.
|
12 |
+
*/
|
13 |
+
if (!is_callable('\\Sodium\\bin2hex')) {
|
14 |
+
/**
|
15 |
+
* @see ParagonIE_Sodium_Compat::bin2hex()
|
16 |
+
* @param string $string
|
17 |
+
* @return string
|
18 |
+
* @throws \SodiumException
|
19 |
+
* @throws \TypeError
|
20 |
+
*/
|
21 |
+
function bin2hex($string)
|
22 |
+
{
|
23 |
+
return ParagonIE_Sodium_Compat::bin2hex($string);
|
24 |
+
}
|
25 |
+
}
|
26 |
+
if (!is_callable('\\Sodium\\compare')) {
|
27 |
+
/**
|
28 |
+
* @see ParagonIE_Sodium_Compat::compare()
|
29 |
+
* @param string $a
|
30 |
+
* @param string $b
|
31 |
+
* @return int
|
32 |
+
* @throws \SodiumException
|
33 |
+
* @throws \TypeError
|
34 |
+
*/
|
35 |
+
function compare($a, $b)
|
36 |
+
{
|
37 |
+
return ParagonIE_Sodium_Compat::compare($a, $b);
|
38 |
+
}
|
39 |
+
}
|
40 |
+
if (!is_callable('\\Sodium\\crypto_aead_aes256gcm_decrypt')) {
|
41 |
+
/**
|
42 |
+
* @see ParagonIE_Sodium_Compat::crypto_aead_aes256gcm_decrypt()
|
43 |
+
* @param string $message
|
44 |
+
* @param string $assocData
|
45 |
+
* @param string $nonce
|
46 |
+
* @param string $key
|
47 |
+
* @return string|bool
|
48 |
+
* @throws \SodiumException
|
49 |
+
* @throws \TypeError
|
50 |
+
*/
|
51 |
+
function crypto_aead_aes256gcm_decrypt($message, $assocData, $nonce, $key)
|
52 |
+
{
|
53 |
+
try {
|
54 |
+
return ParagonIE_Sodium_Compat::crypto_aead_aes256gcm_decrypt($message, $assocData, $nonce, $key);
|
55 |
+
} catch (Error $ex) {
|
56 |
+
return false;
|
57 |
+
} catch (Exception $ex) {
|
58 |
+
return false;
|
59 |
+
}
|
60 |
+
}
|
61 |
+
}
|
62 |
+
if (!is_callable('\\Sodium\\crypto_aead_aes256gcm_encrypt')) {
|
63 |
+
/**
|
64 |
+
* @see ParagonIE_Sodium_Compat::crypto_aead_aes256gcm_encrypt()
|
65 |
+
* @param string $message
|
66 |
+
* @param string $assocData
|
67 |
+
* @param string $nonce
|
68 |
+
* @param string $key
|
69 |
+
* @return string
|
70 |
+
* @throws \SodiumException
|
71 |
+
* @throws \TypeError
|
72 |
+
*/
|
73 |
+
function crypto_aead_aes256gcm_encrypt($message, $assocData, $nonce, $key)
|
74 |
+
{
|
75 |
+
return ParagonIE_Sodium_Compat::crypto_aead_aes256gcm_encrypt($message, $assocData, $nonce, $key);
|
76 |
+
}
|
77 |
+
}
|
78 |
+
if (!is_callable('\\Sodium\\crypto_aead_aes256gcm_is_available')) {
|
79 |
+
/**
|
80 |
+
* @see ParagonIE_Sodium_Compat::crypto_aead_aes256gcm_is_available()
|
81 |
+
* @return bool
|
82 |
+
*/
|
83 |
+
function crypto_aead_aes256gcm_is_available()
|
84 |
+
{
|
85 |
+
return ParagonIE_Sodium_Compat::crypto_aead_aes256gcm_is_available();
|
86 |
+
}
|
87 |
+
}
|
88 |
+
if (!is_callable('\\Sodium\\crypto_aead_chacha20poly1305_decrypt')) {
|
89 |
+
/**
|
90 |
+
* @see ParagonIE_Sodium_Compat::crypto_aead_chacha20poly1305_decrypt()
|
91 |
+
* @param string $message
|
92 |
+
* @param string $assocData
|
93 |
+
* @param string $nonce
|
94 |
+
* @param string $key
|
95 |
+
* @return string|bool
|
96 |
+
* @throws \SodiumException
|
97 |
+
* @throws \TypeError
|
98 |
+
*/
|
99 |
+
function crypto_aead_chacha20poly1305_decrypt($message, $assocData, $nonce, $key)
|
100 |
+
{
|
101 |
+
try {
|
102 |
+
return ParagonIE_Sodium_Compat::crypto_aead_chacha20poly1305_decrypt($message, $assocData, $nonce, $key);
|
103 |
+
} catch (Error $ex) {
|
104 |
+
return false;
|
105 |
+
} catch (Exception $ex) {
|
106 |
+
return false;
|
107 |
+
}
|
108 |
+
}
|
109 |
+
}
|
110 |
+
if (!is_callable('\\Sodium\\crypto_aead_chacha20poly1305_encrypt')) {
|
111 |
+
/**
|
112 |
+
* @see ParagonIE_Sodium_Compat::crypto_aead_chacha20poly1305_encrypt()
|
113 |
+
* @param string $message
|
114 |
+
* @param string $assocData
|
115 |
+
* @param string $nonce
|
116 |
+
* @param string $key
|
117 |
+
* @return string
|
118 |
+
* @throws \SodiumException
|
119 |
+
* @throws \TypeError
|
120 |
+
*/
|
121 |
+
function crypto_aead_chacha20poly1305_encrypt($message, $assocData, $nonce, $key)
|
122 |
+
{
|
123 |
+
return ParagonIE_Sodium_Compat::crypto_aead_chacha20poly1305_encrypt($message, $assocData, $nonce, $key);
|
124 |
+
}
|
125 |
+
}
|
126 |
+
if (!is_callable('\\Sodium\\crypto_aead_chacha20poly1305_ietf_decrypt')) {
|
127 |
+
/**
|
128 |
+
* @see ParagonIE_Sodium_Compat::crypto_aead_chacha20poly1305_ietf_decrypt()
|
129 |
+
* @param string $message
|
130 |
+
* @param string $assocData
|
131 |
+
* @param string $nonce
|
132 |
+
* @param string $key
|
133 |
+
* @return string|bool
|
134 |
+
* @throws \SodiumException
|
135 |
+
* @throws \TypeError
|
136 |
+
*/
|
137 |
+
function crypto_aead_chacha20poly1305_ietf_decrypt($message, $assocData, $nonce, $key)
|
138 |
+
{
|
139 |
+
try {
|
140 |
+
return ParagonIE_Sodium_Compat::crypto_aead_chacha20poly1305_ietf_decrypt($message, $assocData, $nonce, $key);
|
141 |
+
} catch (Error $ex) {
|
142 |
+
return false;
|
143 |
+
} catch (Exception $ex) {
|
144 |
+
return false;
|
145 |
+
}
|
146 |
+
}
|
147 |
+
}
|
148 |
+
if (!is_callable('\\Sodium\\crypto_aead_chacha20poly1305_ietf_encrypt')) {
|
149 |
+
/**
|
150 |
+
* @see ParagonIE_Sodium_Compat::crypto_aead_chacha20poly1305_ietf_encrypt()
|
151 |
+
* @param string $message
|
152 |
+
* @param string $assocData
|
153 |
+
* @param string $nonce
|
154 |
+
* @param string $key
|
155 |
+
* @return string
|
156 |
+
* @throws \SodiumException
|
157 |
+
* @throws \TypeError
|
158 |
+
*/
|
159 |
+
function crypto_aead_chacha20poly1305_ietf_encrypt($message, $assocData, $nonce, $key)
|
160 |
+
{
|
161 |
+
return ParagonIE_Sodium_Compat::crypto_aead_chacha20poly1305_ietf_encrypt($message, $assocData, $nonce, $key);
|
162 |
+
}
|
163 |
+
}
|
164 |
+
if (!is_callable('\\Sodium\\crypto_auth')) {
|
165 |
+
/**
|
166 |
+
* @see ParagonIE_Sodium_Compat::crypto_auth()
|
167 |
+
* @param string $message
|
168 |
+
* @param string $key
|
169 |
+
* @return string
|
170 |
+
* @throws \SodiumException
|
171 |
+
* @throws \TypeError
|
172 |
+
*/
|
173 |
+
function crypto_auth($message, $key)
|
174 |
+
{
|
175 |
+
return ParagonIE_Sodium_Compat::crypto_auth($message, $key);
|
176 |
+
}
|
177 |
+
}
|
178 |
+
if (!is_callable('\\Sodium\\crypto_auth_verify')) {
|
179 |
+
/**
|
180 |
+
* @see ParagonIE_Sodium_Compat::crypto_auth_verify()
|
181 |
+
* @param string $mac
|
182 |
+
* @param string $message
|
183 |
+
* @param string $key
|
184 |
+
* @return bool
|
185 |
+
* @throws \SodiumException
|
186 |
+
* @throws \TypeError
|
187 |
+
*/
|
188 |
+
function crypto_auth_verify($mac, $message, $key)
|
189 |
+
{
|
190 |
+
return ParagonIE_Sodium_Compat::crypto_auth_verify($mac, $message, $key);
|
191 |
+
}
|
192 |
+
}
|
193 |
+
if (!is_callable('\\Sodium\\crypto_box')) {
|
194 |
+
/**
|
195 |
+
* @see ParagonIE_Sodium_Compat::crypto_box()
|
196 |
+
* @param string $message
|
197 |
+
* @param string $nonce
|
198 |
+
* @param string $kp
|
199 |
+
* @return string
|
200 |
+
* @throws \SodiumException
|
201 |
+
* @throws \TypeError
|
202 |
+
*/
|
203 |
+
function crypto_box($message, $nonce, $kp)
|
204 |
+
{
|
205 |
+
return ParagonIE_Sodium_Compat::crypto_box($message, $nonce, $kp);
|
206 |
+
}
|
207 |
+
}
|
208 |
+
if (!is_callable('\\Sodium\\crypto_box_keypair')) {
|
209 |
+
/**
|
210 |
+
* @see ParagonIE_Sodium_Compat::crypto_box_keypair()
|
211 |
+
* @return string
|
212 |
+
* @throws \SodiumException
|
213 |
+
* @throws \TypeError
|
214 |
+
*/
|
215 |
+
function crypto_box_keypair()
|
216 |
+
{
|
217 |
+
return ParagonIE_Sodium_Compat::crypto_box_keypair();
|
218 |
+
}
|
219 |
+
}
|
220 |
+
if (!is_callable('\\Sodium\\crypto_box_keypair_from_secretkey_and_publickey')) {
|
221 |
+
/**
|
222 |
+
* @see ParagonIE_Sodium_Compat::crypto_box_keypair_from_secretkey_and_publickey()
|
223 |
+
* @param string $sk
|
224 |
+
* @param string $pk
|
225 |
+
* @return string
|
226 |
+
* @throws \SodiumException
|
227 |
+
* @throws \TypeError
|
228 |
+
*/
|
229 |
+
function crypto_box_keypair_from_secretkey_and_publickey($sk, $pk)
|
230 |
+
{
|
231 |
+
return ParagonIE_Sodium_Compat::crypto_box_keypair_from_secretkey_and_publickey($sk, $pk);
|
232 |
+
}
|
233 |
+
}
|
234 |
+
if (!is_callable('\\Sodium\\crypto_box_open')) {
|
235 |
+
/**
|
236 |
+
* @see ParagonIE_Sodium_Compat::crypto_box_open()
|
237 |
+
* @param string $message
|
238 |
+
* @param string $nonce
|
239 |
+
* @param string $kp
|
240 |
+
* @return string|bool
|
241 |
+
* @throws \SodiumException
|
242 |
+
* @throws \TypeError
|
243 |
+
*/
|
244 |
+
function crypto_box_open($message, $nonce, $kp)
|
245 |
+
{
|
246 |
+
try {
|
247 |
+
return ParagonIE_Sodium_Compat::crypto_box_open($message, $nonce, $kp);
|
248 |
+
} catch (Error $ex) {
|
249 |
+
return false;
|
250 |
+
} catch (Exception $ex) {
|
251 |
+
return false;
|
252 |
+
}
|
253 |
+
}
|
254 |
+
}
|
255 |
+
if (!is_callable('\\Sodium\\crypto_box_publickey')) {
|
256 |
+
/**
|
257 |
+
* @see ParagonIE_Sodium_Compat::crypto_box_publickey()
|
258 |
+
* @param string $keypair
|
259 |
+
* @return string
|
260 |
+
* @throws \SodiumException
|
261 |
+
* @throws \TypeError
|
262 |
+
*/
|
263 |
+
function crypto_box_publickey($keypair)
|
264 |
+
{
|
265 |
+
return ParagonIE_Sodium_Compat::crypto_box_publickey($keypair);
|
266 |
+
}
|
267 |
+
}
|
268 |
+
if (!is_callable('\\Sodium\\crypto_box_publickey_from_secretkey')) {
|
269 |
+
/**
|
270 |
+
* @see ParagonIE_Sodium_Compat::crypto_box_publickey_from_secretkey()
|
271 |
+
* @param string $sk
|
272 |
+
* @return string
|
273 |
+
* @throws \SodiumException
|
274 |
+
* @throws \TypeError
|
275 |
+
*/
|
276 |
+
function crypto_box_publickey_from_secretkey($sk)
|
277 |
+
{
|
278 |
+
return ParagonIE_Sodium_Compat::crypto_box_publickey_from_secretkey($sk);
|
279 |
+
}
|
280 |
+
}
|
281 |
+
if (!is_callable('\\Sodium\\crypto_box_seal')) {
|
282 |
+
/**
|
283 |
+
* @see ParagonIE_Sodium_Compat::crypto_box_seal_open()
|
284 |
+
* @param string $message
|
285 |
+
* @param string $publicKey
|
286 |
+
* @return string
|
287 |
+
* @throws \SodiumException
|
288 |
+
* @throws \TypeError
|
289 |
+
*/
|
290 |
+
function crypto_box_seal($message, $publicKey)
|
291 |
+
{
|
292 |
+
return ParagonIE_Sodium_Compat::crypto_box_seal($message, $publicKey);
|
293 |
+
}
|
294 |
+
}
|
295 |
+
if (!is_callable('\\Sodium\\crypto_box_seal_open')) {
|
296 |
+
/**
|
297 |
+
* @see ParagonIE_Sodium_Compat::crypto_box_seal_open()
|
298 |
+
* @param string $message
|
299 |
+
* @param string $kp
|
300 |
+
* @return string|bool
|
301 |
+
* @throws \TypeError
|
302 |
+
*/
|
303 |
+
function crypto_box_seal_open($message, $kp)
|
304 |
+
{
|
305 |
+
try {
|
306 |
+
return ParagonIE_Sodium_Compat::crypto_box_seal_open($message, $kp);
|
307 |
+
} catch (\Error $ex) {
|
308 |
+
return false;
|
309 |
+
} catch (\Exception $ex) {
|
310 |
+
return false;
|
311 |
+
}
|
312 |
+
}
|
313 |
+
}
|
314 |
+
if (!is_callable('\\Sodium\\crypto_box_secretkey')) {
|
315 |
+
/**
|
316 |
+
* @see ParagonIE_Sodium_Compat::crypto_box_secretkey()
|
317 |
+
* @param string $keypair
|
318 |
+
* @return string
|
319 |
+
* @throws \SodiumException
|
320 |
+
* @throws \TypeError
|
321 |
+
*/
|
322 |
+
function crypto_box_secretkey($keypair)
|
323 |
+
{
|
324 |
+
return ParagonIE_Sodium_Compat::crypto_box_secretkey($keypair);
|
325 |
+
}
|
326 |
+
}
|
327 |
+
if (!is_callable('\\Sodium\\crypto_generichash')) {
|
328 |
+
/**
|
329 |
+
* @see ParagonIE_Sodium_Compat::crypto_generichash()
|
330 |
+
* @param string $message
|
331 |
+
* @param string|null $key
|
332 |
+
* @param int $outLen
|
333 |
+
* @return string
|
334 |
+
* @throws \SodiumException
|
335 |
+
* @throws \TypeError
|
336 |
+
*/
|
337 |
+
function crypto_generichash($message, $key = null, $outLen = 32)
|
338 |
+
{
|
339 |
+
return ParagonIE_Sodium_Compat::crypto_generichash($message, $key, $outLen);
|
340 |
+
}
|
341 |
+
}
|
342 |
+
if (!is_callable('\\Sodium\\crypto_generichash_final')) {
|
343 |
+
/**
|
344 |
+
* @see ParagonIE_Sodium_Compat::crypto_generichash_final()
|
345 |
+
* @param string|null $ctx
|
346 |
+
* @param int $outputLength
|
347 |
+
* @return string
|
348 |
+
* @throws \SodiumException
|
349 |
+
* @throws \TypeError
|
350 |
+
*/
|
351 |
+
function crypto_generichash_final(&$ctx, $outputLength = 32)
|
352 |
+
{
|
353 |
+
return ParagonIE_Sodium_Compat::crypto_generichash_final($ctx, $outputLength);
|
354 |
+
}
|
355 |
+
}
|
356 |
+
if (!is_callable('\\Sodium\\crypto_generichash_init')) {
|
357 |
+
/**
|
358 |
+
* @see ParagonIE_Sodium_Compat::crypto_generichash_init()
|
359 |
+
* @param string|null $key
|
360 |
+
* @param int $outLen
|
361 |
+
* @return string
|
362 |
+
* @throws \SodiumException
|
363 |
+
* @throws \TypeError
|
364 |
+
*/
|
365 |
+
function crypto_generichash_init($key = null, $outLen = 32)
|
366 |
+
{
|
367 |
+
return ParagonIE_Sodium_Compat::crypto_generichash_init($key, $outLen);
|
368 |
+
}
|
369 |
+
}
|
370 |
+
if (!is_callable('\\Sodium\\crypto_generichash_update')) {
|
371 |
+
/**
|
372 |
+
* @see ParagonIE_Sodium_Compat::crypto_generichash_update()
|
373 |
+
* @param string|null $ctx
|
374 |
+
* @param string $message
|
375 |
+
* @return void
|
376 |
+
* @throws \SodiumException
|
377 |
+
* @throws \TypeError
|
378 |
+
*/
|
379 |
+
function crypto_generichash_update(&$ctx, $message = '')
|
380 |
+
{
|
381 |
+
ParagonIE_Sodium_Compat::crypto_generichash_update($ctx, $message);
|
382 |
+
}
|
383 |
+
}
|
384 |
+
if (!is_callable('\\Sodium\\crypto_kx')) {
|
385 |
+
/**
|
386 |
+
* @see ParagonIE_Sodium_Compat::crypto_kx()
|
387 |
+
* @param string $my_secret
|
388 |
+
* @param string $their_public
|
389 |
+
* @param string $client_public
|
390 |
+
* @param string $server_public
|
391 |
+
* @return string
|
392 |
+
* @throws \SodiumException
|
393 |
+
* @throws \TypeError
|
394 |
+
*/
|
395 |
+
function crypto_kx($my_secret, $their_public, $client_public, $server_public)
|
396 |
+
{
|
397 |
+
return ParagonIE_Sodium_Compat::crypto_kx(
|
398 |
+
$my_secret,
|
399 |
+
$their_public,
|
400 |
+
$client_public,
|
401 |
+
$server_public
|
402 |
+
);
|
403 |
+
}
|
404 |
+
}
|
405 |
+
if (!is_callable('\\Sodium\\crypto_pwhash')) {
|
406 |
+
/**
|
407 |
+
* @see ParagonIE_Sodium_Compat::crypto_pwhash()
|
408 |
+
* @param int $outlen
|
409 |
+
* @param string $passwd
|
410 |
+
* @param string $salt
|
411 |
+
* @param int $opslimit
|
412 |
+
* @param int $memlimit
|
413 |
+
* @return string
|
414 |
+
* @throws \SodiumException
|
415 |
+
* @throws \TypeError
|
416 |
+
*/
|
417 |
+
function crypto_pwhash($outlen, $passwd, $salt, $opslimit, $memlimit)
|
418 |
+
{
|
419 |
+
return ParagonIE_Sodium_Compat::crypto_pwhash($outlen, $passwd, $salt, $opslimit, $memlimit);
|
420 |
+
}
|
421 |
+
}
|
422 |
+
if (!is_callable('\\Sodium\\crypto_pwhash_str')) {
|
423 |
+
/**
|
424 |
+
* @see ParagonIE_Sodium_Compat::crypto_pwhash_str()
|
425 |
+
* @param string $passwd
|
426 |
+
* @param int $opslimit
|
427 |
+
* @param int $memlimit
|
428 |
+
* @return string
|
429 |
+
* @throws \SodiumException
|
430 |
+
* @throws \TypeError
|
431 |
+
*/
|
432 |
+
function crypto_pwhash_str($passwd, $opslimit, $memlimit)
|
433 |
+
{
|
434 |
+
return ParagonIE_Sodium_Compat::crypto_pwhash_str($passwd, $opslimit, $memlimit);
|
435 |
+
}
|
436 |
+
}
|
437 |
+
if (!is_callable('\\Sodium\\crypto_pwhash_str_verify')) {
|
438 |
+
/**
|
439 |
+
* @see ParagonIE_Sodium_Compat::crypto_pwhash_str_verify()
|
440 |
+
* @param string $passwd
|
441 |
+
* @param string $hash
|
442 |
+
* @return bool
|
443 |
+
* @throws \SodiumException
|
444 |
+
* @throws \TypeError
|
445 |
+
*/
|
446 |
+
function crypto_pwhash_str_verify($passwd, $hash)
|
447 |
+
{
|
448 |
+
return ParagonIE_Sodium_Compat::crypto_pwhash_str_verify($passwd, $hash);
|
449 |
+
}
|
450 |
+
}
|
451 |
+
if (!is_callable('\\Sodium\\crypto_pwhash_scryptsalsa208sha256')) {
|
452 |
+
/**
|
453 |
+
* @see ParagonIE_Sodium_Compat::crypto_pwhash_scryptsalsa208sha256()
|
454 |
+
* @param int $outlen
|
455 |
+
* @param string $passwd
|
456 |
+
* @param string $salt
|
457 |
+
* @param int $opslimit
|
458 |
+
* @param int $memlimit
|
459 |
+
* @return string
|
460 |
+
* @throws \SodiumException
|
461 |
+
* @throws \TypeError
|
462 |
+
*/
|
463 |
+
function crypto_pwhash_scryptsalsa208sha256($outlen, $passwd, $salt, $opslimit, $memlimit)
|
464 |
+
{
|
465 |
+
return ParagonIE_Sodium_Compat::crypto_pwhash_scryptsalsa208sha256($outlen, $passwd, $salt, $opslimit, $memlimit);
|
466 |
+
}
|
467 |
+
}
|
468 |
+
if (!is_callable('\\Sodium\\crypto_pwhash_scryptsalsa208sha256_str')) {
|
469 |
+
/**
|
470 |
+
* @see ParagonIE_Sodium_Compat::crypto_pwhash_scryptsalsa208sha256_str()
|
471 |
+
* @param string $passwd
|
472 |
+
* @param int $opslimit
|
473 |
+
* @param int $memlimit
|
474 |
+
* @return string
|
475 |
+
* @throws \SodiumException
|
476 |
+
* @throws \TypeError
|
477 |
+
*/
|
478 |
+
function crypto_pwhash_scryptsalsa208sha256_str($passwd, $opslimit, $memlimit)
|
479 |
+
{
|
480 |
+
return ParagonIE_Sodium_Compat::crypto_pwhash_scryptsalsa208sha256_str($passwd, $opslimit, $memlimit);
|
481 |
+
}
|
482 |
+
}
|
483 |
+
if (!is_callable('\\Sodium\\crypto_pwhash_scryptsalsa208sha256_str_verify')) {
|
484 |
+
/**
|
485 |
+
* @see ParagonIE_Sodium_Compat::crypto_pwhash_scryptsalsa208sha256_str_verify()
|
486 |
+
* @param string $passwd
|
487 |
+
* @param string $hash
|
488 |
+
* @return bool
|
489 |
+
* @throws \SodiumException
|
490 |
+
* @throws \TypeError
|
491 |
+
*/
|
492 |
+
function crypto_pwhash_scryptsalsa208sha256_str_verify($passwd, $hash)
|
493 |
+
{
|
494 |
+
return ParagonIE_Sodium_Compat::crypto_pwhash_scryptsalsa208sha256_str_verify($passwd, $hash);
|
495 |
+
}
|
496 |
+
}
|
497 |
+
if (!is_callable('\\Sodium\\crypto_scalarmult')) {
|
498 |
+
/**
|
499 |
+
* @see ParagonIE_Sodium_Compat::crypto_scalarmult()
|
500 |
+
* @param string $n
|
501 |
+
* @param string $p
|
502 |
+
* @return string
|
503 |
+
* @throws \SodiumException
|
504 |
+
* @throws \TypeError
|
505 |
+
*/
|
506 |
+
function crypto_scalarmult($n, $p)
|
507 |
+
{
|
508 |
+
return ParagonIE_Sodium_Compat::crypto_scalarmult($n, $p);
|
509 |
+
}
|
510 |
+
}
|
511 |
+
if (!is_callable('\\Sodium\\crypto_scalarmult_base')) {
|
512 |
+
/**
|
513 |
+
* @see ParagonIE_Sodium_Compat::crypto_scalarmult_base()
|
514 |
+
* @param string $n
|
515 |
+
* @return string
|
516 |
+
* @throws \SodiumException
|
517 |
+
* @throws \TypeError
|
518 |
+
*/
|
519 |
+
function crypto_scalarmult_base($n)
|
520 |
+
{
|
521 |
+
return ParagonIE_Sodium_Compat::crypto_scalarmult_base($n);
|
522 |
+
}
|
523 |
+
}
|
524 |
+
if (!is_callable('\\Sodium\\crypto_secretbox')) {
|
525 |
+
/**
|
526 |
+
* @see ParagonIE_Sodium_Compat::crypto_secretbox()
|
527 |
+
* @param string $message
|
528 |
+
* @param string $nonce
|
529 |
+
* @param string $key
|
530 |
+
* @return string
|
531 |
+
* @throws \SodiumException
|
532 |
+
* @throws \TypeError
|
533 |
+
*/
|
534 |
+
function crypto_secretbox($message, $nonce, $key)
|
535 |
+
{
|
536 |
+
return ParagonIE_Sodium_Compat::crypto_secretbox($message, $nonce, $key);
|
537 |
+
}
|
538 |
+
}
|
539 |
+
if (!is_callable('\\Sodium\\crypto_secretbox_open')) {
|
540 |
+
/**
|
541 |
+
* @see ParagonIE_Sodium_Compat::crypto_secretbox_open()
|
542 |
+
* @param string $message
|
543 |
+
* @param string $nonce
|
544 |
+
* @param string $key
|
545 |
+
* @return string|bool
|
546 |
+
* @throws \SodiumException
|
547 |
+
* @throws \TypeError
|
548 |
+
*/
|
549 |
+
function crypto_secretbox_open($message, $nonce, $key)
|
550 |
+
{
|
551 |
+
try {
|
552 |
+
return ParagonIE_Sodium_Compat::crypto_secretbox_open($message, $nonce, $key);
|
553 |
+
} catch (Error $ex) {
|
554 |
+
return false;
|
555 |
+
} catch (Exception $ex) {
|
556 |
+
return false;
|
557 |
+
}
|
558 |
+
}
|
559 |
+
}
|
560 |
+
if (!is_callable('\\Sodium\\crypto_shorthash')) {
|
561 |
+
/**
|
562 |
+
* @see ParagonIE_Sodium_Compat::crypto_shorthash()
|
563 |
+
* @param string $message
|
564 |
+
* @param string $key
|
565 |
+
* @return string
|
566 |
+
* @throws \SodiumException
|
567 |
+
* @throws \TypeError
|
568 |
+
*/
|
569 |
+
function crypto_shorthash($message, $key = '')
|
570 |
+
{
|
571 |
+
return ParagonIE_Sodium_Compat::crypto_shorthash($message, $key);
|
572 |
+
}
|
573 |
+
}
|
574 |
+
if (!is_callable('\\Sodium\\crypto_sign')) {
|
575 |
+
/**
|
576 |
+
* @see ParagonIE_Sodium_Compat::crypto_sign()
|
577 |
+
* @param string $message
|
578 |
+
* @param string $sk
|
579 |
+
* @return string
|
580 |
+
* @throws \SodiumException
|
581 |
+
* @throws \TypeError
|
582 |
+
*/
|
583 |
+
function crypto_sign($message, $sk)
|
584 |
+
{
|
585 |
+
return ParagonIE_Sodium_Compat::crypto_sign($message, $sk);
|
586 |
+
}
|
587 |
+
}
|
588 |
+
if (!is_callable('\\Sodium\\crypto_sign_detached')) {
|
589 |
+
/**
|
590 |
+
* @see ParagonIE_Sodium_Compat::crypto_sign_detached()
|
591 |
+
* @param string $message
|
592 |
+
* @param string $sk
|
593 |
+
* @return string
|
594 |
+
* @throws \SodiumException
|
595 |
+
* @throws \TypeError
|
596 |
+
*/
|
597 |
+
function crypto_sign_detached($message, $sk)
|
598 |
+
{
|
599 |
+
return ParagonIE_Sodium_Compat::crypto_sign_detached($message, $sk);
|
600 |
+
}
|
601 |
+
}
|
602 |
+
if (!is_callable('\\Sodium\\crypto_sign_keypair')) {
|
603 |
+
/**
|
604 |
+
* @see ParagonIE_Sodium_Compat::crypto_sign_keypair()
|
605 |
+
* @return string
|
606 |
+
* @throws \SodiumException
|
607 |
+
* @throws \TypeError
|
608 |
+
*/
|
609 |
+
function crypto_sign_keypair()
|
610 |
+
{
|
611 |
+
return ParagonIE_Sodium_Compat::crypto_sign_keypair();
|
612 |
+
}
|
613 |
+
}
|
614 |
+
if (!is_callable('\\Sodium\\crypto_sign_open')) {
|
615 |
+
/**
|
616 |
+
* @see ParagonIE_Sodium_Compat::crypto_sign_open()
|
617 |
+
* @param string $signedMessage
|
618 |
+
* @param string $pk
|
619 |
+
* @return string|bool
|
620 |
+
*/
|
621 |
+
function crypto_sign_open($signedMessage, $pk)
|
622 |
+
{
|
623 |
+
try {
|
624 |
+
return ParagonIE_Sodium_Compat::crypto_sign_open($signedMessage, $pk);
|
625 |
+
} catch (\Error $ex) {
|
626 |
+
return false;
|
627 |
+
} catch (\Exception $ex) {
|
628 |
+
return false;
|
629 |
+
}
|
630 |
+
}
|
631 |
+
}
|
632 |
+
if (!is_callable('\\Sodium\\crypto_sign_publickey')) {
|
633 |
+
/**
|
634 |
+
* @see ParagonIE_Sodium_Compat::crypto_sign_publickey()
|
635 |
+
* @param string $keypair
|
636 |
+
* @return string
|
637 |
+
* @throws \SodiumException
|
638 |
+
* @throws \TypeError
|
639 |
+
*/
|
640 |
+
function crypto_sign_publickey($keypair)
|
641 |
+
{
|
642 |
+
return ParagonIE_Sodium_Compat::crypto_sign_publickey($keypair);
|
643 |
+
}
|
644 |
+
}
|
645 |
+
if (!is_callable('\\Sodium\\crypto_sign_publickey_from_secretkey')) {
|
646 |
+
/**
|
647 |
+
* @see ParagonIE_Sodium_Compat::crypto_sign_publickey_from_secretkey()
|
648 |
+
* @param string $sk
|
649 |
+
* @return string
|
650 |
+
* @throws \SodiumException
|
651 |
+
* @throws \TypeError
|
652 |
+
*/
|
653 |
+
function crypto_sign_publickey_from_secretkey($sk)
|
654 |
+
{
|
655 |
+
return ParagonIE_Sodium_Compat::crypto_sign_publickey_from_secretkey($sk);
|
656 |
+
}
|
657 |
+
}
|
658 |
+
if (!is_callable('\\Sodium\\crypto_sign_secretkey')) {
|
659 |
+
/**
|
660 |
+
* @see ParagonIE_Sodium_Compat::crypto_sign_secretkey()
|
661 |
+
* @param string $keypair
|
662 |
+
* @return string
|
663 |
+
* @throws \SodiumException
|
664 |
+
* @throws \TypeError
|
665 |
+
*/
|
666 |
+
function crypto_sign_secretkey($keypair)
|
667 |
+
{
|
668 |
+
return ParagonIE_Sodium_Compat::crypto_sign_secretkey($keypair);
|
669 |
+
}
|
670 |
+
}
|
671 |
+
if (!is_callable('\\Sodium\\crypto_sign_seed_keypair')) {
|
672 |
+
/**
|
673 |
+
* @see ParagonIE_Sodium_Compat::crypto_sign_seed_keypair()
|
674 |
+
* @param string $seed
|
675 |
+
* @return string
|
676 |
+
* @throws \SodiumException
|
677 |
+
* @throws \TypeError
|
678 |
+
*/
|
679 |
+
function crypto_sign_seed_keypair($seed)
|
680 |
+
{
|
681 |
+
return ParagonIE_Sodium_Compat::crypto_sign_seed_keypair($seed);
|
682 |
+
}
|
683 |
+
}
|
684 |
+
if (!is_callable('\\Sodium\\crypto_sign_verify_detached')) {
|
685 |
+
/**
|
686 |
+
* @see ParagonIE_Sodium_Compat::crypto_sign_verify_detached()
|
687 |
+
* @param string $signature
|
688 |
+
* @param string $message
|
689 |
+
* @param string $pk
|
690 |
+
* @return bool
|
691 |
+
* @throws \SodiumException
|
692 |
+
* @throws \TypeError
|
693 |
+
*/
|
694 |
+
function crypto_sign_verify_detached($signature, $message, $pk)
|
695 |
+
{
|
696 |
+
return ParagonIE_Sodium_Compat::crypto_sign_verify_detached($signature, $message, $pk);
|
697 |
+
}
|
698 |
+
}
|
699 |
+
if (!is_callable('\\Sodium\\crypto_sign_ed25519_pk_to_curve25519')) {
|
700 |
+
/**
|
701 |
+
* @see ParagonIE_Sodium_Compat::crypto_sign_ed25519_pk_to_curve25519()
|
702 |
+
* @param string $pk
|
703 |
+
* @return string
|
704 |
+
* @throws \SodiumException
|
705 |
+
* @throws \TypeError
|
706 |
+
*/
|
707 |
+
function crypto_sign_ed25519_pk_to_curve25519($pk)
|
708 |
+
{
|
709 |
+
return ParagonIE_Sodium_Compat::crypto_sign_ed25519_pk_to_curve25519($pk);
|
710 |
+
}
|
711 |
+
}
|
712 |
+
if (!is_callable('\\Sodium\\crypto_sign_ed25519_sk_to_curve25519')) {
|
713 |
+
/**
|
714 |
+
* @see ParagonIE_Sodium_Compat::crypto_sign_ed25519_sk_to_curve25519()
|
715 |
+
* @param string $sk
|
716 |
+
* @return string
|
717 |
+
* @throws \SodiumException
|
718 |
+
* @throws \TypeError
|
719 |
+
*/
|
720 |
+
function crypto_sign_ed25519_sk_to_curve25519($sk)
|
721 |
+
{
|
722 |
+
return ParagonIE_Sodium_Compat::crypto_sign_ed25519_sk_to_curve25519($sk);
|
723 |
+
}
|
724 |
+
}
|
725 |
+
if (!is_callable('\\Sodium\\crypto_stream')) {
|
726 |
+
/**
|
727 |
+
* @see ParagonIE_Sodium_Compat::crypto_stream()
|
728 |
+
* @param int $len
|
729 |
+
* @param string $nonce
|
730 |
+
* @param string $key
|
731 |
+
* @return string
|
732 |
+
* @throws \SodiumException
|
733 |
+
* @throws \TypeError
|
734 |
+
*/
|
735 |
+
function crypto_stream($len, $nonce, $key)
|
736 |
+
{
|
737 |
+
return ParagonIE_Sodium_Compat::crypto_stream($len, $nonce, $key);
|
738 |
+
}
|
739 |
+
}
|
740 |
+
if (!is_callable('\\Sodium\\crypto_stream_xor')) {
|
741 |
+
/**
|
742 |
+
* @see ParagonIE_Sodium_Compat::crypto_stream_xor()
|
743 |
+
* @param string $message
|
744 |
+
* @param string $nonce
|
745 |
+
* @param string $key
|
746 |
+
* @return string
|
747 |
+
* @throws \SodiumException
|
748 |
+
* @throws \TypeError
|
749 |
+
*/
|
750 |
+
function crypto_stream_xor($message, $nonce, $key)
|
751 |
+
{
|
752 |
+
return ParagonIE_Sodium_Compat::crypto_stream_xor($message, $nonce, $key);
|
753 |
+
}
|
754 |
+
}
|
755 |
+
if (!is_callable('\\Sodium\\hex2bin')) {
|
756 |
+
/**
|
757 |
+
* @see ParagonIE_Sodium_Compat::hex2bin()
|
758 |
+
* @param string $string
|
759 |
+
* @return string
|
760 |
+
* @throws \SodiumException
|
761 |
+
* @throws \TypeError
|
762 |
+
*/
|
763 |
+
function hex2bin($string)
|
764 |
+
{
|
765 |
+
return ParagonIE_Sodium_Compat::hex2bin($string);
|
766 |
+
}
|
767 |
+
}
|
768 |
+
if (!is_callable('\\Sodium\\memcmp')) {
|
769 |
+
/**
|
770 |
+
* @see ParagonIE_Sodium_Compat::memcmp()
|
771 |
+
* @param string $a
|
772 |
+
* @param string $b
|
773 |
+
* @return int
|
774 |
+
* @throws \SodiumException
|
775 |
+
* @throws \TypeError
|
776 |
+
*/
|
777 |
+
function memcmp($a, $b)
|
778 |
+
{
|
779 |
+
return ParagonIE_Sodium_Compat::memcmp($a, $b);
|
780 |
+
}
|
781 |
+
}
|
782 |
+
if (!is_callable('\\Sodium\\memzero')) {
|
783 |
+
/**
|
784 |
+
* @see ParagonIE_Sodium_Compat::memzero()
|
785 |
+
* @param string $str
|
786 |
+
* @return void
|
787 |
+
* @throws \SodiumException
|
788 |
+
* @throws \TypeError
|
789 |
+
*/
|
790 |
+
function memzero(&$str)
|
791 |
+
{
|
792 |
+
ParagonIE_Sodium_Compat::memzero($str);
|
793 |
+
}
|
794 |
+
}
|
795 |
+
if (!is_callable('\\Sodium\\randombytes_buf')) {
|
796 |
+
/**
|
797 |
+
* @see ParagonIE_Sodium_Compat::randombytes_buf()
|
798 |
+
* @param int $amount
|
799 |
+
* @return string
|
800 |
+
* @throws \TypeError
|
801 |
+
*/
|
802 |
+
function randombytes_buf($amount)
|
803 |
+
{
|
804 |
+
return ParagonIE_Sodium_Compat::randombytes_buf($amount);
|
805 |
+
}
|
806 |
+
}
|
807 |
+
|
808 |
+
if (!is_callable('\\Sodium\\randombytes_uniform')) {
|
809 |
+
/**
|
810 |
+
* @see ParagonIE_Sodium_Compat::randombytes_uniform()
|
811 |
+
* @param int $upperLimit
|
812 |
+
* @return int
|
813 |
+
* @throws \Exception
|
814 |
+
* @throws \Error
|
815 |
+
*/
|
816 |
+
function randombytes_uniform($upperLimit)
|
817 |
+
{
|
818 |
+
return ParagonIE_Sodium_Compat::randombytes_uniform($upperLimit);
|
819 |
+
}
|
820 |
+
}
|
821 |
+
|
822 |
+
if (!is_callable('\\Sodium\\randombytes_random16')) {
|
823 |
+
/**
|
824 |
+
* @see ParagonIE_Sodium_Compat::randombytes_random16()
|
825 |
+
* @return int
|
826 |
+
*/
|
827 |
+
function randombytes_random16()
|
828 |
+
{
|
829 |
+
return ParagonIE_Sodium_Compat::randombytes_random16();
|
830 |
+
}
|
831 |
+
}
|
832 |
+
|
833 |
+
if (!defined('\\Sodium\\CRYPTO_AUTH_BYTES')) {
|
834 |
+
require_once dirname(__FILE__) . '/constants.php';
|
835 |
+
}
|
vendor/paragonie/sodium_compat/namespaced/Compat.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace ParagonIE\Sodium;
|
3 |
+
|
4 |
+
class Compat extends \ParagonIE_Sodium_Compat
|
5 |
+
{
|
6 |
+
|
7 |
+
}
|
vendor/paragonie/sodium_compat/namespaced/Core/BLAKE2b.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace ParagonIE\Sodium\Core;
|
3 |
+
|
4 |
+
class BLAKE2b extends \ParagonIE_Sodium_Core_BLAKE2b
|
5 |
+
{
|
6 |
+
|
7 |
+
}
|
vendor/paragonie/sodium_compat/namespaced/Core/ChaCha20.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace ParagonIE\Sodium\Core;
|
3 |
+
|
4 |
+
class ChaCha20 extends \ParagonIE_Sodium_Core_ChaCha20
|
5 |
+
{
|
6 |
+
|
7 |
+
}
|
vendor/paragonie/sodium_compat/namespaced/Core/ChaCha20/Ctx.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace ParagonIE\Sodium\Core\ChaCha20;
|
3 |
+
|
4 |
+
class Ctx extends \ParagonIE_Sodium_Core_ChaCha20_Ctx
|
5 |
+
{
|
6 |
+
|
7 |
+
}
|
vendor/paragonie/sodium_compat/namespaced/Core/ChaCha20/IetfCtx.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace ParagonIE\Sodium\Core\ChaCha20;
|
3 |
+
|
4 |
+
class IetfCtx extends \ParagonIE_Sodium_Core_ChaCha20_IetfCtx
|
5 |
+
{
|
6 |
+
|
7 |
+
}
|
vendor/paragonie/sodium_compat/namespaced/Core/Curve25519.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace ParagonIE\Sodium\Core;
|
3 |
+
|
4 |
+
class Curve25519 extends \ParagonIE_Sodium_Core_Curve25519
|
5 |
+
{
|
6 |
+
|
7 |
+
}
|
vendor/paragonie/sodium_compat/namespaced/Core/Curve25519/Fe.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace ParagonIE\Sodium\Core\Curve25519;
|
3 |
+
|
4 |
+
class Fe extends \ParagonIE_Sodium_Core_Curve25519_Fe
|
5 |
+
{
|
6 |
+
|
7 |
+
}
|
vendor/paragonie/sodium_compat/namespaced/Core/Curve25519/Ge/Cached.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace ParagonIE\Sodium\Core\Curve25519\Ge;
|
3 |
+
|
4 |
+
class Cached extends \ParagonIE_Sodium_Core_Curve25519_Ge_Cached
|
5 |
+
{
|
6 |
+
|
7 |
+
}
|
vendor/paragonie/sodium_compat/namespaced/Core/Curve25519/Ge/P1p1.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace ParagonIE\Sodium\Core\Curve25519\Ge;
|
3 |
+
|
4 |
+
class P1p1 extends \ParagonIE_Sodium_Core_Curve25519_Ge_P1p1
|
5 |
+
{
|
6 |
+
|
7 |
+
}
|
vendor/paragonie/sodium_compat/namespaced/Core/Curve25519/Ge/P2.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace ParagonIE\Sodium\Core\Curve25519\Ge;
|
3 |
+
|
4 |
+
class P2 extends \ParagonIE_Sodium_Core_Curve25519_Ge_P2
|
5 |
+
{
|
6 |
+
|
7 |
+
}
|
vendor/paragonie/sodium_compat/namespaced/Core/Curve25519/Ge/P3.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace ParagonIE\Sodium\Core\Curve25519\Ge;
|
3 |
+
|
4 |
+
class P3 extends \ParagonIE_Sodium_Core_Curve25519_Ge_P3
|
5 |
+
{
|
6 |
+
|
7 |
+
}
|
vendor/paragonie/sodium_compat/namespaced/Core/Curve25519/Ge/Precomp.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace ParagonIE\Sodium\Core\Curve25519\Ge;
|
3 |
+
|
4 |
+
class Precomp extends \ParagonIE_Sodium_Core_Curve25519_Ge_Precomp
|
5 |
+
{
|
6 |
+
|
7 |
+
}
|
vendor/paragonie/sodium_compat/namespaced/Core/Curve25519/H.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace ParagonIE\Sodium\Core\Curve25519;
|
3 |
+
|
4 |
+
class H extends \ParagonIE_Sodium_Core_Curve25519_H
|
5 |
+
{
|
6 |
+
|
7 |
+
}
|
vendor/paragonie/sodium_compat/namespaced/Core/Ed25519.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace ParagonIE\Sodium\Core;
|
3 |
+
|
4 |
+
class Ed25519 extends \ParagonIE_Sodium_Core_Ed25519
|
5 |
+
{
|
6 |
+
|
7 |
+
}
|
vendor/paragonie/sodium_compat/namespaced/Core/HChaCha20.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace ParagonIE\Sodium\Core;
|
3 |
+
|
4 |
+
class HChaCha20 extends \ParagonIE_Sodium_Core_HChaCha20
|
5 |
+
{
|
6 |
+
|
7 |
+
}
|
vendor/paragonie/sodium_compat/namespaced/Core/HSalsa20.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace ParagonIE\Sodium\Core;
|
3 |
+
|
4 |
+
class HSalsa20 extends \ParagonIE_Sodium_Core_HSalsa20
|
5 |
+
{
|
6 |
+
|
7 |
+
}
|
vendor/paragonie/sodium_compat/namespaced/Core/Poly1305.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace ParagonIE\Sodium\Core;
|
3 |
+
|
4 |
+
class Poly1305 extends \ParagonIE_Sodium_Core_Poly1305
|
5 |
+
{
|
6 |
+
|
7 |
+
}
|
vendor/paragonie/sodium_compat/namespaced/Core/Poly1305/State.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace ParagonIE\Sodium\Core\Poly1305;
|
3 |
+
|
4 |
+
class State extends \ParagonIE_Sodium_Core_Poly1305_State
|
5 |
+
{
|
6 |
+
|
7 |
+
}
|
vendor/paragonie/sodium_compat/namespaced/Core/Salsa20.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace ParagonIE\Sodium\Core;
|
3 |
+
|
4 |
+
class SipHash extends \ParagonIE_Sodium_Core_Salsa20
|
5 |
+
{
|
6 |
+
|
7 |
+
}
|
vendor/paragonie/sodium_compat/namespaced/Core/SipHash.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace ParagonIE\Sodium\Core;
|
3 |
+
|
4 |
+
class SipHash extends \ParagonIE_Sodium_Core_SipHash
|
5 |
+
{
|
6 |
+
|
7 |
+
}
|
vendor/paragonie/sodium_compat/namespaced/Core/Util.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace ParagonIE\Sodium\Core;
|
3 |
+
|
4 |
+
class Util extends \ParagonIE_Sodium_Core_Util
|
5 |
+
{
|
6 |
+
|
7 |
+
}
|
vendor/paragonie/sodium_compat/namespaced/Core/X25519.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace ParagonIE\Sodium\Core;
|
3 |
+
|
4 |
+
class X25519 extends \ParagonIE_Sodium_Core_X25519
|
5 |
+
{
|
6 |
+
|
7 |
+
}
|
vendor/paragonie/sodium_compat/namespaced/Core/XChaCha20.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace ParagonIE\Sodium\Core;
|
3 |
+
|
4 |
+
class XChaCha20 extends \ParagonIE_Sodium_Core_XChaCha20
|
5 |
+
{
|
6 |
+
|
7 |
+
}
|
vendor/paragonie/sodium_compat/namespaced/Core/Xsalsa20.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace ParagonIE\Sodium\Core;
|
3 |
+
|
4 |
+
class Xsalsa20 extends \ParagonIE_Sodium_Core_Xsalsa20
|
5 |
+
{
|
6 |
+
|
7 |
+
}
|
vendor/paragonie/sodium_compat/namespaced/Crypto.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace ParagonIE\Sodium;
|
3 |
+
|
4 |
+
class Crypto extends \ParagonIE_Sodium_Crypto
|
5 |
+
{
|
6 |
+
|
7 |
+
}
|
vendor/paragonie/sodium_compat/namespaced/File.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace ParagonIE\Sodium;
|
3 |
+
|
4 |
+
class File extends \ParagonIE_Sodium_File
|
5 |
+
{
|
6 |
+
|
7 |
+
}
|
vendor/paragonie/sodium_compat/src/Compat.php
ADDED
@@ -0,0 +1,2705 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Libsodium compatibility layer
|
5 |
+
*
|
6 |
+
* This is the only class you should be interfacing with, as a user of
|
7 |
+
* sodium_compat.
|
8 |
+
*
|
9 |
+
* If the PHP extension for libsodium is installed, it will always use that
|
10 |
+
* instead of our implementations. You get better performance and stronger
|
11 |
+
* guarantees against side-channels that way.
|
12 |
+
*
|
13 |
+
* However, if your users don't have the PHP extension installed, we offer a
|
14 |
+
* compatible interface here. It will give you the correct results as if the
|
15 |
+
* PHP extension was installed. It won't be as fast, of course.
|
16 |
+
*
|
17 |
+
* CAUTION * CAUTION * CAUTION * CAUTION * CAUTION * CAUTION * CAUTION * CAUTION *
|
18 |
+
* *
|
19 |
+
* Until audited, this is probably not safe to use! DANGER WILL ROBINSON *
|
20 |
+
* *
|
21 |
+
* CAUTION * CAUTION * CAUTION * CAUTION * CAUTION * CAUTION * CAUTION * CAUTION *
|
22 |
+
*/
|
23 |
+
|
24 |
+
if (class_exists('ParagonIE_Sodium_Compat', false)) {
|
25 |
+
return;
|
26 |
+
}
|
27 |
+
|
28 |
+
class ParagonIE_Sodium_Compat
|
29 |
+
{
|
30 |
+
/**
|
31 |
+
* This parameter prevents the use of the PECL extension.
|
32 |
+
* It should only be used for unit testing.
|
33 |
+
*
|
34 |
+
* @var bool
|
35 |
+
*/
|
36 |
+
public static $disableFallbackForUnitTests = false;
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Use fast multiplication rather than our constant-time multiplication
|
40 |
+
* implementation. Can be enabled at runtime. Only enable this if you
|
41 |
+
* are absolutely certain that there is no timing leak on your platform.
|
42 |
+
*
|
43 |
+
* @var bool
|
44 |
+
*/
|
45 |
+
public static $fastMult = false;
|
46 |
+
|
47 |
+
const LIBRARY_VERSION_MAJOR = 9;
|
48 |
+
const LIBRARY_VERSION_MINOR = 1;
|
49 |
+
const VERSION_STRING = 'polyfill-1.0.8';
|
50 |
+
|
51 |
+
// From libsodium
|
52 |
+
const CRYPTO_AEAD_AES256GCM_KEYBYTES = 32;
|
53 |
+
const CRYPTO_AEAD_AES256GCM_NSECBYTES = 0;
|
54 |
+
const CRYPTO_AEAD_AES256GCM_NPUBBYTES = 12;
|
55 |
+
const CRYPTO_AEAD_AES256GCM_ABYTES = 16;
|
56 |
+
const CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES = 32;
|
57 |
+
const CRYPTO_AEAD_CHACHA20POLY1305_NSECBYTES = 0;
|
58 |
+
const CRYPTO_AEAD_CHACHA20POLY1305_NPUBBYTES = 8;
|
59 |
+
const CRYPTO_AEAD_CHACHA20POLY1305_ABYTES = 16;
|
60 |
+
const CRYPTO_AEAD_CHACHA20POLY1305_IETF_KEYBYTES = 32;
|
61 |
+
const CRYPTO_AEAD_CHACHA20POLY1305_IETF_NSECBYTES = 0;
|
62 |
+
const CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES = 12;
|
63 |
+
const CRYPTO_AEAD_CHACHA20POLY1305_IETF_ABYTES = 16;
|
64 |
+
const CRYPTO_AEAD_XCHACHA20POLY1305_IETF_KEYBYTES = 32;
|
65 |
+
const CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NSECBYTES = 0;
|
66 |
+
const CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NPUBBYTES = 24;
|
67 |
+
const CRYPTO_AEAD_XCHACHA20POLY1305_IETF_ABYTES = 16;
|
68 |
+
const CRYPTO_AUTH_BYTES = 32;
|
69 |
+
const CRYPTO_AUTH_KEYBYTES = 32;
|
70 |
+
const CRYPTO_BOX_SEALBYTES = 16;
|
71 |
+
const CRYPTO_BOX_SECRETKEYBYTES = 32;
|
72 |
+
const CRYPTO_BOX_PUBLICKEYBYTES = 32;
|
73 |
+
const CRYPTO_BOX_KEYPAIRBYTES = 64;
|
74 |
+
const CRYPTO_BOX_MACBYTES = 16;
|
75 |
+
const CRYPTO_BOX_NONCEBYTES = 24;
|
76 |
+
const CRYPTO_BOX_SEEDBYTES = 32;
|
77 |
+
const CRYPTO_KX_BYTES = 32;
|
78 |
+
const CRYPTO_KX_SEEDBYTES = 32;
|
79 |
+
const CRYPTO_KX_PUBLICKEYBYTES = 32;
|
80 |
+
const CRYPTO_KX_SECRETKEYBYTES = 32;
|
81 |
+
const CRYPTO_GENERICHASH_BYTES = 32;
|
82 |
+
const CRYPTO_GENERICHASH_BYTES_MIN = 16;
|
83 |
+
const CRYPTO_GENERICHASH_BYTES_MAX = 64;
|
84 |
+
const CRYPTO_GENERICHASH_KEYBYTES = 32;
|
85 |
+
const CRYPTO_GENERICHASH_KEYBYTES_MIN = 16;
|
86 |
+
const CRYPTO_GENERICHASH_KEYBYTES_MAX = 64;
|
87 |
+
const CRYPTO_PWHASH_SALTBYTES = 16;
|
88 |
+
const CRYPTO_PWHASH_STRPREFIX = '$argon2i$';
|
89 |
+
const CRYPTO_PWHASH_ALG_ARGON2I13 = 1;
|
90 |
+
const CRYPTO_PWHASH_ALG_ARGON2ID13 = 2;
|
91 |
+
const CRYPTO_PWHASH_MEMLIMIT_INTERACTIVE = 33554432;
|
92 |
+
const CRYPTO_PWHASH_OPSLIMIT_INTERACTIVE = 4;
|
93 |
+
const CRYPTO_PWHASH_MEMLIMIT_MODERATE = 134217728;
|
94 |
+
const CRYPTO_PWHASH_OPSLIMIT_MODERATE = 6;
|
95 |
+
const CRYPTO_PWHASH_MEMLIMIT_SENSITIVE = 536870912;
|
96 |
+
const CRYPTO_PWHASH_OPSLIMIT_SENSITIVE = 8;
|
97 |
+
const CRYPTO_PWHASH_SCRYPTSALSA208SHA256_SALTBYTES = 32;
|
98 |
+
const CRYPTO_PWHASH_SCRYPTSALSA208SHA256_STRPREFIX = '$7$';
|
99 |
+
const CRYPTO_PWHASH_SCRYPTSALSA208SHA256_OPSLIMIT_INTERACTIVE = 534288;
|
100 |
+
const CRYPTO_PWHASH_SCRYPTSALSA208SHA256_MEMLIMIT_INTERACTIVE = 16777216;
|
101 |
+
const CRYPTO_PWHASH_SCRYPTSALSA208SHA256_OPSLIMIT_SENSITIVE = 33554432;
|
102 |
+
const CRYPTO_PWHASH_SCRYPTSALSA208SHA256_MEMLIMIT_SENSITIVE = 1073741824;
|
103 |
+
const CRYPTO_SCALARMULT_BYTES = 32;
|
104 |
+
const CRYPTO_SCALARMULT_SCALARBYTES = 32;
|
105 |
+
const CRYPTO_SHORTHASH_BYTES = 8;
|
106 |
+
const CRYPTO_SHORTHASH_KEYBYTES = 16;
|
107 |
+
const CRYPTO_SECRETBOX_KEYBYTES = 32;
|
108 |
+
const CRYPTO_SECRETBOX_MACBYTES = 16;
|
109 |
+
const CRYPTO_SECRETBOX_NONCEBYTES = 24;
|
110 |
+
const CRYPTO_SIGN_BYTES = 64;
|
111 |
+
const CRYPTO_SIGN_SEEDBYTES = 32;
|
112 |
+
const CRYPTO_SIGN_PUBLICKEYBYTES = 32;
|
113 |
+
const CRYPTO_SIGN_SECRETKEYBYTES = 64;
|
114 |
+
const CRYPTO_SIGN_KEYPAIRBYTES = 96;
|
115 |
+
const CRYPTO_STREAM_KEYBYTES = 32;
|
116 |
+
const CRYPTO_STREAM_NONCEBYTES = 24;
|
117 |
+
|
118 |
+
/**
|
119 |
+
* Cache-timing-safe implementation of bin2hex().
|
120 |
+
*
|
121 |
+
* @param string $string A string (probably raw binary)
|
122 |
+
* @return string A hexadecimal-encoded string
|
123 |
+
* @throws SodiumException
|
124 |
+
* @throws TypeError
|
125 |
+
* @psalm-suppress MixedArgument
|
126 |
+
*/
|
127 |
+
public static function bin2hex($string)
|
128 |
+
{
|
129 |
+
/* Type checks: */
|
130 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($string, 'string', 1);
|
131 |
+
|
132 |
+
if (self::isPhp72OrGreater()) {
|
133 |
+
return (string) sodium_bin2hex($string);
|
134 |
+
}
|
135 |
+
if (self::use_fallback('bin2hex')) {
|
136 |
+
return (string) call_user_func('\\Sodium\\bin2hex', $string);
|
137 |
+
}
|
138 |
+
return ParagonIE_Sodium_Core_Util::bin2hex($string);
|
139 |
+
}
|
140 |
+
|
141 |
+
/**
|
142 |
+
* Compare two strings, in constant-time.
|
143 |
+
* Compared to memcmp(), compare() is more useful for sorting.
|
144 |
+
*
|
145 |
+
* @param string $left The left operand; must be a string
|
146 |
+
* @param string $right The right operand; must be a string
|
147 |
+
* @return int < 0 if the left operand is less than the right
|
148 |
+
* = 0 if both strings are equal
|
149 |
+
* > 0 if the right operand is less than the left
|
150 |
+
* @throws SodiumException
|
151 |
+
* @throws TypeError
|
152 |
+
* @psalm-suppress MixedArgument
|
153 |
+
*/
|
154 |
+
public static function compare($left, $right)
|
155 |
+
{
|
156 |
+
/* Type checks: */
|
157 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($left, 'string', 1);
|
158 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($right, 'string', 2);
|
159 |
+
|
160 |
+
if (self::isPhp72OrGreater()) {
|
161 |
+
return (int) sodium_compare($left, $right);
|
162 |
+
}
|
163 |
+
if (self::use_fallback('compare')) {
|
164 |
+
return (int) call_user_func('\\Sodium\\compare', $left, $right);
|
165 |
+
}
|
166 |
+
return ParagonIE_Sodium_Core_Util::compare($left, $right);
|
167 |
+
}
|
168 |
+
|
169 |
+
/**
|
170 |
+
* Is AES-256-GCM even available to use?
|
171 |
+
*
|
172 |
+
* @return bool
|
173 |
+
* @psalm-suppress UndefinedFunction
|
174 |
+
* @psalm-suppress MixedInferredReturnType
|
175 |
+
* @psalm-suppress MixedReturnStatement
|
176 |
+
*/
|
177 |
+
public static function crypto_aead_aes256gcm_is_available()
|
178 |
+
{
|
179 |
+
if (self::isPhp72OrGreater()) {
|
180 |
+
return sodium_crypto_aead_aes256gcm_is_available();
|
181 |
+
}
|
182 |
+
if (self::use_fallback('crypto_aead_aes256gcm_is_available')) {
|
183 |
+
return call_user_func('\\Sodium\\crypto_aead_aes256gcm_is_available');
|
184 |
+
}
|
185 |
+
if (PHP_VERSION_ID < 70100) {
|
186 |
+
// OpenSSL doesn't support AEAD before 7.1.0
|
187 |
+
return false;
|
188 |
+
}
|
189 |
+
if (!is_callable('openssl_encrypt') || !is_callable('openssl_decrypt')) {
|
190 |
+
// OpenSSL isn't installed
|
191 |
+
return false;
|
192 |
+
}
|
193 |
+
return (bool) in_array('aes-256-gcm', openssl_get_cipher_methods());
|
194 |
+
}
|
195 |
+
|
196 |
+
/**
|
197 |
+
* Authenticated Encryption with Associated Data: Decryption
|
198 |
+
*
|
199 |
+
* Algorithm:
|
200 |
+
* AES-256-GCM
|
201 |
+
*
|
202 |
+
* This mode uses a 64-bit random nonce with a 64-bit counter.
|
203 |
+
* IETF mode uses a 96-bit random nonce with a 32-bit counter.
|
204 |
+
*
|
205 |
+
* @param string $ciphertext Encrypted message (with Poly1305 MAC appended)
|
206 |
+
* @param string $assocData Authenticated Associated Data (unencrypted)
|
207 |
+
* @param string $nonce Number to be used only Once; must be 8 bytes
|
208 |
+
* @param string $key Encryption key
|
209 |
+
*
|
210 |
+
* @return string|bool The original plaintext message
|
211 |
+
* @throws SodiumException
|
212 |
+
* @throws TypeError
|
213 |
+
* @psalm-suppress MixedArgument
|
214 |
+
* @psalm-suppress MixedInferredReturnType
|
215 |
+
* @psalm-suppress MixedReturnStatement
|
216 |
+
*/
|
217 |
+
public static function crypto_aead_aes256gcm_decrypt(
|
218 |
+
$ciphertext = '',
|
219 |
+
$assocData = '',
|
220 |
+
$nonce = '',
|
221 |
+
$key = ''
|
222 |
+
) {
|
223 |
+
if (!self::crypto_aead_aes256gcm_is_available()) {
|
224 |
+
throw new SodiumException('AES-256-GCM is not available');
|
225 |
+
}
|
226 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($ciphertext, 'string', 1);
|
227 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($assocData, 'string', 2);
|
228 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($nonce, 'string', 3);
|
229 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($key, 'string', 4);
|
230 |
+
|
231 |
+
/* Input validation: */
|
232 |
+
if (ParagonIE_Sodium_Core_Util::strlen($nonce) !== self::CRYPTO_AEAD_AES256GCM_NPUBBYTES) {
|
233 |
+
throw new SodiumException('Nonce must be CRYPTO_AEAD_AES256GCM_NPUBBYTES long');
|
234 |
+
}
|
235 |
+
if (ParagonIE_Sodium_Core_Util::strlen($key) !== self::CRYPTO_AEAD_AES256GCM_KEYBYTES) {
|
236 |
+
throw new SodiumException('Key must be CRYPTO_AEAD_AES256GCM_KEYBYTES long');
|
237 |
+
}
|
238 |
+
if (ParagonIE_Sodium_Core_Util::strlen($ciphertext) < self::CRYPTO_AEAD_AES256GCM_ABYTES) {
|
239 |
+
throw new SodiumException('Message must be at least CRYPTO_AEAD_AES256GCM_ABYTES long');
|
240 |
+
}
|
241 |
+
|
242 |
+
if (!self::crypto_aead_aes256gcm_is_available()) {
|
243 |
+
throw new SodiumException('AES-256-GCM is not available');
|
244 |
+
}
|
245 |
+
$ctext = ParagonIE_Sodium_Core_Util::substr($ciphertext, 0, -self::CRYPTO_AEAD_AES256GCM_ABYTES);
|
246 |
+
$authTag = ParagonIE_Sodium_Core_Util::substr($ciphertext, -self::CRYPTO_AEAD_AES256GCM_ABYTES, 16);
|
247 |
+
return openssl_decrypt(
|
248 |
+
$ctext,
|
249 |
+
'aes-256-gcm',
|
250 |
+
$key,
|
251 |
+
OPENSSL_RAW_DATA,
|
252 |
+
$nonce,
|
253 |
+
$authTag,
|
254 |
+
$assocData
|
255 |
+
);
|
256 |
+
}
|
257 |
+
|
258 |
+
/**
|
259 |
+
* Authenticated Encryption with Associated Data: Encryption
|
260 |
+
*
|
261 |
+
* Algorithm:
|
262 |
+
* AES-256-GCM
|
263 |
+
*
|
264 |
+
* @param string $plaintext Message to be encrypted
|
265 |
+
* @param string $assocData Authenticated Associated Data (unencrypted)
|
266 |
+
* @param string $nonce Number to be used only Once; must be 8 bytes
|
267 |
+
* @param string $key Encryption key
|
268 |
+
*
|
269 |
+
* @return string Ciphertext with a 16-byte GCM message
|
270 |
+
* authentication code appended
|
271 |
+
* @throws SodiumException
|
272 |
+
* @throws TypeError
|
273 |
+
* @psalm-suppress MixedArgument
|
274 |
+
*/
|
275 |
+
public static function crypto_aead_aes256gcm_encrypt(
|
276 |
+
$plaintext = '',
|
277 |
+
$assocData = '',
|
278 |
+
$nonce = '',
|
279 |
+
$key = ''
|
280 |
+
) {
|
281 |
+
if (!self::crypto_aead_aes256gcm_is_available()) {
|
282 |
+
throw new SodiumException('AES-256-GCM is not available');
|
283 |
+
}
|
284 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($plaintext, 'string', 1);
|
285 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($assocData, 'string', 2);
|
286 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($nonce, 'string', 3);
|
287 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($key, 'string', 4);
|
288 |
+
|
289 |
+
/* Input validation: */
|
290 |
+
if (ParagonIE_Sodium_Core_Util::strlen($nonce) !== self::CRYPTO_AEAD_AES256GCM_NPUBBYTES) {
|
291 |
+
throw new SodiumException('Nonce must be CRYPTO_AEAD_AES256GCM_NPUBBYTES long');
|
292 |
+
}
|
293 |
+
if (ParagonIE_Sodium_Core_Util::strlen($key) !== self::CRYPTO_AEAD_AES256GCM_KEYBYTES) {
|
294 |
+
throw new SodiumException('Key must be CRYPTO_AEAD_AES256GCM_KEYBYTES long');
|
295 |
+
}
|
296 |
+
$authTag = '';
|
297 |
+
$ciphertext = openssl_encrypt(
|
298 |
+
$plaintext,
|
299 |
+
'aes-256-gcm',
|
300 |
+
$key,
|
301 |
+
OPENSSL_RAW_DATA,
|
302 |
+
$nonce,
|
303 |
+
$authTag,
|
304 |
+
$assocData
|
305 |
+
);
|
306 |
+
return $ciphertext . $authTag;
|
307 |
+
}
|
308 |
+
|
309 |
+
/**
|
310 |
+
* Return a secure random key for use with the AES-256-GCM
|
311 |
+
* symmetric AEAD interface.
|
312 |
+
*
|
313 |
+
* @return string
|
314 |
+
*/
|
315 |
+
public static function crypto_aead_aes256gcm_keygen()
|
316 |
+
{
|
317 |
+
return random_bytes(self::CRYPTO_AEAD_AES256GCM_KEYBYTES);
|
318 |
+
}
|
319 |
+
|
320 |
+
/**
|
321 |
+
* Authenticated Encryption with Associated Data: Decryption
|
322 |
+
*
|
323 |
+
* Algorithm:
|
324 |
+
* ChaCha20-Poly1305
|
325 |
+
*
|
326 |
+
* This mode uses a 64-bit random nonce with a 64-bit counter.
|
327 |
+
* IETF mode uses a 96-bit random nonce with a 32-bit counter.
|
328 |
+
*
|
329 |
+
* @param string $ciphertext Encrypted message (with Poly1305 MAC appended)
|
330 |
+
* @param string $assocData Authenticated Associated Data (unencrypted)
|
331 |
+
* @param string $nonce Number to be used only Once; must be 8 bytes
|
332 |
+
* @param string $key Encryption key
|
333 |
+
*
|
334 |
+
* @return string The original plaintext message
|
335 |
+
* @throws SodiumException
|
336 |
+
* @throws TypeError
|
337 |
+
* @psalm-suppress MixedArgument
|
338 |
+
* @psalm-suppress MixedInferredReturnType
|
339 |
+
* @psalm-suppress MixedReturnStatement
|
340 |
+
*/
|
341 |
+
public static function crypto_aead_chacha20poly1305_decrypt(
|
342 |
+
$ciphertext = '',
|
343 |
+
$assocData = '',
|
344 |
+
$nonce = '',
|
345 |
+
$key = ''
|
346 |
+
) {
|
347 |
+
/* Type checks: */
|
348 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($ciphertext, 'string', 1);
|
349 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($assocData, 'string', 2);
|
350 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($nonce, 'string', 3);
|
351 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($key, 'string', 4);
|
352 |
+
|
353 |
+
/* Input validation: */
|
354 |
+
if (ParagonIE_Sodium_Core_Util::strlen($nonce) !== self::CRYPTO_AEAD_CHACHA20POLY1305_NPUBBYTES) {
|
355 |
+
throw new SodiumException('Nonce must be CRYPTO_AEAD_CHACHA20POLY1305_NPUBBYTES long');
|
356 |
+
}
|
357 |
+
if (ParagonIE_Sodium_Core_Util::strlen($key) !== self::CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES) {
|
358 |
+
throw new SodiumException('Key must be CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES long');
|
359 |
+
}
|
360 |
+
if (ParagonIE_Sodium_Core_Util::strlen($ciphertext) < self::CRYPTO_AEAD_CHACHA20POLY1305_ABYTES) {
|
361 |
+
throw new SodiumException('Message must be at least CRYPTO_AEAD_CHACHA20POLY1305_ABYTES long');
|
362 |
+
}
|
363 |
+
|
364 |
+
if (self::isPhp72OrGreater()) {
|
365 |
+
/**
|
366 |
+
* @psalm-suppress InvalidReturnStatement
|
367 |
+
* @psalm-suppress FalsableReturnStatement
|
368 |
+
*/
|
369 |
+
return sodium_crypto_aead_chacha20poly1305_decrypt(
|
370 |
+
$ciphertext,
|
371 |
+
$assocData,
|
372 |
+
$nonce,
|
373 |
+
$key
|
374 |
+
);
|
375 |
+
}
|
376 |
+
if (self::use_fallback('crypto_aead_chacha20poly1305_decrypt')) {
|
377 |
+
return call_user_func(
|
378 |
+
'\\Sodium\\crypto_aead_chacha20poly1305_decrypt',
|
379 |
+
$ciphertext,
|
380 |
+
$assocData,
|
381 |
+
$nonce,
|
382 |
+
$key
|
383 |
+
);
|
384 |
+
}
|
385 |
+
if (PHP_INT_SIZE === 4) {
|
386 |
+
return ParagonIE_Sodium_Crypto32::aead_chacha20poly1305_decrypt(
|
387 |
+
$ciphertext,
|
388 |
+
$assocData,
|
389 |
+
$nonce,
|
390 |
+
$key
|
391 |
+
);
|
392 |
+
}
|
393 |
+
return ParagonIE_Sodium_Crypto::aead_chacha20poly1305_decrypt(
|
394 |
+
$ciphertext,
|
395 |
+
$assocData,
|
396 |
+
$nonce,
|
397 |
+
$key
|
398 |
+
);
|
399 |
+
}
|
400 |
+
|
401 |
+
/**
|
402 |
+
* Authenticated Encryption with Associated Data
|
403 |
+
*
|
404 |
+
* Algorithm:
|
405 |
+
* ChaCha20-Poly1305
|
406 |
+
*
|
407 |
+
* This mode uses a 64-bit random nonce with a 64-bit counter.
|
408 |
+
* IETF mode uses a 96-bit random nonce with a 32-bit counter.
|
409 |
+
*
|
410 |
+
* @param string $plaintext Message to be encrypted
|
411 |
+
* @param string $assocData Authenticated Associated Data (unencrypted)
|
412 |
+
* @param string $nonce Number to be used only Once; must be 8 bytes
|
413 |
+
* @param string $key Encryption key
|
414 |
+
*
|
415 |
+
* @return string Ciphertext with a 16-byte Poly1305 message
|
416 |
+
* authentication code appended
|
417 |
+
* @throws SodiumException
|
418 |
+
* @throws TypeError
|
419 |
+
* @psalm-suppress MixedArgument
|
420 |
+
*/
|
421 |
+
public static function crypto_aead_chacha20poly1305_encrypt(
|
422 |
+
$plaintext = '',
|
423 |
+
$assocData = '',
|
424 |
+
$nonce = '',
|
425 |
+
$key = ''
|
426 |
+
) {
|
427 |
+
/* Type checks: */
|
428 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($plaintext, 'string', 1);
|
429 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($assocData, 'string', 2);
|
430 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($nonce, 'string', 3);
|
431 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($key, 'string', 4);
|
432 |
+
|
433 |
+
/* Input validation: */
|
434 |
+
if (ParagonIE_Sodium_Core_Util::strlen($nonce) !== self::CRYPTO_AEAD_CHACHA20POLY1305_NPUBBYTES) {
|
435 |
+
throw new SodiumException('Nonce must be CRYPTO_AEAD_CHACHA20POLY1305_NPUBBYTES long');
|
436 |
+
}
|
437 |
+
if (ParagonIE_Sodium_Core_Util::strlen($key) !== self::CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES) {
|
438 |
+
throw new SodiumException('Key must be CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES long');
|
439 |
+
}
|
440 |
+
|
441 |
+
if (self::isPhp72OrGreater()) {
|
442 |
+
return (string) sodium_crypto_aead_chacha20poly1305_encrypt(
|
443 |
+
$plaintext,
|
444 |
+
$assocData,
|
445 |
+
$nonce,
|
446 |
+
$key
|
447 |
+
);
|
448 |
+
}
|
449 |
+
if (self::use_fallback('crypto_aead_chacha20poly1305_encrypt')) {
|
450 |
+
return (string) call_user_func(
|
451 |
+
'\\Sodium\\crypto_aead_chacha20poly1305_encrypt',
|
452 |
+
$plaintext,
|
453 |
+
$assocData,
|
454 |
+
$nonce,
|
455 |
+
$key
|
456 |
+
);
|
457 |
+
}
|
458 |
+
if (PHP_INT_SIZE === 4) {
|
459 |
+
return ParagonIE_Sodium_Crypto32::aead_chacha20poly1305_encrypt(
|
460 |
+
$plaintext,
|
461 |
+
$assocData,
|
462 |
+
$nonce,
|
463 |
+
$key
|
464 |
+
);
|
465 |
+
}
|
466 |
+
return ParagonIE_Sodium_Crypto::aead_chacha20poly1305_encrypt(
|
467 |
+
$plaintext,
|
468 |
+
$assocData,
|
469 |
+
$nonce,
|
470 |
+
$key
|
471 |
+
);
|
472 |
+
}
|
473 |
+
|
474 |
+
/**
|
475 |
+
* Authenticated Encryption with Associated Data: Decryption
|
476 |
+
*
|
477 |
+
* Algorithm:
|
478 |
+
* ChaCha20-Poly1305
|
479 |
+
*
|
480 |
+
* IETF mode uses a 96-bit random nonce with a 32-bit counter.
|
481 |
+
* Regular mode uses a 64-bit random nonce with a 64-bit counter.
|
482 |
+
*
|
483 |
+
* @param string $ciphertext Encrypted message (with Poly1305 MAC appended)
|
484 |
+
* @param string $assocData Authenticated Associated Data (unencrypted)
|
485 |
+
* @param string $nonce Number to be used only Once; must be 12 bytes
|
486 |
+
* @param string $key Encryption key
|
487 |
+
*
|
488 |
+
* @return string The original plaintext message
|
489 |
+
* @throws SodiumException
|
490 |
+
* @throws TypeError
|
491 |
+
* @psalm-suppress MixedArgument
|
492 |
+
* @psalm-suppress MixedInferredReturnType
|
493 |
+
* @psalm-suppress MixedReturnStatement
|
494 |
+
*/
|
495 |
+
public static function crypto_aead_chacha20poly1305_ietf_decrypt(
|
496 |
+
$ciphertext = '',
|
497 |
+
$assocData = '',
|
498 |
+
$nonce = '',
|
499 |
+
$key = ''
|
500 |
+
) {
|
501 |
+
/* Type checks: */
|
502 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($ciphertext, 'string', 1);
|
503 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($assocData, 'string', 2);
|
504 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($nonce, 'string', 3);
|
505 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($key, 'string', 4);
|
506 |
+
|
507 |
+
/* Input validation: */
|
508 |
+
if (ParagonIE_Sodium_Core_Util::strlen($nonce) !== self::CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES) {
|
509 |
+
throw new SodiumException('Nonce must be CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES long');
|
510 |
+
}
|
511 |
+
if (ParagonIE_Sodium_Core_Util::strlen($key) !== self::CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES) {
|
512 |
+
throw new SodiumException('Key must be CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES long');
|
513 |
+
}
|
514 |
+
if (ParagonIE_Sodium_Core_Util::strlen($ciphertext) < self::CRYPTO_AEAD_CHACHA20POLY1305_ABYTES) {
|
515 |
+
throw new SodiumException('Message must be at least CRYPTO_AEAD_CHACHA20POLY1305_ABYTES long');
|
516 |
+
}
|
517 |
+
|
518 |
+
if (self::isPhp72OrGreater()) {
|
519 |
+
/**
|
520 |
+
* @psalm-suppress InvalidReturnStatement
|
521 |
+
* @psalm-suppress FalsableReturnStatement
|
522 |
+
*/
|
523 |
+
return sodium_crypto_aead_chacha20poly1305_ietf_decrypt(
|
524 |
+
$ciphertext,
|
525 |
+
$assocData,
|
526 |
+
$nonce,
|
527 |
+
$key
|
528 |
+
);
|
529 |
+
}
|
530 |
+
if (self::use_fallback('crypto_aead_chacha20poly1305_ietf_decrypt')) {
|
531 |
+
return call_user_func(
|
532 |
+
'\\Sodium\\crypto_aead_chacha20poly1305_ietf_decrypt',
|
533 |
+
$ciphertext,
|
534 |
+
$assocData,
|
535 |
+
$nonce,
|
536 |
+
$key
|
537 |
+
);
|
538 |
+
}
|
539 |
+
if (PHP_INT_SIZE === 4) {
|
540 |
+
return ParagonIE_Sodium_Crypto32::aead_chacha20poly1305_ietf_decrypt(
|
541 |
+
$ciphertext,
|
542 |
+
$assocData,
|
543 |
+
$nonce,
|
544 |
+
$key
|
545 |
+
);
|
546 |
+
}
|
547 |
+
return ParagonIE_Sodium_Crypto::aead_chacha20poly1305_ietf_decrypt(
|
548 |
+
$ciphertext,
|
549 |
+
$assocData,
|
550 |
+
$nonce,
|
551 |
+
$key
|
552 |
+
);
|
553 |
+
}
|
554 |
+
|
555 |
+
/**
|
556 |
+
* Return a secure random key for use with the ChaCha20-Poly1305
|
557 |
+
* symmetric AEAD interface.
|
558 |
+
*
|
559 |
+
* @return string
|
560 |
+
*/
|
561 |
+
public static function crypto_aead_chacha20poly1305_keygen()
|
562 |
+
{
|
563 |
+
return random_bytes(self::CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES);
|
564 |
+
}
|
565 |
+
|
566 |
+
/**
|
567 |
+
* Authenticated Encryption with Associated Data
|
568 |
+
*
|
569 |
+
* Algorithm:
|
570 |
+
* ChaCha20-Poly1305
|
571 |
+
*
|
572 |
+
* IETF mode uses a 96-bit random nonce with a 32-bit counter.
|
573 |
+
* Regular mode uses a 64-bit random nonce with a 64-bit counter.
|
574 |
+
*
|
575 |
+
* @param string $plaintext Message to be encrypted
|
576 |
+
* @param string $assocData Authenticated Associated Data (unencrypted)
|
577 |
+
* @param string $nonce Number to be used only Once; must be 8 bytes
|
578 |
+
* @param string $key Encryption key
|
579 |
+
*
|
580 |
+
* @return string Ciphertext with a 16-byte Poly1305 message
|
581 |
+
* authentication code appended
|
582 |
+
* @throws SodiumException
|
583 |
+
* @throws TypeError
|
584 |
+
* @psalm-suppress MixedArgument
|
585 |
+
*/
|
586 |
+
public static function crypto_aead_chacha20poly1305_ietf_encrypt(
|
587 |
+
$plaintext = '',
|
588 |
+
$assocData = '',
|
589 |
+
$nonce = '',
|
590 |
+
$key = ''
|
591 |
+
) {
|
592 |
+
/* Type checks: */
|
593 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($plaintext, 'string', 1);
|
594 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($assocData, 'string', 2);
|
595 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($nonce, 'string', 3);
|
596 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($key, 'string', 4);
|
597 |
+
|
598 |
+
/* Input validation: */
|
599 |
+
if (ParagonIE_Sodium_Core_Util::strlen($nonce) !== self::CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES) {
|
600 |
+
throw new SodiumException('Nonce must be CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES long');
|
601 |
+
}
|
602 |
+
if (ParagonIE_Sodium_Core_Util::strlen($key) !== self::CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES) {
|
603 |
+
throw new SodiumException('Key must be CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES long');
|
604 |
+
}
|
605 |
+
|
606 |
+
if (self::isPhp72OrGreater()) {
|
607 |
+
return (string) sodium_crypto_aead_chacha20poly1305_ietf_encrypt(
|
608 |
+
$plaintext,
|
609 |
+
$assocData,
|
610 |
+
$nonce,
|
611 |
+
$key
|
612 |
+
);
|
613 |
+
}
|
614 |
+
if (self::use_fallback('crypto_aead_chacha20poly1305_ietf_encrypt')) {
|
615 |
+
return (string) call_user_func(
|
616 |
+
'\\Sodium\\crypto_aead_chacha20poly1305_ietf_encrypt',
|
617 |
+
$plaintext,
|
618 |
+
$assocData,
|
619 |
+
$nonce,
|
620 |
+
$key
|
621 |
+
);
|
622 |
+
}
|
623 |
+
if (PHP_INT_SIZE === 4) {
|
624 |
+
return ParagonIE_Sodium_Crypto32::aead_chacha20poly1305_ietf_encrypt(
|
625 |
+
$plaintext,
|
626 |
+
$assocData,
|
627 |
+
$nonce,
|
628 |
+
$key
|
629 |
+
);
|
630 |
+
}
|
631 |
+
return ParagonIE_Sodium_Crypto::aead_chacha20poly1305_ietf_encrypt(
|
632 |
+
$plaintext,
|
633 |
+
$assocData,
|
634 |
+
$nonce,
|
635 |
+
$key
|
636 |
+
);
|
637 |
+
}
|
638 |
+
|
639 |
+
/**
|
640 |
+
* Return a secure random key for use with the ChaCha20-Poly1305
|
641 |
+
* symmetric AEAD interface. (IETF version)
|
642 |
+
*
|
643 |
+
* @return string
|
644 |
+
*/
|
645 |
+
public static function crypto_aead_chacha20poly1305_ietf_keygen()
|
646 |
+
{
|
647 |
+
return random_bytes(self::CRYPTO_AEAD_CHACHA20POLY1305_IETF_KEYBYTES);
|
648 |
+
}
|
649 |
+
|
650 |
+
/**
|
651 |
+
* Authenticated Encryption with Associated Data: Decryption
|
652 |
+
*
|
653 |
+
* Algorithm:
|
654 |
+
* XChaCha20-Poly1305
|
655 |
+
*
|
656 |
+
* This mode uses a 64-bit random nonce with a 64-bit counter.
|
657 |
+
* IETF mode uses a 96-bit random nonce with a 32-bit counter.
|
658 |
+
*
|
659 |
+
* @param string $ciphertext Encrypted message (with Poly1305 MAC appended)
|
660 |
+
* @param string $assocData Authenticated Associated Data (unencrypted)
|
661 |
+
* @param string $nonce Number to be used only Once; must be 8 bytes
|
662 |
+
* @param string $key Encryption key
|
663 |
+
*
|
664 |
+
* @return string The original plaintext message
|
665 |
+
* @throws SodiumException
|
666 |
+
* @throws TypeError
|
667 |
+
* @psalm-suppress MixedArgument
|
668 |
+
*/
|
669 |
+
public static function crypto_aead_xchacha20poly1305_ietf_decrypt(
|
670 |
+
$ciphertext = '',
|
671 |
+
$assocData = '',
|
672 |
+
$nonce = '',
|
673 |
+
$key = ''
|
674 |
+
) {
|
675 |
+
/* Type checks: */
|
676 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($ciphertext, 'string', 1);
|
677 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($assocData, 'string', 2);
|
678 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($nonce, 'string', 3);
|
679 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($key, 'string', 4);
|
680 |
+
|
681 |
+
/* Input validation: */
|
682 |
+
if (ParagonIE_Sodium_Core_Util::strlen($nonce) !== self::CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NPUBBYTES) {
|
683 |
+
throw new SodiumException('Nonce must be CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NPUBBYTES long');
|
684 |
+
}
|
685 |
+
if (ParagonIE_Sodium_Core_Util::strlen($key) !== self::CRYPTO_AEAD_XCHACHA20POLY1305_IETF_KEYBYTES) {
|
686 |
+
throw new SodiumException('Key must be CRYPTO_AEAD_XCHACHA20POLY1305_IETF_KEYBYTES long');
|
687 |
+
}
|
688 |
+
if (ParagonIE_Sodium_Core_Util::strlen($ciphertext) < self::CRYPTO_AEAD_XCHACHA20POLY1305_IETF_ABYTES) {
|
689 |
+
throw new SodiumException('Message must be at least CRYPTO_AEAD_XCHACHA20POLY1305_IETF_ABYTES long');
|
690 |
+
}
|
691 |
+
|
692 |
+
if (PHP_INT_SIZE === 4) {
|
693 |
+
return ParagonIE_Sodium_Crypto32::aead_xchacha20poly1305_ietf_decrypt(
|
694 |
+
$ciphertext,
|
695 |
+
$assocData,
|
696 |
+
$nonce,
|
697 |
+
$key
|
698 |
+
);
|
699 |
+
}
|
700 |
+
return ParagonIE_Sodium_Crypto::aead_xchacha20poly1305_ietf_decrypt(
|
701 |
+
$ciphertext,
|
702 |
+
$assocData,
|
703 |
+
$nonce,
|
704 |
+
$key
|
705 |
+
);
|
706 |
+
}
|
707 |
+
|
708 |
+
/**
|
709 |
+
* Authenticated Encryption with Associated Data
|
710 |
+
*
|
711 |
+
* Algorithm:
|
712 |
+
* XChaCha20-Poly1305
|
713 |
+
*
|
714 |
+
* This mode uses a 64-bit random nonce with a 64-bit counter.
|
715 |
+
* IETF mode uses a 96-bit random nonce with a 32-bit counter.
|
716 |
+
*
|
717 |
+
* @param string $plaintext Message to be encrypted
|
718 |
+
* @param string $assocData Authenticated Associated Data (unencrypted)
|
719 |
+
* @param string $nonce Number to be used only Once; must be 8 bytes
|
720 |
+
* @param string $key Encryption key
|
721 |
+
*
|
722 |
+
* @return string Ciphertext with a 16-byte Poly1305 message
|
723 |
+
* authentication code appended
|
724 |
+
* @throws SodiumException
|
725 |
+
* @throws TypeError
|
726 |
+
* @psalm-suppress MixedArgument
|
727 |
+
*/
|
728 |
+
public static function crypto_aead_xchacha20poly1305_ietf_encrypt(
|
729 |
+
$plaintext = '',
|
730 |
+
$assocData = '',
|
731 |
+
$nonce = '',
|
732 |
+
$key = ''
|
733 |
+
) {
|
734 |
+
/* Type checks: */
|
735 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($plaintext, 'string', 1);
|
736 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($assocData, 'string', 2);
|
737 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($nonce, 'string', 3);
|
738 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($key, 'string', 4);
|
739 |
+
|
740 |
+
/* Input validation: */
|
741 |
+
if (ParagonIE_Sodium_Core_Util::strlen($nonce) !== self::CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NPUBBYTES) {
|
742 |
+
throw new SodiumException('Nonce must be CRYPTO_AEAD_XCHACHA20POLY1305_NPUBBYTES long');
|
743 |
+
}
|
744 |
+
if (ParagonIE_Sodium_Core_Util::strlen($key) !== self::CRYPTO_AEAD_XCHACHA20POLY1305_IETF_KEYBYTES) {
|
745 |
+
throw new SodiumException('Key must be CRYPTO_AEAD_XCHACHA20POLY1305_KEYBYTES long');
|
746 |
+
}
|
747 |
+
|
748 |
+
if (PHP_INT_SIZE === 4) {
|
749 |
+
return ParagonIE_Sodium_Crypto32::aead_xchacha20poly1305_ietf_encrypt(
|
750 |
+
$plaintext,
|
751 |
+
$assocData,
|
752 |
+
$nonce,
|
753 |
+
$key
|
754 |
+
);
|
755 |
+
}
|
756 |
+
return ParagonIE_Sodium_Crypto::aead_xchacha20poly1305_ietf_encrypt(
|
757 |
+
$plaintext,
|
758 |
+
$assocData,
|
759 |
+
$nonce,
|
760 |
+
$key
|
761 |
+
);
|
762 |
+
}
|
763 |
+
|
764 |
+
/**
|
765 |
+
* Return a secure random key for use with the XChaCha20-Poly1305
|
766 |
+
* symmetric AEAD interface.
|
767 |
+
*
|
768 |
+
* @return string
|
769 |
+
*/
|
770 |
+
public static function crypto_aead_xchacha20poly1305_ietf_keygen()
|
771 |
+
{
|
772 |
+
return random_bytes(self::CRYPTO_AEAD_XCHACHA20POLY1305_IETF_KEYBYTES);
|
773 |
+
}
|
774 |
+
|
775 |
+
/**
|
776 |
+
* Authenticate a message. Uses symmetric-key cryptography.
|
777 |
+
*
|
778 |
+
* Algorithm:
|
779 |
+
* HMAC-SHA512-256. Which is HMAC-SHA-512 truncated to 256 bits.
|
780 |
+
* Not to be confused with HMAC-SHA-512/256 which would use the
|
781 |
+
* SHA-512/256 hash function (uses different initial parameters
|
782 |
+
* but still truncates to 256 bits to sidestep length-extension
|
783 |
+
* attacks).
|
784 |
+
*
|
785 |
+
* @param string $message Message to be authenticated
|
786 |
+
* @param string $key Symmetric authentication key
|
787 |
+
* @return string Message authentication code
|
788 |
+
* @throws SodiumException
|
789 |
+
* @throws TypeError
|
790 |
+
* @psalm-suppress MixedArgument
|
791 |
+
*/
|
792 |
+
public static function crypto_auth($message, $key)
|
793 |
+
{
|
794 |
+
/* Type checks: */
|
795 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($message, 'string', 1);
|
796 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($key, 'string', 2);
|
797 |
+
|
798 |
+
/* Input validation: */
|
799 |
+
if (ParagonIE_Sodium_Core_Util::strlen($key) !== self::CRYPTO_AUTH_KEYBYTES) {
|
800 |
+
throw new SodiumException('Argument 2 must be CRYPTO_AUTH_KEYBYTES long.');
|
801 |
+
}
|
802 |
+
|
803 |
+
if (self::isPhp72OrGreater()) {
|
804 |
+
return (string) sodium_crypto_auth($message, $key);
|
805 |
+
}
|
806 |
+
if (self::use_fallback('crypto_auth')) {
|
807 |
+
return (string) call_user_func('\\Sodium\\crypto_auth', $message, $key);
|
808 |
+
}
|
809 |
+
if (PHP_INT_SIZE === 4) {
|
810 |
+
return ParagonIE_Sodium_Crypto32::auth($message, $key);
|
811 |
+
}
|
812 |
+
return ParagonIE_Sodium_Crypto::auth($message, $key);
|
813 |
+
}
|
814 |
+
|
815 |
+
/**
|
816 |
+
* @return string
|
817 |
+
*/
|
818 |
+
public static function crypto_auth_keygen()
|
819 |
+
{
|
820 |
+
return random_bytes(self::CRYPTO_AUTH_KEYBYTES);
|
821 |
+
}
|
822 |
+
|
823 |
+
/**
|
824 |
+
* Verify the MAC of a message previously authenticated with crypto_auth.
|
825 |
+
*
|
826 |
+
* @param string $mac Message authentication code
|
827 |
+
* @param string $message Message whose authenticity you are attempting to
|
828 |
+
* verify (with a given MAC and key)
|
829 |
+
* @param string $key Symmetric authentication key
|
830 |
+
* @return bool TRUE if authenticated, FALSE otherwise
|
831 |
+
* @throws SodiumException
|
832 |
+
* @throws TypeError
|
833 |
+
* @psalm-suppress MixedArgument
|
834 |
+
*/
|
835 |
+
public static function crypto_auth_verify($mac, $message, $key)
|
836 |
+
{
|
837 |
+
/* Type checks: */
|
838 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($mac, 'string', 1);
|
839 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($message, 'string', 2);
|
840 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($key, 'string', 3);
|
841 |
+
|
842 |
+
/* Input validation: */
|
843 |
+
if (ParagonIE_Sodium_Core_Util::strlen($mac) !== self::CRYPTO_AUTH_BYTES) {
|
844 |
+
throw new SodiumException('Argument 1 must be CRYPTO_AUTH_BYTES long.');
|
845 |
+
}
|
846 |
+
if (ParagonIE_Sodium_Core_Util::strlen($key) !== self::CRYPTO_AUTH_KEYBYTES) {
|
847 |
+
throw new SodiumException('Argument 3 must be CRYPTO_AUTH_KEYBYTES long.');
|
848 |
+
}
|
849 |
+
|
850 |
+
if (self::isPhp72OrGreater()) {
|
851 |
+
return (bool) sodium_crypto_auth_verify($mac, $message, $key);
|
852 |
+
}
|
853 |
+
if (self::use_fallback('crypto_auth_verify')) {
|
854 |
+
return (bool) call_user_func('\\Sodium\\crypto_auth_verify', $mac, $message, $key);
|
855 |
+
}
|
856 |
+
if (PHP_INT_SIZE === 4) {
|
857 |
+
return ParagonIE_Sodium_Crypto32::auth_verify($mac, $message, $key);
|
858 |
+
}
|
859 |
+
return ParagonIE_Sodium_Crypto::auth_verify($mac, $message, $key);
|
860 |
+
}
|
861 |
+
|
862 |
+
/**
|
863 |
+
* Authenticated asymmetric-key encryption. Both the sender and recipient
|
864 |
+
* may decrypt messages.
|
865 |
+
*
|
866 |
+
* Algorithm: X25519-XSalsa20-Poly1305.
|
867 |
+
* X25519: Elliptic-Curve Diffie Hellman over Curve25519.
|
868 |
+
* XSalsa20: Extended-nonce variant of salsa20.
|
869 |
+
* Poyl1305: Polynomial MAC for one-time message authentication.
|
870 |
+
*
|
871 |
+
* @param string $plaintext The message to be encrypted
|
872 |
+
* @param string $nonce A Number to only be used Once; must be 24 bytes
|
873 |
+
* @param string $keypair Your secret key and your recipient's public key
|
874 |
+
* @return string Ciphertext with 16-byte Poly1305 MAC
|
875 |
+
* @throws SodiumException
|
876 |
+
* @throws TypeError
|
877 |
+
* @psalm-suppress MixedArgument
|
878 |
+
*/
|
879 |
+
public static function crypto_box($plaintext, $nonce, $keypair)
|
880 |
+
{
|
881 |
+
/* Type checks: */
|
882 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($plaintext, 'string', 1);
|
883 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($nonce, 'string', 2);
|
884 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($keypair, 'string', 3);
|
885 |
+
|
886 |
+
/* Input validation: */
|
887 |
+
if (ParagonIE_Sodium_Core_Util::strlen($nonce) !== self::CRYPTO_BOX_NONCEBYTES) {
|
888 |
+
throw new SodiumException('Argument 2 must be CRYPTO_BOX_NONCEBYTES long.');
|
889 |
+
}
|
890 |
+
if (ParagonIE_Sodium_Core_Util::strlen($keypair) !== self::CRYPTO_BOX_KEYPAIRBYTES) {
|
891 |
+
throw new SodiumException('Argument 3 must be CRYPTO_BOX_KEYPAIRBYTES long.');
|
892 |
+
}
|
893 |
+
|
894 |
+
if (self::isPhp72OrGreater()) {
|
895 |
+
return (string) sodium_crypto_box($plaintext, $nonce, $keypair);
|
896 |
+
}
|
897 |
+
if (self::use_fallback('crypto_box')) {
|
898 |
+
return (string) call_user_func('\\Sodium\\crypto_box', $plaintext, $nonce, $keypair);
|
899 |
+
}
|
900 |
+
if (PHP_INT_SIZE === 4) {
|
901 |
+
return ParagonIE_Sodium_Crypto32::box($plaintext, $nonce, $keypair);
|
902 |
+
}
|
903 |
+
return ParagonIE_Sodium_Crypto::box($plaintext, $nonce, $keypair);
|
904 |
+
}
|
905 |
+
|
906 |
+
/**
|
907 |
+
* Anonymous public-key encryption. Only the recipient may decrypt messages.
|
908 |
+
*
|
909 |
+
* Algorithm: X25519-XSalsa20-Poly1305, as with crypto_box.
|
910 |
+
* The sender's X25519 keypair is ephemeral.
|
911 |
+
* Nonce is generated from the BLAKE2b hash of both public keys.
|
912 |
+
*
|
913 |
+
* This provides ciphertext integrity.
|
914 |
+
*
|
915 |
+
* @param string $plaintext Message to be sealed
|
916 |
+
* @param string $publicKey Your recipient's public key
|
917 |
+
* @return string Sealed message that only your recipient can
|
918 |
+
* decrypt
|
919 |
+
* @throws SodiumException
|
920 |
+
* @throws TypeError
|
921 |
+
* @psalm-suppress MixedArgument
|
922 |
+
*/
|
923 |
+
public static function crypto_box_seal($plaintext, $publicKey)
|
924 |
+
{
|
925 |
+
/* Type checks: */
|
926 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($plaintext, 'string', 1);
|
927 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($publicKey, 'string', 2);
|
928 |
+
|
929 |
+
/* Input validation: */
|
930 |
+
if (ParagonIE_Sodium_Core_Util::strlen($publicKey) !== self::CRYPTO_BOX_PUBLICKEYBYTES) {
|
931 |
+
throw new SodiumException('Argument 2 must be CRYPTO_BOX_PUBLICKEYBYTES long.');
|
932 |
+
}
|
933 |
+
|
934 |
+
if (self::isPhp72OrGreater()) {
|
935 |
+
return (string) sodium_crypto_box_seal($plaintext, $publicKey);
|
936 |
+
}
|
937 |
+
if (self::use_fallback('crypto_box_seal')) {
|
938 |
+
return (string) call_user_func('\\Sodium\\crypto_box_seal', $plaintext, $publicKey);
|
939 |
+
}
|
940 |
+
if (PHP_INT_SIZE === 4) {
|
941 |
+
return ParagonIE_Sodium_Crypto32::box_seal($plaintext, $publicKey);
|
942 |
+
}
|
943 |
+
return ParagonIE_Sodium_Crypto::box_seal($plaintext, $publicKey);
|
944 |
+
}
|
945 |
+
|
946 |
+
/**
|
947 |
+
* Opens a message encrypted with crypto_box_seal(). Requires
|
948 |
+
* the recipient's keypair (sk || pk) to decrypt successfully.
|
949 |
+
*
|
950 |
+
* This validates ciphertext integrity.
|
951 |
+
*
|
952 |
+
* @param string $ciphertext Sealed message to be opened
|
953 |
+
* @param string $keypair Your crypto_box keypair
|
954 |
+
* @return string The original plaintext message
|
955 |
+
* @throws SodiumException
|
956 |
+
* @throws TypeError
|
957 |
+
* @psalm-suppress MixedArgument
|
958 |
+
* @psalm-suppress MixedInferredReturnType
|
959 |
+
* @psalm-suppress MixedReturnStatement
|
960 |
+
*/
|
961 |
+
public static function crypto_box_seal_open($ciphertext, $keypair)
|
962 |
+
{
|
963 |
+
/* Type checks: */
|
964 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($ciphertext, 'string', 1);
|
965 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($keypair, 'string', 2);
|
966 |
+
|
967 |
+
/* Input validation: */
|
968 |
+
if (ParagonIE_Sodium_Core_Util::strlen($keypair) !== self::CRYPTO_BOX_KEYPAIRBYTES) {
|
969 |
+
throw new SodiumException('Argument 2 must be CRYPTO_BOX_KEYPAIRBYTES long.');
|
970 |
+
}
|
971 |
+
|
972 |
+
if (self::isPhp72OrGreater()) {
|
973 |
+
/**
|
974 |
+
* @psalm-suppress InvalidReturnStatement
|
975 |
+
* @psalm-suppress FalsableReturnStatement
|
976 |
+
*/
|
977 |
+
return sodium_crypto_box_seal_open($ciphertext, $keypair);
|
978 |
+
}
|
979 |
+
if (self::use_fallback('crypto_box_seal_open')) {
|
980 |
+
return call_user_func('\\Sodium\\crypto_box_seal_open', $ciphertext, $keypair);
|
981 |
+
}
|
982 |
+
if (PHP_INT_SIZE === 4) {
|
983 |
+
return ParagonIE_Sodium_Crypto32::box_seal_open($ciphertext, $keypair);
|
984 |
+
}
|
985 |
+
return ParagonIE_Sodium_Crypto::box_seal_open($ciphertext, $keypair);
|
986 |
+
}
|
987 |
+
|
988 |
+
/**
|
989 |
+
* Generate a new random X25519 keypair.
|
990 |
+
*
|
991 |
+
* @return string A 64-byte string; the first 32 are your secret key, while
|
992 |
+
* the last 32 are your public key. crypto_box_secretkey()
|
993 |
+
* and crypto_box_publickey() exist to separate them so you
|
994 |
+
* don't accidentally get them mixed up!
|
995 |
+
* @throws SodiumException
|
996 |
+
* @throws TypeError
|
997 |
+
* @psalm-suppress MixedArgument
|
998 |
+
*/
|
999 |
+
public static function crypto_box_keypair()
|
1000 |
+
{
|
1001 |
+
if (self::isPhp72OrGreater()) {
|
1002 |
+
return (string) sodium_crypto_box_keypair();
|
1003 |
+
}
|
1004 |
+
if (self::use_fallback('crypto_box_keypair')) {
|
1005 |
+
return (string) call_user_func('\\Sodium\\crypto_box_keypair');
|
1006 |
+
}
|
1007 |
+
return ParagonIE_Sodium_Crypto::box_keypair();
|
1008 |
+
}
|
1009 |
+
|
1010 |
+
/**
|
1011 |
+
* Combine two keys into a keypair for use in library methods that expect
|
1012 |
+
* a keypair. This doesn't necessarily have to be the same person's keys.
|
1013 |
+
*
|
1014 |
+
* @param string $secretKey Secret key
|
1015 |
+
* @param string $publicKey Public key
|
1016 |
+
* @return string Keypair
|
1017 |
+
* @throws SodiumException
|
1018 |
+
* @throws TypeError
|
1019 |
+
* @psalm-suppress MixedArgument
|
1020 |
+
*/
|
1021 |
+
public static function crypto_box_keypair_from_secretkey_and_publickey($secretKey, $publicKey)
|
1022 |
+
{
|
1023 |
+
/* Type checks: */
|
1024 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($secretKey, 'string', 1);
|
1025 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($publicKey, 'string', 2);
|
1026 |
+
|
1027 |
+
/* Input validation: */
|
1028 |
+
if (ParagonIE_Sodium_Core_Util::strlen($secretKey) !== self::CRYPTO_BOX_SECRETKEYBYTES) {
|
1029 |
+
throw new SodiumException('Argument 1 must be CRYPTO_BOX_SECRETKEYBYTES long.');
|
1030 |
+
}
|
1031 |
+
if (ParagonIE_Sodium_Core_Util::strlen($publicKey) !== self::CRYPTO_BOX_PUBLICKEYBYTES) {
|
1032 |
+
throw new SodiumException('Argument 2 must be CRYPTO_BOX_PUBLICKEYBYTES long.');
|
1033 |
+
}
|
1034 |
+
|
1035 |
+
if (self::isPhp72OrGreater()) {
|
1036 |
+
return (string) sodium_crypto_box_keypair_from_secretkey_and_publickey($secretKey, $publicKey);
|
1037 |
+
}
|
1038 |
+
if (self::use_fallback('crypto_box_keypair_from_secretkey_and_publickey')) {
|
1039 |
+
return (string) call_user_func('\\Sodium\\crypto_box_keypair_from_secretkey_and_publickey', $secretKey, $publicKey);
|
1040 |
+
}
|
1041 |
+
if (PHP_INT_SIZE === 4) {
|
1042 |
+
return ParagonIE_Sodium_Crypto32::box_keypair_from_secretkey_and_publickey($secretKey, $publicKey);
|
1043 |
+
}
|
1044 |
+
return ParagonIE_Sodium_Crypto::box_keypair_from_secretkey_and_publickey($secretKey, $publicKey);
|
1045 |
+
}
|
1046 |
+
|
1047 |
+
/**
|
1048 |
+
* Decrypt a message previously encrypted with crypto_box().
|
1049 |
+
*
|
1050 |
+
* @param string $ciphertext Encrypted message
|
1051 |
+
* @param string $nonce Number to only be used Once; must be 24 bytes
|
1052 |
+
* @param string $keypair Your secret key and the sender's public key
|
1053 |
+
* @return string The original plaintext message
|
1054 |
+
* @throws SodiumException
|
1055 |
+
* @throws TypeError
|
1056 |
+
* @psalm-suppress MixedArgument
|
1057 |
+
* @psalm-suppress MixedInferredReturnType
|
1058 |
+
* @psalm-suppress MixedReturnStatement
|
1059 |
+
*/
|
1060 |
+
public static function crypto_box_open($ciphertext, $nonce, $keypair)
|
1061 |
+
{
|
1062 |
+
/* Type checks: */
|
1063 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($ciphertext, 'string', 1);
|
1064 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($nonce, 'string', 2);
|
1065 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($keypair, 'string', 3);
|
1066 |
+
|
1067 |
+
/* Input validation: */
|
1068 |
+
if (ParagonIE_Sodium_Core_Util::strlen($ciphertext) < self::CRYPTO_BOX_MACBYTES) {
|
1069 |
+
throw new SodiumException('Argument 1 must be at least CRYPTO_BOX_MACBYTES long.');
|
1070 |
+
}
|
1071 |
+
if (ParagonIE_Sodium_Core_Util::strlen($nonce) !== self::CRYPTO_BOX_NONCEBYTES) {
|
1072 |
+
throw new SodiumException('Argument 2 must be CRYPTO_BOX_NONCEBYTES long.');
|
1073 |
+
}
|
1074 |
+
if (ParagonIE_Sodium_Core_Util::strlen($keypair) !== self::CRYPTO_BOX_KEYPAIRBYTES) {
|
1075 |
+
throw new SodiumException('Argument 3 must be CRYPTO_BOX_KEYPAIRBYTES long.');
|
1076 |
+
}
|
1077 |
+
|
1078 |
+
if (self::isPhp72OrGreater()) {
|
1079 |
+
/**
|
1080 |
+
* @psalm-suppress InvalidReturnStatement
|
1081 |
+
* @psalm-suppress FalsableReturnStatement
|
1082 |
+
*/
|
1083 |
+
return sodium_crypto_box_open($ciphertext, $nonce, $keypair);
|
1084 |
+
}
|
1085 |
+
if (self::use_fallback('crypto_box_open')) {
|
1086 |
+
return call_user_func('\\Sodium\\crypto_box_open', $ciphertext, $nonce, $keypair);
|
1087 |
+
}
|
1088 |
+
if (PHP_INT_SIZE === 4) {
|
1089 |
+
return ParagonIE_Sodium_Crypto32::box_open($ciphertext, $nonce, $keypair);
|
1090 |
+
}
|
1091 |
+
return ParagonIE_Sodium_Crypto::box_open($ciphertext, $nonce, $keypair);
|
1092 |
+
}
|
1093 |
+
|
1094 |
+
/**
|
1095 |
+
* Extract the public key from a crypto_box keypair.
|
1096 |
+
*
|
1097 |
+
* @param string $keypair
|
1098 |
+
* @return string Your crypto_box public key
|
1099 |
+
* @throws SodiumException
|
1100 |
+
* @throws TypeError
|
1101 |
+
* @psalm-suppress MixedArgument
|
1102 |
+
*/
|
1103 |
+
public static function crypto_box_publickey($keypair)
|
1104 |
+
{
|
1105 |
+
/* Type checks: */
|
1106 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($keypair, 'string', 1);
|
1107 |
+
|
1108 |
+
/* Input validation: */
|
1109 |
+
if (ParagonIE_Sodium_Core_Util::strlen($keypair) !== self::CRYPTO_BOX_KEYPAIRBYTES) {
|
1110 |
+
throw new SodiumException('Argument 1 must be CRYPTO_BOX_KEYPAIRBYTES long.');
|
1111 |
+
}
|
1112 |
+
|
1113 |
+
if (self::isPhp72OrGreater()) {
|
1114 |
+
return (string) sodium_crypto_box_publickey($keypair);
|
1115 |
+
}
|
1116 |
+
if (self::use_fallback('crypto_box_publickey')) {
|
1117 |
+
return (string) call_user_func('\\Sodium\\crypto_box_publickey', $keypair);
|
1118 |
+
}
|
1119 |
+
if (PHP_INT_SIZE === 4) {
|
1120 |
+
return ParagonIE_Sodium_Crypto32::box_publickey($keypair);
|
1121 |
+
}
|
1122 |
+
return ParagonIE_Sodium_Crypto::box_publickey($keypair);
|
1123 |
+
}
|
1124 |
+
|
1125 |
+
/**
|
1126 |
+
* Calculate the X25519 public key from a given X25519 secret key.
|
1127 |
+
*
|
1128 |
+
* @param string $secretKey Any X25519 secret key
|
1129 |
+
* @return string The corresponding X25519 public key
|
1130 |
+
* @throws SodiumException
|
1131 |
+
* @throws TypeError
|
1132 |
+
* @psalm-suppress MixedArgument
|
1133 |
+
*/
|
1134 |
+
public static function crypto_box_publickey_from_secretkey($secretKey)
|
1135 |
+
{
|
1136 |
+
/* Type checks: */
|
1137 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($secretKey, 'string', 1);
|
1138 |
+
|
1139 |
+
/* Input validation: */
|
1140 |
+
if (ParagonIE_Sodium_Core_Util::strlen($secretKey) !== self::CRYPTO_BOX_SECRETKEYBYTES) {
|
1141 |
+
throw new SodiumException('Argument 1 must be CRYPTO_BOX_SECRETKEYBYTES long.');
|
1142 |
+
}
|
1143 |
+
|
1144 |
+
if (self::isPhp72OrGreater()) {
|
1145 |
+
return (string) sodium_crypto_box_publickey_from_secretkey($secretKey);
|
1146 |
+
}
|
1147 |
+
if (self::use_fallback('crypto_box_publickey_from_secretkey')) {
|
1148 |
+
return (string) call_user_func('\\Sodium\\crypto_box_publickey_from_secretkey', $secretKey);
|
1149 |
+
}
|
1150 |
+
if (PHP_INT_SIZE === 4) {
|
1151 |
+
return ParagonIE_Sodium_Crypto32::box_publickey_from_secretkey($secretKey);
|
1152 |
+
}
|
1153 |
+
return ParagonIE_Sodium_Crypto::box_publickey_from_secretkey($secretKey);
|
1154 |
+
}
|
1155 |
+
|
1156 |
+
/**
|
1157 |
+
* Extract the secret key from a crypto_box keypair.
|
1158 |
+
*
|
1159 |
+
* @param string $keypair
|
1160 |
+
* @return string Your crypto_box secret key
|
1161 |
+
* @throws SodiumException
|
1162 |
+
* @throws TypeError
|
1163 |
+
* @psalm-suppress MixedArgument
|
1164 |
+
*/
|
1165 |
+
public static function crypto_box_secretkey($keypair)
|
1166 |
+
{
|
1167 |
+
/* Type checks: */
|
1168 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($keypair, 'string', 1);
|
1169 |
+
|
1170 |
+
/* Input validation: */
|
1171 |
+
if (ParagonIE_Sodium_Core_Util::strlen($keypair) !== self::CRYPTO_BOX_KEYPAIRBYTES) {
|
1172 |
+
throw new SodiumException('Argument 1 must be CRYPTO_BOX_KEYPAIRBYTES long.');
|
1173 |
+
}
|
1174 |
+
|
1175 |
+
if (self::isPhp72OrGreater()) {
|
1176 |
+
return (string) sodium_crypto_box_secretkey($keypair);
|
1177 |
+
}
|
1178 |
+
if (self::use_fallback('crypto_box_secretkey')) {
|
1179 |
+
return (string) call_user_func('\\Sodium\\crypto_box_secretkey', $keypair);
|
1180 |
+
}
|
1181 |
+
if (PHP_INT_SIZE === 4) {
|
1182 |
+
return ParagonIE_Sodium_Crypto32::box_secretkey($keypair);
|
1183 |
+
}
|
1184 |
+
return ParagonIE_Sodium_Crypto::box_secretkey($keypair);
|
1185 |
+
}
|
1186 |
+
|
1187 |
+
/**
|
1188 |
+
* Generate an X25519 keypair from a seed.
|
1189 |
+
*
|
1190 |
+
* @param string $seed
|
1191 |
+
* @return string
|
1192 |
+
* @throws SodiumException
|
1193 |
+
* @throws TypeError
|
1194 |
+
* @psalm-suppress MixedArgument
|
1195 |
+
* @psalm-suppress UndefinedFunction
|
1196 |
+
*/
|
1197 |
+
public static function crypto_box_seed_keypair($seed)
|
1198 |
+
{
|
1199 |
+
/* Type checks: */
|
1200 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($seed, 'string', 1);
|
1201 |
+
|
1202 |
+
if (self::isPhp72OrGreater()) {
|
1203 |
+
return (string) sodium_crypto_box_seed_keypair($seed);
|
1204 |
+
}
|
1205 |
+
if (self::use_fallback('crypto_box_seed_keypair')) {
|
1206 |
+
return (string) call_user_func('\\Sodium\\crypto_box_seed_keypair', $seed);
|
1207 |
+
}
|
1208 |
+
if (PHP_INT_SIZE === 4) {
|
1209 |
+
return ParagonIE_Sodium_Crypto32::box_seed_keypair($seed);
|
1210 |
+
}
|
1211 |
+
return ParagonIE_Sodium_Crypto::box_seed_keypair($seed);
|
1212 |
+
}
|
1213 |
+
|
1214 |
+
/**
|
1215 |
+
* Calculates a BLAKE2b hash, with an optional key.
|
1216 |
+
*
|
1217 |
+
* @param string $message The message to be hashed
|
1218 |
+
* @param string|null $key If specified, must be a string between 16
|
1219 |
+
* and 64 bytes long
|
1220 |
+
* @param int $length Output length in bytes; must be between 16
|
1221 |
+
* and 64 (default = 32)
|
1222 |
+
* @return string Raw binary
|
1223 |
+
* @throws SodiumException
|
1224 |
+
* @throws TypeError
|
1225 |
+
* @psalm-suppress MixedArgument
|
1226 |
+
*/
|
1227 |
+
public static function crypto_generichash($message, $key = '', $length = self::CRYPTO_GENERICHASH_BYTES)
|
1228 |
+
{
|
1229 |
+
/* Type checks: */
|
1230 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($message, 'string', 1);
|
1231 |
+
if (is_null($key)) {
|
1232 |
+
$key = '';
|
1233 |
+
}
|
1234 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($key, 'string', 2);
|
1235 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($length, 'int', 3);
|
1236 |
+
|
1237 |
+
/* Input validation: */
|
1238 |
+
if (!empty($key)) {
|
1239 |
+
if (ParagonIE_Sodium_Core_Util::strlen($key) < self::CRYPTO_GENERICHASH_KEYBYTES_MIN) {
|
1240 |
+
throw new SodiumException('Unsupported key size. Must be at least CRYPTO_GENERICHASH_KEYBYTES_MIN bytes long.');
|
1241 |
+
}
|
1242 |
+
if (ParagonIE_Sodium_Core_Util::strlen($key) > self::CRYPTO_GENERICHASH_KEYBYTES_MAX) {
|
1243 |
+
throw new SodiumException('Unsupported key size. Must be at most CRYPTO_GENERICHASH_KEYBYTES_MAX bytes long.');
|
1244 |
+
}
|
1245 |
+
}
|
1246 |
+
|
1247 |
+
if (self::isPhp72OrGreater()) {
|
1248 |
+
return (string) sodium_crypto_generichash($message, $key, $length);
|
1249 |
+
}
|
1250 |
+
if (self::use_fallback('crypto_generichash')) {
|
1251 |
+
return (string) call_user_func('\\Sodium\\crypto_generichash', $message, $key, $length);
|
1252 |
+
}
|
1253 |
+
if (PHP_INT_SIZE === 4) {
|
1254 |
+
return ParagonIE_Sodium_Crypto32::generichash($message, $key, $length);
|
1255 |
+
}
|
1256 |
+
return ParagonIE_Sodium_Crypto::generichash($message, $key, $length);
|
1257 |
+
}
|
1258 |
+
|
1259 |
+
/**
|
1260 |
+
* Get the final BLAKE2b hash output for a given context.
|
1261 |
+
*
|
1262 |
+
* @param string &$ctx BLAKE2 hashing context. Generated by crypto_generichash_init().
|
1263 |
+
* @param int $length Hash output size.
|
1264 |
+
* @return string Final BLAKE2b hash.
|
1265 |
+
* @throws SodiumException
|
1266 |
+
* @throws TypeError
|
1267 |
+
* @psalm-suppress MixedArgument
|
1268 |
+
*/
|
1269 |
+
public static function crypto_generichash_final(&$ctx, $length = self::CRYPTO_GENERICHASH_BYTES)
|
1270 |
+
{
|
1271 |
+
/* Type checks: */
|
1272 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($ctx, 'string', 1);
|
1273 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($length, 'int', 2);
|
1274 |
+
|
1275 |
+
if (self::isPhp72OrGreater()) {
|
1276 |
+
return sodium_crypto_generichash_final($ctx, $length);
|
1277 |
+
}
|
1278 |
+
if (self::use_fallback('crypto_generichash_final')) {
|
1279 |
+
$func = '\\Sodium\\crypto_generichash_final';
|
1280 |
+
return (string) $func($ctx, $length);
|
1281 |
+
}
|
1282 |
+
if (PHP_INT_SIZE === 4) {
|
1283 |
+
$result = ParagonIE_Sodium_Crypto32::generichash_final($ctx, $length);
|
1284 |
+
} else {
|
1285 |
+
$result = ParagonIE_Sodium_Crypto::generichash_final($ctx, $length);
|
1286 |
+
}
|
1287 |
+
try {
|
1288 |
+
self::memzero($ctx);
|
1289 |
+
} catch (SodiumException $ex) {
|
1290 |
+
unset($ctx);
|
1291 |
+
}
|
1292 |
+
return $result;
|
1293 |
+
}
|
1294 |
+
|
1295 |
+
/**
|
1296 |
+
* Initialize a BLAKE2b hashing context, for use in a streaming interface.
|
1297 |
+
*
|
1298 |
+
* @param string|null $key If specified must be a string between 16 and 64 bytes
|
1299 |
+
* @param int $length The size of the desired hash output
|
1300 |
+
* @return string A BLAKE2 hashing context, encoded as a string
|
1301 |
+
* (To be 100% compatible with ext/libsodium)
|
1302 |
+
* @throws SodiumException
|
1303 |
+
* @throws TypeError
|
1304 |
+
* @psalm-suppress MixedArgument
|
1305 |
+
*/
|
1306 |
+
public static function crypto_generichash_init($key = '', $length = self::CRYPTO_GENERICHASH_BYTES)
|
1307 |
+
{
|
1308 |
+
/* Type checks: */
|
1309 |
+
if (is_null($key)) {
|
1310 |
+
$key = '';
|
1311 |
+
}
|
1312 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($key, 'string', 1);
|
1313 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($length, 'int', 2);
|
1314 |
+
|
1315 |
+
/* Input validation: */
|
1316 |
+
if (!empty($key)) {
|
1317 |
+
if (ParagonIE_Sodium_Core_Util::strlen($key) < self::CRYPTO_GENERICHASH_KEYBYTES_MIN) {
|
1318 |
+
throw new SodiumException('Unsupported key size. Must be at least CRYPTO_GENERICHASH_KEYBYTES_MIN bytes long.');
|
1319 |
+
}
|
1320 |
+
if (ParagonIE_Sodium_Core_Util::strlen($key) > self::CRYPTO_GENERICHASH_KEYBYTES_MAX) {
|
1321 |
+
throw new SodiumException('Unsupported key size. Must be at most CRYPTO_GENERICHASH_KEYBYTES_MAX bytes long.');
|
1322 |
+
}
|
1323 |
+
}
|
1324 |
+
|
1325 |
+
if (self::isPhp72OrGreater()) {
|
1326 |
+
return sodium_crypto_generichash_init($key, $length);
|
1327 |
+
}
|
1328 |
+
if (self::use_fallback('crypto_generichash_init')) {
|
1329 |
+
return (string) call_user_func('\\Sodium\\crypto_generichash_init', $key, $length);
|
1330 |
+
}
|
1331 |
+
if (PHP_INT_SIZE === 4) {
|
1332 |
+
return ParagonIE_Sodium_Crypto32::generichash_init($key, $length);
|
1333 |
+
}
|
1334 |
+
return ParagonIE_Sodium_Crypto::generichash_init($key, $length);
|
1335 |
+
}
|
1336 |
+
|
1337 |
+
/**
|
1338 |
+
* Update a BLAKE2b hashing context with additional data.
|
1339 |
+
*
|
1340 |
+
* @param string &$ctx BLAKE2 hashing context. Generated by crypto_generichash_init().
|
1341 |
+
* $ctx is passed by reference and gets updated in-place.
|
1342 |
+
* @param string $message The message to append to the existing hash state.
|
1343 |
+
* @return void
|
1344 |
+
* @throws SodiumException
|
1345 |
+
* @throws TypeError
|
1346 |
+
* @psalm-suppress MixedArgument
|
1347 |
+
*/
|
1348 |
+
public static function crypto_generichash_update(&$ctx, $message)
|
1349 |
+
{
|
1350 |
+
/* Type checks: */
|
1351 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($ctx, 'string', 1);
|
1352 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($message, 'string', 2);
|
1353 |
+
|
1354 |
+
if (self::isPhp72OrGreater()) {
|
1355 |
+
sodium_crypto_generichash_update($ctx, $message);
|
1356 |
+
return;
|
1357 |
+
}
|
1358 |
+
if (self::use_fallback('crypto_generichash_update')) {
|
1359 |
+
$func = '\\Sodium\\crypto_generichash_update';
|
1360 |
+
$func($ctx, $message);
|
1361 |
+
return;
|
1362 |
+
}
|
1363 |
+
if (PHP_INT_SIZE === 4) {
|
1364 |
+
$ctx = ParagonIE_Sodium_Crypto32::generichash_update($ctx, $message);
|
1365 |
+
} else {
|
1366 |
+
$ctx = ParagonIE_Sodium_Crypto::generichash_update($ctx, $message);
|
1367 |
+
}
|
1368 |
+
}
|
1369 |
+
|
1370 |
+
/**
|
1371 |
+
* @return string
|
1372 |
+
*/
|
1373 |
+
public static function crypto_generichash_keygen()
|
1374 |
+
{
|
1375 |
+
return random_bytes(self::CRYPTO_GENERICHASH_KEYBYTES);
|
1376 |
+
}
|
1377 |
+
|
1378 |
+
/**
|
1379 |
+
* Perform a key exchange, between a designated client and a server.
|
1380 |
+
*
|
1381 |
+
* Typically, you would designate one machine to be the client and the
|
1382 |
+
* other to be the server. The first two keys are what you'd expect for
|
1383 |
+
* scalarmult() below, but the latter two public keys don't swap places.
|
1384 |
+
*
|
1385 |
+
* | ALICE | BOB |
|
1386 |
+
* | Client | Server |
|
1387 |
+
* |--------------------------------|-------------------------------------|
|
1388 |
+
* | shared = crypto_kx( | shared = crypto_kx( |
|
1389 |
+
* | alice_sk, | bob_sk, | <- contextual
|
1390 |
+
* | bob_pk, | alice_pk, | <- contextual
|
1391 |
+
* | alice_pk, | alice_pk, | <----- static
|
1392 |
+
* | bob_pk | bob_pk | <----- static
|
1393 |
+
* | ) | ) |
|
1394 |
+
*
|
1395 |
+
* They are used along with the scalarmult product to generate a 256-bit
|
1396 |
+
* BLAKE2b hash unique to the client and server keys.
|
1397 |
+
*
|
1398 |
+
* @param string $my_secret
|
1399 |
+
* @param string $their_public
|
1400 |
+
* @param string $client_public
|
1401 |
+
* @param string $server_public
|
1402 |
+
* @return string
|
1403 |
+
* @throws SodiumException
|
1404 |
+
* @throws TypeError
|
1405 |
+
* @psalm-suppress MixedArgument
|
1406 |
+
*/
|
1407 |
+
public static function crypto_kx($my_secret, $their_public, $client_public, $server_public)
|
1408 |
+
{
|
1409 |
+
/* Type checks: */
|
1410 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($my_secret, 'string', 1);
|
1411 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($their_public, 'string', 2);
|
1412 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($client_public, 'string', 3);
|
1413 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($server_public, 'string', 4);
|
1414 |
+
|
1415 |
+
/* Input validation: */
|
1416 |
+
if (ParagonIE_Sodium_Core_Util::strlen($my_secret) !== self::CRYPTO_BOX_SECRETKEYBYTES) {
|
1417 |
+
throw new SodiumException('Argument 1 must be CRYPTO_BOX_SECRETKEYBYTES long.');
|
1418 |
+
}
|
1419 |
+
if (ParagonIE_Sodium_Core_Util::strlen($their_public) !== self::CRYPTO_BOX_PUBLICKEYBYTES) {
|
1420 |
+
throw new SodiumException('Argument 2 must be CRYPTO_BOX_PUBLICKEYBYTES long.');
|
1421 |
+
}
|
1422 |
+
if (ParagonIE_Sodium_Core_Util::strlen($client_public) !== self::CRYPTO_BOX_PUBLICKEYBYTES) {
|
1423 |
+
throw new SodiumException('Argument 3 must be CRYPTO_BOX_PUBLICKEYBYTES long.');
|
1424 |
+
}
|
1425 |
+
if (ParagonIE_Sodium_Core_Util::strlen($server_public) !== self::CRYPTO_BOX_PUBLICKEYBYTES) {
|
1426 |
+
throw new SodiumException('Argument 4 must be CRYPTO_BOX_PUBLICKEYBYTES long.');
|
1427 |
+
}
|
1428 |
+
|
1429 |
+
if (self::isPhp72OrGreater()) {
|
1430 |
+
if (is_callable('sodium_crypto_kx')) {
|
1431 |
+
return (string) sodium_crypto_kx(
|
1432 |
+
$my_secret,
|
1433 |
+
$their_public,
|
1434 |
+
$client_public,
|
1435 |
+
$server_public
|
1436 |
+
);
|
1437 |
+
}
|
1438 |
+
}
|
1439 |
+
if (self::use_fallback('crypto_kx')) {
|
1440 |
+
return (string) call_user_func(
|
1441 |
+
'\\Sodium\\crypto_kx',
|
1442 |
+
$my_secret,
|
1443 |
+
$their_public,
|
1444 |
+
$client_public,
|
1445 |
+
$server_public
|
1446 |
+
);
|
1447 |
+
}
|
1448 |
+
if (PHP_INT_SIZE === 4) {
|
1449 |
+
return ParagonIE_Sodium_Crypto32::keyExchange(
|
1450 |
+
$my_secret,
|
1451 |
+
$their_public,
|
1452 |
+
$client_public,
|
1453 |
+
$server_public
|
1454 |
+
);
|
1455 |
+
}
|
1456 |
+
return ParagonIE_Sodium_Crypto::keyExchange(
|
1457 |
+
$my_secret,
|
1458 |
+
$their_public,
|
1459 |
+
$client_public,
|
1460 |
+
$server_public
|
1461 |
+
);
|
1462 |
+
}
|
1463 |
+
|
1464 |
+
/**
|
1465 |
+
* @param int $outlen
|
1466 |
+
* @param string $passwd
|
1467 |
+
* @param string $salt
|
1468 |
+
* @param int $opslimit
|
1469 |
+
* @param int $memlimit
|
1470 |
+
* @param int|null $alg
|
1471 |
+
* @return string
|
1472 |
+
* @throws SodiumException
|
1473 |
+
* @throws TypeError
|
1474 |
+
* @psalm-suppress MixedArgument
|
1475 |
+
*/
|
1476 |
+
public static function crypto_pwhash($outlen, $passwd, $salt, $opslimit, $memlimit, $alg = null)
|
1477 |
+
{
|
1478 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($outlen, 'int', 1);
|
1479 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($passwd, 'string', 2);
|
1480 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($salt, 'string', 3);
|
1481 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($opslimit, 'int', 4);
|
1482 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($memlimit, 'int', 5);
|
1483 |
+
|
1484 |
+
if (self::isPhp72OrGreater()) {
|
1485 |
+
if (!is_null($alg)) {
|
1486 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($alg, 'int', 6);
|
1487 |
+
return sodium_crypto_pwhash($outlen, $passwd, $salt, $opslimit, $memlimit, $alg);
|
1488 |
+
}
|
1489 |
+
return sodium_crypto_pwhash($outlen, $passwd, $salt, $opslimit, $memlimit);
|
1490 |
+
}
|
1491 |
+
if (self::use_fallback('crypto_pwhash')) {
|
1492 |
+
return (string) call_user_func('\\Sodium\\crypto_pwhash', $outlen, $passwd, $salt, $opslimit, $memlimit);
|
1493 |
+
}
|
1494 |
+
// This is the best we can do.
|
1495 |
+
throw new SodiumException(
|
1496 |
+
'This is not implemented, as it is not possible to implement Argon2i with acceptable performance in pure-PHP'
|
1497 |
+
);
|
1498 |
+
}
|
1499 |
+
|
1500 |
+
/**
|
1501 |
+
* !Exclusive to sodium_compat!
|
1502 |
+
*
|
1503 |
+
* This returns TRUE if the native crypto_pwhash API is available by libsodium.
|
1504 |
+
* This returns FALSE if only sodium_compat is available.
|
1505 |
+
*
|
1506 |
+
* @return bool
|
1507 |
+
*/
|
1508 |
+
public static function crypto_pwhash_is_available()
|
1509 |
+
{
|
1510 |
+
if (self::isPhp72OrGreater()) {
|
1511 |
+
return true;
|
1512 |
+
}
|
1513 |
+
if (self::use_fallback('crypto_pwhash')) {
|
1514 |
+
return true;
|
1515 |
+
}
|
1516 |
+
return false;
|
1517 |
+
}
|
1518 |
+
|
1519 |
+
/**
|
1520 |
+
* @param string $passwd
|
1521 |
+
* @param int $opslimit
|
1522 |
+
* @param int $memlimit
|
1523 |
+
* @return string
|
1524 |
+
* @throws SodiumException
|
1525 |
+
* @throws TypeError
|
1526 |
+
* @psalm-suppress MixedArgument
|
1527 |
+
*/
|
1528 |
+
public static function crypto_pwhash_str($passwd, $opslimit, $memlimit)
|
1529 |
+
{
|
1530 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($passwd, 'string', 1);
|
1531 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($opslimit, 'int', 2);
|
1532 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($memlimit, 'int', 3);
|
1533 |
+
|
1534 |
+
if (self::isPhp72OrGreater()) {
|
1535 |
+
return sodium_crypto_pwhash_str($passwd, $opslimit, $memlimit);
|
1536 |
+
}
|
1537 |
+
if (self::use_fallback('crypto_pwhash_str')) {
|
1538 |
+
return (string) call_user_func('\\Sodium\\crypto_pwhash_str', $passwd, $opslimit, $memlimit);
|
1539 |
+
}
|
1540 |
+
// This is the best we can do.
|
1541 |
+
throw new SodiumException(
|
1542 |
+
'This is not implemented, as it is not possible to implement Argon2i with acceptable performance in pure-PHP'
|
1543 |
+
);
|
1544 |
+
}
|
1545 |
+
|
1546 |
+
/**
|
1547 |
+
* @param string $passwd
|
1548 |
+
* @param string $hash
|
1549 |
+
* @return bool
|
1550 |
+
* @throws SodiumException
|
1551 |
+
* @throws TypeError
|
1552 |
+
* @psalm-suppress MixedArgument
|
1553 |
+
*/
|
1554 |
+
public static function crypto_pwhash_str_verify($passwd, $hash)
|
1555 |
+
{
|
1556 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($passwd, 'string', 1);
|
1557 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($hash, 'string', 2);
|
1558 |
+
|
1559 |
+
if (self::isPhp72OrGreater()) {
|
1560 |
+
return (bool) sodium_crypto_pwhash_str_verify($passwd, $hash);
|
1561 |
+
}
|
1562 |
+
if (self::use_fallback('crypto_pwhash_str_verify')) {
|
1563 |
+
return (bool) call_user_func('\\Sodium\\crypto_pwhash_str_verify', $passwd, $hash);
|
1564 |
+
}
|
1565 |
+
// This is the best we can do.
|
1566 |
+
throw new SodiumException(
|
1567 |
+
'This is not implemented, as it is not possible to implement Argon2i with acceptable performance in pure-PHP'
|
1568 |
+
);
|
1569 |
+
}
|
1570 |
+
|
1571 |
+
/**
|
1572 |
+
* @param int $outlen
|
1573 |
+
* @param string $passwd
|
1574 |
+
* @param string $salt
|
1575 |
+
* @param int $opslimit
|
1576 |
+
* @param int $memlimit
|
1577 |
+
* @return string
|
1578 |
+
* @throws SodiumException
|
1579 |
+
* @throws TypeError
|
1580 |
+
*/
|
1581 |
+
public static function crypto_pwhash_scryptsalsa208sha256($outlen, $passwd, $salt, $opslimit, $memlimit)
|
1582 |
+
{
|
1583 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($outlen, 'int', 1);
|
1584 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($passwd, 'string', 2);
|
1585 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($salt, 'string', 3);
|
1586 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($opslimit, 'int', 4);
|
1587 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($memlimit, 'int', 5);
|
1588 |
+
|
1589 |
+
if (self::isPhp72OrGreater()) {
|
1590 |
+
return (string) sodium_crypto_pwhash_scryptsalsa208sha256($outlen, $passwd, $salt, $opslimit, $memlimit);
|
1591 |
+
}
|
1592 |
+
if (self::use_fallback('crypto_pwhash_scryptsalsa208sha256')) {
|
1593 |
+
return (string) call_user_func('\\Sodium\\crypto_pwhash_scryptsalsa208sha256', $outlen, $passwd, $salt, $opslimit, $memlimit);
|
1594 |
+
}
|
1595 |
+
// This is the best we can do.
|
1596 |
+
throw new SodiumException(
|
1597 |
+
'This is not implemented, as it is not possible to implement Scrypt with acceptable performance in pure-PHP'
|
1598 |
+
);
|
1599 |
+
}
|
1600 |
+
|
1601 |
+
/**
|
1602 |
+
* !Exclusive to sodium_compat!
|
1603 |
+
*
|
1604 |
+
* This returns TRUE if the native crypto_pwhash API is available by libsodium.
|
1605 |
+
* This returns FALSE if only sodium_compat is available.
|
1606 |
+
*
|
1607 |
+
* @return bool
|
1608 |
+
*/
|
1609 |
+
public static function crypto_pwhash_scryptsalsa208sha256_is_available()
|
1610 |
+
{
|
1611 |
+
if (self::isPhp72OrGreater()) {
|
1612 |
+
return true;
|
1613 |
+
}
|
1614 |
+
if (self::use_fallback('crypto_pwhash_scryptsalsa208sha256')) {
|
1615 |
+
return true;
|
1616 |
+
}
|
1617 |
+
return false;
|
1618 |
+
}
|
1619 |
+
|
1620 |
+
/**
|
1621 |
+
* @param string $passwd
|
1622 |
+
* @param int $opslimit
|
1623 |
+
* @param int $memlimit
|
1624 |
+
* @return string
|
1625 |
+
* @throws SodiumException
|
1626 |
+
* @throws TypeError
|
1627 |
+
*/
|
1628 |
+
public static function crypto_pwhash_scryptsalsa208sha256_str($passwd, $opslimit, $memlimit)
|
1629 |
+
{
|
1630 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($passwd, 'string', 1);
|
1631 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($opslimit, 'int', 2);
|
1632 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($memlimit, 'int', 3);
|
1633 |
+
|
1634 |
+
if (self::isPhp72OrGreater()) {
|
1635 |
+
return (string) sodium_crypto_pwhash_scryptsalsa208sha256_str($passwd, $opslimit, $memlimit);
|
1636 |
+
}
|
1637 |
+
if (self::use_fallback('crypto_pwhash_scryptsalsa208sha256_str')) {
|
1638 |
+
return (string) call_user_func('\\Sodium\\crypto_pwhash_scryptsalsa208sha256_str', $passwd, $opslimit, $memlimit);
|
1639 |
+
}
|
1640 |
+
// This is the best we can do.
|
1641 |
+
throw new SodiumException(
|
1642 |
+
'This is not implemented, as it is not possible to implement Scrypt with acceptable performance in pure-PHP'
|
1643 |
+
);
|
1644 |
+
}
|
1645 |
+
|
1646 |
+
/**
|
1647 |
+
* @param string $passwd
|
1648 |
+
* @param string $hash
|
1649 |
+
* @return bool
|
1650 |
+
* @throws SodiumException
|
1651 |
+
* @throws TypeError
|
1652 |
+
*/
|
1653 |
+
public static function crypto_pwhash_scryptsalsa208sha256_str_verify($passwd, $hash)
|
1654 |
+
{
|
1655 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($passwd, 'string', 1);
|
1656 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($hash, 'string', 2);
|
1657 |
+
|
1658 |
+
if (self::isPhp72OrGreater()) {
|
1659 |
+
return (bool) sodium_crypto_pwhash_scryptsalsa208sha256_str_verify($passwd, $hash);
|
1660 |
+
}
|
1661 |
+
if (self::use_fallback('crypto_pwhash_scryptsalsa208sha256_str_verify')) {
|
1662 |
+
return (bool) call_user_func('\\Sodium\\crypto_pwhash_scryptsalsa208sha256_str_verify', $passwd, $hash);
|
1663 |
+
}
|
1664 |
+
// This is the best we can do.
|
1665 |
+
throw new SodiumException(
|
1666 |
+
'This is not implemented, as it is not possible to implement Scrypt with acceptable performance in pure-PHP'
|
1667 |
+
);
|
1668 |
+
}
|
1669 |
+
|
1670 |
+
/**
|
1671 |
+
* Calculate the shared secret between your secret key and your
|
1672 |
+
* recipient's public key.
|
1673 |
+
*
|
1674 |
+
* Algorithm: X25519 (ECDH over Curve25519)
|
1675 |
+
*
|
1676 |
+
* @param string $secretKey
|
1677 |
+
* @param string $publicKey
|
1678 |
+
* @return string
|
1679 |
+
* @throws SodiumException
|
1680 |
+
* @throws TypeError
|
1681 |
+
* @psalm-suppress MixedArgument
|
1682 |
+
*/
|
1683 |
+
public static function crypto_scalarmult($secretKey, $publicKey)
|
1684 |
+
{
|
1685 |
+
/* Type checks: */
|
1686 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($secretKey, 'string', 1);
|
1687 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($publicKey, 'string', 2);
|
1688 |
+
|
1689 |
+
/* Input validation: */
|
1690 |
+
if (ParagonIE_Sodium_Core_Util::strlen($secretKey) !== self::CRYPTO_BOX_SECRETKEYBYTES) {
|
1691 |
+
throw new SodiumException('Argument 1 must be CRYPTO_BOX_SECRETKEYBYTES long.');
|
1692 |
+
}
|
1693 |
+
if (ParagonIE_Sodium_Core_Util::strlen($publicKey) !== self::CRYPTO_BOX_PUBLICKEYBYTES) {
|
1694 |
+
throw new SodiumException('Argument 2 must be CRYPTO_BOX_PUBLICKEYBYTES long.');
|
1695 |
+
}
|
1696 |
+
|
1697 |
+
if (self::isPhp72OrGreater()) {
|
1698 |
+
return sodium_crypto_scalarmult($secretKey, $publicKey);
|
1699 |
+
}
|
1700 |
+
if (self::use_fallback('crypto_scalarmult')) {
|
1701 |
+
return (string) call_user_func('\\Sodium\\crypto_scalarmult', $secretKey, $publicKey);
|
1702 |
+
}
|
1703 |
+
|
1704 |
+
/* Output validation: Forbid all-zero keys */
|
1705 |
+
if (ParagonIE_Sodium_Core_Util::hashEquals($secretKey, str_repeat("\0", self::CRYPTO_BOX_SECRETKEYBYTES))) {
|
1706 |
+
throw new SodiumException('Zero secret key is not allowed');
|
1707 |
+
}
|
1708 |
+
if (ParagonIE_Sodium_Core_Util::hashEquals($publicKey, str_repeat("\0", self::CRYPTO_BOX_PUBLICKEYBYTES))) {
|
1709 |
+
throw new SodiumException('Zero public key is not allowed');
|
1710 |
+
}
|
1711 |
+
if (PHP_INT_SIZE === 4) {
|
1712 |
+
return ParagonIE_Sodium_Crypto32::scalarmult($secretKey, $publicKey);
|
1713 |
+
}
|
1714 |
+
return ParagonIE_Sodium_Crypto::scalarmult($secretKey, $publicKey);
|
1715 |
+
}
|
1716 |
+
|
1717 |
+
/**
|
1718 |
+
* Calculate an X25519 public key from an X25519 secret key.
|
1719 |
+
*
|
1720 |
+
* @param string $secretKey
|
1721 |
+
* @return string
|
1722 |
+
* @throws SodiumException
|
1723 |
+
* @throws TypeError
|
1724 |
+
* @psalm-suppress TooFewArguments
|
1725 |
+
* @psalm-suppress MixedArgument
|
1726 |
+
*/
|
1727 |
+
public static function crypto_scalarmult_base($secretKey)
|
1728 |
+
{
|
1729 |
+
/* Type checks: */
|
1730 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($secretKey, 'string', 1);
|
1731 |
+
|
1732 |
+
/* Input validation: */
|
1733 |
+
if (ParagonIE_Sodium_Core_Util::strlen($secretKey) !== self::CRYPTO_BOX_SECRETKEYBYTES) {
|
1734 |
+
throw new SodiumException('Argument 1 must be CRYPTO_BOX_SECRETKEYBYTES long.');
|
1735 |
+
}
|
1736 |
+
|
1737 |
+
if (self::isPhp72OrGreater()) {
|
1738 |
+
return sodium_crypto_scalarmult_base($secretKey);
|
1739 |
+
}
|
1740 |
+
if (self::use_fallback('crypto_scalarmult_base')) {
|
1741 |
+
return (string) call_user_func('\\Sodium\\crypto_scalarmult_base', $secretKey);
|
1742 |
+
}
|
1743 |
+
if (ParagonIE_Sodium_Core_Util::hashEquals($secretKey, str_repeat("\0", self::CRYPTO_BOX_SECRETKEYBYTES))) {
|
1744 |
+
throw new SodiumException('Zero secret key is not allowed');
|
1745 |
+
}
|
1746 |
+
if (PHP_INT_SIZE === 4) {
|
1747 |
+
return ParagonIE_Sodium_Crypto32::scalarmult_base($secretKey);
|
1748 |
+
}
|
1749 |
+
return ParagonIE_Sodium_Crypto::scalarmult_base($secretKey);
|
1750 |
+
}
|
1751 |
+
|
1752 |
+
/**
|
1753 |
+
* Authenticated symmetric-key encryption.
|
1754 |
+
*
|
1755 |
+
* Algorithm: XSalsa20-Poly1305
|
1756 |
+
*
|
1757 |
+
* @param string $plaintext The message you're encrypting
|
1758 |
+
* @param string $nonce A Number to be used Once; must be 24 bytes
|
1759 |
+
* @param string $key Symmetric encryption key
|
1760 |
+
* @return string Ciphertext with Poly1305 MAC
|
1761 |
+
* @throws SodiumException
|
1762 |
+
* @throws TypeError
|
1763 |
+
* @psalm-suppress MixedArgument
|
1764 |
+
*/
|
1765 |
+
public static function crypto_secretbox($plaintext, $nonce, $key)
|
1766 |
+
{
|
1767 |
+
/* Type checks: */
|
1768 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($plaintext, 'string', 1);
|
1769 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($nonce, 'string', 2);
|
1770 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($key, 'string', 3);
|
1771 |
+
|
1772 |
+
/* Input validation: */
|
1773 |
+
if (ParagonIE_Sodium_Core_Util::strlen($nonce) !== self::CRYPTO_SECRETBOX_NONCEBYTES) {
|
1774 |
+
throw new SodiumException('Argument 2 must be CRYPTO_SECRETBOX_NONCEBYTES long.');
|
1775 |
+
}
|
1776 |
+
if (ParagonIE_Sodium_Core_Util::strlen($key) !== self::CRYPTO_SECRETBOX_KEYBYTES) {
|
1777 |
+
throw new SodiumException('Argument 3 must be CRYPTO_SECRETBOX_KEYBYTES long.');
|
1778 |
+
}
|
1779 |
+
|
1780 |
+
if (self::isPhp72OrGreater()) {
|
1781 |
+
return sodium_crypto_secretbox($plaintext, $nonce, $key);
|
1782 |
+
}
|
1783 |
+
if (self::use_fallback('crypto_secretbox')) {
|
1784 |
+
return (string) call_user_func('\\Sodium\\crypto_secretbox', $plaintext, $nonce, $key);
|
1785 |
+
}
|
1786 |
+
if (PHP_INT_SIZE === 4) {
|
1787 |
+
return ParagonIE_Sodium_Crypto32::secretbox($plaintext, $nonce, $key);
|
1788 |
+
}
|
1789 |
+
return ParagonIE_Sodium_Crypto::secretbox($plaintext, $nonce, $key);
|
1790 |
+
}
|
1791 |
+
|
1792 |
+
/**
|
1793 |
+
* Decrypts a message previously encrypted with crypto_secretbox().
|
1794 |
+
*
|
1795 |
+
* @param string $ciphertext Ciphertext with Poly1305 MAC
|
1796 |
+
* @param string $nonce A Number to be used Once; must be 24 bytes
|
1797 |
+
* @param string $key Symmetric encryption key
|
1798 |
+
* @return string Original plaintext message
|
1799 |
+
* @throws SodiumException
|
1800 |
+
* @throws TypeError
|
1801 |
+
* @psalm-suppress MixedArgument
|
1802 |
+
* @psalm-suppress MixedInferredReturnType
|
1803 |
+
* @psalm-suppress MixedReturnStatement
|
1804 |
+
*/
|
1805 |
+
public static function crypto_secretbox_open($ciphertext, $nonce, $key)
|
1806 |
+
{
|
1807 |
+
/* Type checks: */
|
1808 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($ciphertext, 'string', 1);
|
1809 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($nonce, 'string', 2);
|
1810 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($key, 'string', 3);
|
1811 |
+
|
1812 |
+
/* Input validation: */
|
1813 |
+
if (ParagonIE_Sodium_Core_Util::strlen($nonce) !== self::CRYPTO_SECRETBOX_NONCEBYTES) {
|
1814 |
+
throw new SodiumException('Argument 2 must be CRYPTO_SECRETBOX_NONCEBYTES long.');
|
1815 |
+
}
|
1816 |
+
if (ParagonIE_Sodium_Core_Util::strlen($key) !== self::CRYPTO_SECRETBOX_KEYBYTES) {
|
1817 |
+
throw new SodiumException('Argument 3 must be CRYPTO_SECRETBOX_KEYBYTES long.');
|
1818 |
+
}
|
1819 |
+
|
1820 |
+
if (self::isPhp72OrGreater()) {
|
1821 |
+
/**
|
1822 |
+
* @psalm-suppress InvalidReturnStatement
|
1823 |
+
* @psalm-suppress FalsableReturnStatement
|
1824 |
+
*/
|
1825 |
+
return sodium_crypto_secretbox_open($ciphertext, $nonce, $key);
|
1826 |
+
}
|
1827 |
+
if (self::use_fallback('crypto_secretbox_open')) {
|
1828 |
+
return call_user_func('\\Sodium\\crypto_secretbox_open', $ciphertext, $nonce, $key);
|
1829 |
+
}
|
1830 |
+
if (PHP_INT_SIZE === 4) {
|
1831 |
+
return ParagonIE_Sodium_Crypto32::secretbox_open($ciphertext, $nonce, $key);
|
1832 |
+
}
|
1833 |
+
return ParagonIE_Sodium_Crypto::secretbox_open($ciphertext, $nonce, $key);
|
1834 |
+
}
|
1835 |
+
|
1836 |
+
/**
|
1837 |
+
* Return a secure random key for use with crypto_secretbox
|
1838 |
+
*
|
1839 |
+
* @return string
|
1840 |
+
*/
|
1841 |
+
public static function crypto_secretbox_keygen()
|
1842 |
+
{
|
1843 |
+
return random_bytes(self::CRYPTO_SECRETBOX_KEYBYTES);
|
1844 |
+
}
|
1845 |
+
|
1846 |
+
/**
|
1847 |
+
* Authenticated symmetric-key encryption.
|
1848 |
+
*
|
1849 |
+
* Algorithm: XChaCha20-Poly1305
|
1850 |
+
*
|
1851 |
+
* @param string $plaintext The message you're encrypting
|
1852 |
+
* @param string $nonce A Number to be used Once; must be 24 bytes
|
1853 |
+
* @param string $key Symmetric encryption key
|
1854 |
+
* @return string Ciphertext with Poly1305 MAC
|
1855 |
+
* @throws SodiumException
|
1856 |
+
* @throws TypeError
|
1857 |
+
* @psalm-suppress MixedArgument
|
1858 |
+
*/
|
1859 |
+
public static function crypto_secretbox_xchacha20poly1305($plaintext, $nonce, $key)
|
1860 |
+
{
|
1861 |
+
/* Type checks: */
|
1862 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($plaintext, 'string', 1);
|
1863 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($nonce, 'string', 2);
|
1864 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($key, 'string', 3);
|
1865 |
+
|
1866 |
+
/* Input validation: */
|
1867 |
+
if (ParagonIE_Sodium_Core_Util::strlen($nonce) !== self::CRYPTO_SECRETBOX_NONCEBYTES) {
|
1868 |
+
throw new SodiumException('Argument 2 must be CRYPTO_SECRETBOX_NONCEBYTES long.');
|
1869 |
+
}
|
1870 |
+
if (ParagonIE_Sodium_Core_Util::strlen($key) !== self::CRYPTO_SECRETBOX_KEYBYTES) {
|
1871 |
+
throw new SodiumException('Argument 3 must be CRYPTO_SECRETBOX_KEYBYTES long.');
|
1872 |
+
}
|
1873 |
+
if (PHP_INT_SIZE === 4) {
|
1874 |
+
return ParagonIE_Sodium_Crypto32::secretbox_xchacha20poly1305($plaintext, $nonce, $key);
|
1875 |
+
}
|
1876 |
+
return ParagonIE_Sodium_Crypto::secretbox_xchacha20poly1305($plaintext, $nonce, $key);
|
1877 |
+
}
|
1878 |
+
/**
|
1879 |
+
* Decrypts a message previously encrypted with crypto_secretbox_xchacha20poly1305().
|
1880 |
+
*
|
1881 |
+
* @param string $ciphertext Ciphertext with Poly1305 MAC
|
1882 |
+
* @param string $nonce A Number to be used Once; must be 24 bytes
|
1883 |
+
* @param string $key Symmetric encryption key
|
1884 |
+
* @return string Original plaintext message
|
1885 |
+
* @throws SodiumException
|
1886 |
+
* @throws TypeError
|
1887 |
+
* @psalm-suppress MixedArgument
|
1888 |
+
*/
|
1889 |
+
public static function crypto_secretbox_xchacha20poly1305_open($ciphertext, $nonce, $key)
|
1890 |
+
{
|
1891 |
+
/* Type checks: */
|
1892 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($ciphertext, 'string', 1);
|
1893 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($nonce, 'string', 2);
|
1894 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($key, 'string', 3);
|
1895 |
+
|
1896 |
+
/* Input validation: */
|
1897 |
+
if (ParagonIE_Sodium_Core_Util::strlen($nonce) !== self::CRYPTO_SECRETBOX_NONCEBYTES) {
|
1898 |
+
throw new SodiumException('Argument 2 must be CRYPTO_SECRETBOX_NONCEBYTES long.');
|
1899 |
+
}
|
1900 |
+
if (ParagonIE_Sodium_Core_Util::strlen($key) !== self::CRYPTO_SECRETBOX_KEYBYTES) {
|
1901 |
+
throw new SodiumException('Argument 3 must be CRYPTO_SECRETBOX_KEYBYTES long.');
|
1902 |
+
}
|
1903 |
+
|
1904 |
+
if (PHP_INT_SIZE === 4) {
|
1905 |
+
return ParagonIE_Sodium_Crypto32::secretbox_xchacha20poly1305_open($ciphertext, $nonce, $key);
|
1906 |
+
}
|
1907 |
+
return ParagonIE_Sodium_Crypto::secretbox_xchacha20poly1305_open($ciphertext, $nonce, $key);
|
1908 |
+
}
|
1909 |
+
|
1910 |
+
/**
|
1911 |
+
* Calculates a SipHash-2-4 hash of a message for a given key.
|
1912 |
+
*
|
1913 |
+
* @param string $message Input message
|
1914 |
+
* @param string $key SipHash-2-4 key
|
1915 |
+
* @return string Hash
|
1916 |
+
* @throws SodiumException
|
1917 |
+
* @throws TypeError
|
1918 |
+
* @psalm-suppress MixedArgument
|
1919 |
+
* @psalm-suppress MixedInferredReturnType
|
1920 |
+
* @psalm-suppress MixedReturnStatement
|
1921 |
+
*/
|
1922 |
+
public static function crypto_shorthash($message, $key)
|
1923 |
+
{
|
1924 |
+
/* Type checks: */
|
1925 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($message, 'string', 1);
|
1926 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($key, 'string', 2);
|
1927 |
+
|
1928 |
+
/* Input validation: */
|
1929 |
+
if (ParagonIE_Sodium_Core_Util::strlen($key) !== self::CRYPTO_SHORTHASH_KEYBYTES) {
|
1930 |
+
throw new SodiumException('Argument 2 must be CRYPTO_SHORTHASH_KEYBYTES long.');
|
1931 |
+
}
|
1932 |
+
|
1933 |
+
if (self::isPhp72OrGreater()) {
|
1934 |
+
return sodium_crypto_shorthash($message, $key);
|
1935 |
+
}
|
1936 |
+
if (self::use_fallback('crypto_shorthash')) {
|
1937 |
+
return (string) call_user_func('\\Sodium\\crypto_shorthash', $message, $key);
|
1938 |
+
}
|
1939 |
+
if (PHP_INT_SIZE === 4) {
|
1940 |
+
return ParagonIE_Sodium_Core32_SipHash::sipHash24($message, $key);
|
1941 |
+
}
|
1942 |
+
return ParagonIE_Sodium_Core_SipHash::sipHash24($message, $key);
|
1943 |
+
}
|
1944 |
+
|
1945 |
+
/**
|
1946 |
+
* Return a secure random key for use with crypto_shorthash
|
1947 |
+
*
|
1948 |
+
* @return string
|
1949 |
+
*/
|
1950 |
+
public static function crypto_shorthash_keygen()
|
1951 |
+
{
|
1952 |
+
return random_bytes(self::CRYPTO_SHORTHASH_KEYBYTES);
|
1953 |
+
}
|
1954 |
+
|
1955 |
+
/**
|
1956 |
+
* Returns a signed message. You probably want crypto_sign_detached()
|
1957 |
+
* instead, which only returns the signature.
|
1958 |
+
*
|
1959 |
+
* Algorithm: Ed25519 (EdDSA over Curve25519)
|
1960 |
+
*
|
1961 |
+
* @param string $message Message to be signed.
|
1962 |
+
* @param string $secretKey Secret signing key.
|
1963 |
+
* @return string Signed message (signature is prefixed).
|
1964 |
+
* @throws SodiumException
|
1965 |
+
* @throws TypeError
|
1966 |
+
* @psalm-suppress MixedArgument
|
1967 |
+
* @psalm-suppress MixedInferredReturnType
|
1968 |
+
* @psalm-suppress MixedReturnStatement
|
1969 |
+
*/
|
1970 |
+
public static function crypto_sign($message, $secretKey)
|
1971 |
+
{
|
1972 |
+
/* Type checks: */
|
1973 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($message, 'string', 1);
|
1974 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($secretKey, 'string', 2);
|
1975 |
+
|
1976 |
+
/* Input validation: */
|
1977 |
+
if (ParagonIE_Sodium_Core_Util::strlen($secretKey) !== self::CRYPTO_SIGN_SECRETKEYBYTES) {
|
1978 |
+
throw new SodiumException('Argument 2 must be CRYPTO_SIGN_SECRETKEYBYTES long.');
|
1979 |
+
}
|
1980 |
+
|
1981 |
+
if (self::isPhp72OrGreater()) {
|
1982 |
+
return sodium_crypto_sign($message, $secretKey);
|
1983 |
+
}
|
1984 |
+
if (self::use_fallback('crypto_sign')) {
|
1985 |
+
return (string) call_user_func('\\Sodium\\crypto_sign', $message, $secretKey);
|
1986 |
+
}
|
1987 |
+
if (PHP_INT_SIZE === 4) {
|
1988 |
+
return ParagonIE_Sodium_Crypto32::sign($message, $secretKey);
|
1989 |
+
}
|
1990 |
+
return ParagonIE_Sodium_Crypto::sign($message, $secretKey);
|
1991 |
+
}
|
1992 |
+
|
1993 |
+
/**
|
1994 |
+
* Validates a signed message then returns the message.
|
1995 |
+
*
|
1996 |
+
* @param string $signedMessage A signed message
|
1997 |
+
* @param string $publicKey A public key
|
1998 |
+
* @return string The original message (if the signature is
|
1999 |
+
* valid for this public key)
|
2000 |
+
* @throws SodiumException
|
2001 |
+
* @throws TypeError
|
2002 |
+
* @psalm-suppress MixedArgument
|
2003 |
+
* @psalm-suppress MixedInferredReturnType
|
2004 |
+
* @psalm-suppress MixedReturnStatement
|
2005 |
+
*/
|
2006 |
+
public static function crypto_sign_open($signedMessage, $publicKey)
|
2007 |
+
{
|
2008 |
+
/* Type checks: */
|
2009 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($signedMessage, 'string', 1);
|
2010 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($publicKey, 'string', 2);
|
2011 |
+
|
2012 |
+
/* Input validation: */
|
2013 |
+
if (ParagonIE_Sodium_Core_Util::strlen($signedMessage) < self::CRYPTO_SIGN_BYTES) {
|
2014 |
+
throw new SodiumException('Argument 1 must be at least CRYPTO_SIGN_BYTES long.');
|
2015 |
+
}
|
2016 |
+
if (ParagonIE_Sodium_Core_Util::strlen($publicKey) !== self::CRYPTO_SIGN_PUBLICKEYBYTES) {
|
2017 |
+
throw new SodiumException('Argument 2 must be CRYPTO_SIGN_PUBLICKEYBYTES long.');
|
2018 |
+
}
|
2019 |
+
|
2020 |
+
if (self::isPhp72OrGreater()) {
|
2021 |
+
/**
|
2022 |
+
* @psalm-suppress InvalidReturnStatement
|
2023 |
+
* @psalm-suppress FalsableReturnStatement
|
2024 |
+
*/
|
2025 |
+
return sodium_crypto_sign_open($signedMessage, $publicKey);
|
2026 |
+
}
|
2027 |
+
if (self::use_fallback('crypto_sign_open')) {
|
2028 |
+
return call_user_func('\\Sodium\\crypto_sign_open', $signedMessage, $publicKey);
|
2029 |
+
}
|
2030 |
+
if (PHP_INT_SIZE === 4) {
|
2031 |
+
return ParagonIE_Sodium_Crypto32::sign_open($signedMessage, $publicKey);
|
2032 |
+
}
|
2033 |
+
return ParagonIE_Sodium_Crypto::sign_open($signedMessage, $publicKey);
|
2034 |
+
}
|
2035 |
+
|
2036 |
+
/**
|
2037 |
+
* Generate a new random Ed25519 keypair.
|
2038 |
+
*
|
2039 |
+
* @return string
|
2040 |
+
* @throws SodiumException
|
2041 |
+
* @throws TypeError
|
2042 |
+
*/
|
2043 |
+
public static function crypto_sign_keypair()
|
2044 |
+
{
|
2045 |
+
if (self::isPhp72OrGreater()) {
|
2046 |
+
return sodium_crypto_sign_keypair();
|
2047 |
+
}
|
2048 |
+
if (self::use_fallback('crypto_sign_keypair')) {
|
2049 |
+
return (string) call_user_func('\\Sodium\\crypto_sign_keypair');
|
2050 |
+
}
|
2051 |
+
if (PHP_INT_SIZE === 4) {
|
2052 |
+
return ParagonIE_Sodium_Core32_Ed25519::keypair();
|
2053 |
+
}
|
2054 |
+
return ParagonIE_Sodium_Core_Ed25519::keypair();
|
2055 |
+
}
|
2056 |
+
|
2057 |
+
/**
|
2058 |
+
* Generate an Ed25519 keypair from a seed.
|
2059 |
+
*
|
2060 |
+
* @param string $seed Input seed
|
2061 |
+
* @return string Keypair
|
2062 |
+
* @throws SodiumException
|
2063 |
+
* @throws TypeError
|
2064 |
+
* @psalm-suppress MixedArgument
|
2065 |
+
*/
|
2066 |
+
public static function crypto_sign_seed_keypair($seed)
|
2067 |
+
{
|
2068 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($seed, 'string', 1);
|
2069 |
+
|
2070 |
+
if (self::isPhp72OrGreater()) {
|
2071 |
+
return sodium_crypto_sign_seed_keypair($seed);
|
2072 |
+
}
|
2073 |
+
if (self::use_fallback('crypto_sign_keypair')) {
|
2074 |
+
return (string) call_user_func('\\Sodium\\crypto_sign_seed_keypair', $seed);
|
2075 |
+
}
|
2076 |
+
$publicKey = '';
|
2077 |
+
$secretKey = '';
|
2078 |
+
if (PHP_INT_SIZE === 4) {
|
2079 |
+
ParagonIE_Sodium_Core32_Ed25519::seed_keypair($publicKey, $secretKey, $seed);
|
2080 |
+
} else {
|
2081 |
+
ParagonIE_Sodium_Core_Ed25519::seed_keypair($publicKey, $secretKey, $seed);
|
2082 |
+
}
|
2083 |
+
return $secretKey . $publicKey;
|
2084 |
+
}
|
2085 |
+
|
2086 |
+
/**
|
2087 |
+
* Extract an Ed25519 public key from an Ed25519 keypair.
|
2088 |
+
*
|
2089 |
+
* @param string $keypair Keypair
|
2090 |
+
* @return string Public key
|
2091 |
+
* @throws SodiumException
|
2092 |
+
* @throws TypeError
|
2093 |
+
* @psalm-suppress MixedArgument
|
2094 |
+
*/
|
2095 |
+
public static function crypto_sign_publickey($keypair)
|
2096 |
+
{
|
2097 |
+
/* Type checks: */
|
2098 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($keypair, 'string', 1);
|
2099 |
+
|
2100 |
+
/* Input validation: */
|
2101 |
+
if (ParagonIE_Sodium_Core_Util::strlen($keypair) !== self::CRYPTO_SIGN_KEYPAIRBYTES) {
|
2102 |
+
throw new SodiumException('Argument 1 must be CRYPTO_SIGN_KEYPAIRBYTES long.');
|
2103 |
+
}
|
2104 |
+
|
2105 |
+
if (self::isPhp72OrGreater()) {
|
2106 |
+
return sodium_crypto_sign_publickey($keypair);
|
2107 |
+
}
|
2108 |
+
if (self::use_fallback('crypto_sign_publickey')) {
|
2109 |
+
return (string) call_user_func('\\Sodium\\crypto_sign_publickey', $keypair);
|
2110 |
+
}
|
2111 |
+
if (PHP_INT_SIZE === 4) {
|
2112 |
+
return ParagonIE_Sodium_Core32_Ed25519::publickey($keypair);
|
2113 |
+
}
|
2114 |
+
return ParagonIE_Sodium_Core_Ed25519::publickey($keypair);
|
2115 |
+
}
|
2116 |
+
|
2117 |
+
/**
|
2118 |
+
* Calculate an Ed25519 public key from an Ed25519 secret key.
|
2119 |
+
*
|
2120 |
+
* @param string $secretKey Your Ed25519 secret key
|
2121 |
+
* @return string The corresponding Ed25519 public key
|
2122 |
+
* @throws SodiumException
|
2123 |
+
* @throws TypeError
|
2124 |
+
* @psalm-suppress MixedArgument
|
2125 |
+
*/
|
2126 |
+
public static function crypto_sign_publickey_from_secretkey($secretKey)
|
2127 |
+
{
|
2128 |
+
/* Type checks: */
|
2129 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($secretKey, 'string', 1);
|
2130 |
+
|
2131 |
+
/* Input validation: */
|
2132 |
+
if (ParagonIE_Sodium_Core_Util::strlen($secretKey) !== self::CRYPTO_SIGN_SECRETKEYBYTES) {
|
2133 |
+
throw new SodiumException('Argument 1 must be CRYPTO_SIGN_SECRETKEYBYTES long.');
|
2134 |
+
}
|
2135 |
+
|
2136 |
+
if (self::isPhp72OrGreater()) {
|
2137 |
+
return sodium_crypto_sign_publickey_from_secretkey($secretKey);
|
2138 |
+
}
|
2139 |
+
if (self::use_fallback('crypto_sign_publickey_from_secretkey')) {
|
2140 |
+
return (string) call_user_func('\\Sodium\\crypto_sign_publickey_from_secretkey', $secretKey);
|
2141 |
+
}
|
2142 |
+
if (PHP_INT_SIZE === 4) {
|
2143 |
+
return ParagonIE_Sodium_Core32_Ed25519::publickey_from_secretkey($secretKey);
|
2144 |
+
}
|
2145 |
+
return ParagonIE_Sodium_Core_Ed25519::publickey_from_secretkey($secretKey);
|
2146 |
+
}
|
2147 |
+
|
2148 |
+
/**
|
2149 |
+
* Extract an Ed25519 secret key from an Ed25519 keypair.
|
2150 |
+
*
|
2151 |
+
* @param string $keypair Keypair
|
2152 |
+
* @return string Secret key
|
2153 |
+
* @throws SodiumException
|
2154 |
+
* @throws TypeError
|
2155 |
+
* @psalm-suppress MixedArgument
|
2156 |
+
*/
|
2157 |
+
public static function crypto_sign_secretkey($keypair)
|
2158 |
+
{
|
2159 |
+
/* Type checks: */
|
2160 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($keypair, 'string', 1);
|
2161 |
+
|
2162 |
+
/* Input validation: */
|
2163 |
+
if (ParagonIE_Sodium_Core_Util::strlen($keypair) !== self::CRYPTO_SIGN_KEYPAIRBYTES) {
|
2164 |
+
throw new SodiumException('Argument 1 must be CRYPTO_SIGN_KEYPAIRBYTES long.');
|
2165 |
+
}
|
2166 |
+
|
2167 |
+
if (self::isPhp72OrGreater()) {
|
2168 |
+
return sodium_crypto_sign_secretkey($keypair);
|
2169 |
+
}
|
2170 |
+
if (self::use_fallback('crypto_sign_secretkey')) {
|
2171 |
+
return (string) call_user_func('\\Sodium\\crypto_sign_secretkey', $keypair);
|
2172 |
+
}
|
2173 |
+
if (PHP_INT_SIZE === 4) {
|
2174 |
+
return ParagonIE_Sodium_Core32_Ed25519::secretkey($keypair);
|
2175 |
+
}
|
2176 |
+
return ParagonIE_Sodium_Core_Ed25519::secretkey($keypair);
|
2177 |
+
}
|
2178 |
+
|
2179 |
+
/**
|
2180 |
+
* Calculate the Ed25519 signature of a message and return ONLY the signature.
|
2181 |
+
*
|
2182 |
+
* Algorithm: Ed25519 (EdDSA over Curve25519)
|
2183 |
+
*
|
2184 |
+
* @param string $message Message to be signed
|
2185 |
+
* @param string $secretKey Secret signing key
|
2186 |
+
* @return string Digital signature
|
2187 |
+
* @throws SodiumException
|
2188 |
+
* @throws TypeError
|
2189 |
+
* @psalm-suppress MixedArgument
|
2190 |
+
*/
|
2191 |
+
public static function crypto_sign_detached($message, $secretKey)
|
2192 |
+
{
|
2193 |
+
/* Type checks: */
|
2194 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($message, 'string', 1);
|
2195 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($secretKey, 'string', 2);
|
2196 |
+
|
2197 |
+
/* Input validation: */
|
2198 |
+
if (ParagonIE_Sodium_Core_Util::strlen($secretKey) !== self::CRYPTO_SIGN_SECRETKEYBYTES) {
|
2199 |
+
throw new SodiumException('Argument 2 must be CRYPTO_SIGN_SECRETKEYBYTES long.');
|
2200 |
+
}
|
2201 |
+
|
2202 |
+
if (self::isPhp72OrGreater()) {
|
2203 |
+
return sodium_crypto_sign_detached($message, $secretKey);
|
2204 |
+
}
|
2205 |
+
if (self::use_fallback('crypto_sign_detached')) {
|
2206 |
+
return (string) call_user_func('\\Sodium\\crypto_sign_detached', $message, $secretKey);
|
2207 |
+
}
|
2208 |
+
if (PHP_INT_SIZE === 4) {
|
2209 |
+
return ParagonIE_Sodium_Crypto32::sign_detached($message, $secretKey);
|
2210 |
+
}
|
2211 |
+
return ParagonIE_Sodium_Crypto::sign_detached($message, $secretKey);
|
2212 |
+
}
|
2213 |
+
|
2214 |
+
/**
|
2215 |
+
* Verify the Ed25519 signature of a message.
|
2216 |
+
*
|
2217 |
+
* @param string $signature Digital sginature
|
2218 |
+
* @param string $message Message to be verified
|
2219 |
+
* @param string $publicKey Public key
|
2220 |
+
* @return bool TRUE if this signature is good for this public key;
|
2221 |
+
* FALSE otherwise
|
2222 |
+
* @throws SodiumException
|
2223 |
+
* @throws TypeError
|
2224 |
+
* @psalm-suppress MixedArgument
|
2225 |
+
*/
|
2226 |
+
public static function crypto_sign_verify_detached($signature, $message, $publicKey)
|
2227 |
+
{
|
2228 |
+
/* Type checks: */
|
2229 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($signature, 'string', 1);
|
2230 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($message, 'string', 2);
|
2231 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($publicKey, 'string', 3);
|
2232 |
+
|
2233 |
+
/* Input validation: */
|
2234 |
+
if (ParagonIE_Sodium_Core_Util::strlen($signature) !== self::CRYPTO_SIGN_BYTES) {
|
2235 |
+
throw new SodiumException('Argument 1 must be CRYPTO_SIGN_BYTES long.');
|
2236 |
+
}
|
2237 |
+
if (ParagonIE_Sodium_Core_Util::strlen($publicKey) !== self::CRYPTO_SIGN_PUBLICKEYBYTES) {
|
2238 |
+
throw new SodiumException('Argument 3 must be CRYPTO_SIGN_PUBLICKEYBYTES long.');
|
2239 |
+
}
|
2240 |
+
|
2241 |
+
if (self::isPhp72OrGreater()) {
|
2242 |
+
return sodium_crypto_sign_verify_detached($signature, $message, $publicKey);
|
2243 |
+
}
|
2244 |
+
if (self::use_fallback('crypto_sign_verify_detached')) {
|
2245 |
+
return (bool) call_user_func('\\Sodium\\crypto_sign_verify_detached', $signature, $message, $publicKey);
|
2246 |
+
}
|
2247 |
+
if (PHP_INT_SIZE === 4) {
|
2248 |
+
return ParagonIE_Sodium_Crypto32::sign_verify_detached($signature, $message, $publicKey);
|
2249 |
+
}
|
2250 |
+
return ParagonIE_Sodium_Crypto::sign_verify_detached($signature, $message, $publicKey);
|
2251 |
+
}
|
2252 |
+
|
2253 |
+
/**
|
2254 |
+
* Convert an Ed25519 public key to a Curve25519 public key
|
2255 |
+
*
|
2256 |
+
* @param string $pk
|
2257 |
+
* @return string
|
2258 |
+
* @throws SodiumException
|
2259 |
+
* @throws TypeError
|
2260 |
+
* @psalm-suppress MixedArgument
|
2261 |
+
*/
|
2262 |
+
public static function crypto_sign_ed25519_pk_to_curve25519($pk)
|
2263 |
+
{
|
2264 |
+
/* Type checks: */
|
2265 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($pk, 'string', 1);
|
2266 |
+
|
2267 |
+
/* Input validation: */
|
2268 |
+
if (ParagonIE_Sodium_Core_Util::strlen($pk) < self::CRYPTO_SIGN_PUBLICKEYBYTES) {
|
2269 |
+
throw new SodiumException('Argument 1 must be at least CRYPTO_SIGN_PUBLICKEYBYTES long.');
|
2270 |
+
}
|
2271 |
+
if (self::isPhp72OrGreater()) {
|
2272 |
+
if (is_callable('crypto_sign_ed25519_pk_to_curve25519')) {
|
2273 |
+
return (string) sodium_crypto_sign_ed25519_pk_to_curve25519($pk);
|
2274 |
+
}
|
2275 |
+
}
|
2276 |
+
if (self::use_fallback('crypto_sign_ed25519_pk_to_curve25519')) {
|
2277 |
+
return (string) call_user_func('\\Sodium\\crypto_sign_ed25519_pk_to_curve25519', $pk);
|
2278 |
+
}
|
2279 |
+
if (PHP_INT_SIZE === 4) {
|
2280 |
+
return ParagonIE_Sodium_Core32_Ed25519::pk_to_curve25519($pk);
|
2281 |
+
}
|
2282 |
+
return ParagonIE_Sodium_Core_Ed25519::pk_to_curve25519($pk);
|
2283 |
+
}
|
2284 |
+
|
2285 |
+
/**
|
2286 |
+
* Convert an Ed25519 secret key to a Curve25519 secret key
|
2287 |
+
*
|
2288 |
+
* @param string $sk
|
2289 |
+
* @return string
|
2290 |
+
* @throws SodiumException
|
2291 |
+
* @throws TypeError
|
2292 |
+
* @psalm-suppress MixedArgument
|
2293 |
+
*/
|
2294 |
+
public static function crypto_sign_ed25519_sk_to_curve25519($sk)
|
2295 |
+
{
|
2296 |
+
/* Type checks: */
|
2297 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($sk, 'string', 1);
|
2298 |
+
|
2299 |
+
/* Input validation: */
|
2300 |
+
if (ParagonIE_Sodium_Core_Util::strlen($sk) < self::CRYPTO_SIGN_SEEDBYTES) {
|
2301 |
+
throw new SodiumException('Argument 1 must be at least CRYPTO_SIGN_SEEDBYTES long.');
|
2302 |
+
}
|
2303 |
+
if (self::isPhp72OrGreater()) {
|
2304 |
+
if (is_callable('crypto_sign_ed25519_sk_to_curve25519')) {
|
2305 |
+
return sodium_crypto_sign_ed25519_sk_to_curve25519($sk);
|
2306 |
+
}
|
2307 |
+
}
|
2308 |
+
if (self::use_fallback('crypto_sign_ed25519_sk_to_curve25519')) {
|
2309 |
+
return (string) call_user_func('\\Sodium\\crypto_sign_ed25519_sk_to_curve25519', $sk);
|
2310 |
+
}
|
2311 |
+
|
2312 |
+
$h = hash('sha512', ParagonIE_Sodium_Core_Util::substr($sk, 0, 32), true);
|
2313 |
+
$h[0] = ParagonIE_Sodium_Core_Util::intToChr(
|
2314 |
+
ParagonIE_Sodium_Core_Util::chrToInt($h[0]) & 248
|
2315 |
+
);
|
2316 |
+
$h[31] = ParagonIE_Sodium_Core_Util::intToChr(
|
2317 |
+
(ParagonIE_Sodium_Core_Util::chrToInt($h[31]) & 127) | 64
|
2318 |
+
);
|
2319 |
+
return ParagonIE_Sodium_Core_Util::substr($h, 0, 32);
|
2320 |
+
}
|
2321 |
+
|
2322 |
+
/**
|
2323 |
+
* Expand a key and nonce into a keystream of pseudorandom bytes.
|
2324 |
+
*
|
2325 |
+
* @param int $len Number of bytes desired
|
2326 |
+
* @param string $nonce Number to be used Once; must be 24 bytes
|
2327 |
+
* @param string $key XSalsa20 key
|
2328 |
+
* @return string Pseudorandom stream that can be XORed with messages
|
2329 |
+
* to provide encryption (but not authentication; see
|
2330 |
+
* Poly1305 or crypto_auth() for that, which is not
|
2331 |
+
* optional for security)
|
2332 |
+
* @throws SodiumException
|
2333 |
+
* @throws TypeError
|
2334 |
+
* @psalm-suppress MixedArgument
|
2335 |
+
*/
|
2336 |
+
public static function crypto_stream($len, $nonce, $key)
|
2337 |
+
{
|
2338 |
+
/* Type checks: */
|
2339 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($len, 'int', 1);
|
2340 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($nonce, 'string', 2);
|
2341 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($key, 'string', 3);
|
2342 |
+
|
2343 |
+
/* Input validation: */
|
2344 |
+
if (ParagonIE_Sodium_Core_Util::strlen($nonce) !== self::CRYPTO_STREAM_NONCEBYTES) {
|
2345 |
+
throw new SodiumException('Argument 2 must be CRYPTO_SECRETBOX_NONCEBYTES long.');
|
2346 |
+
}
|
2347 |
+
if (ParagonIE_Sodium_Core_Util::strlen($key) !== self::CRYPTO_STREAM_KEYBYTES) {
|
2348 |
+
throw new SodiumException('Argument 3 must be CRYPTO_STREAM_KEYBYTES long.');
|
2349 |
+
}
|
2350 |
+
|
2351 |
+
if (self::isPhp72OrGreater()) {
|
2352 |
+
return sodium_crypto_stream($len, $nonce, $key);
|
2353 |
+
}
|
2354 |
+
if (self::use_fallback('crypto_stream')) {
|
2355 |
+
return (string) call_user_func('\\Sodium\\crypto_stream', $len, $nonce, $key);
|
2356 |
+
}
|
2357 |
+
if (PHP_INT_SIZE === 4) {
|
2358 |
+
return ParagonIE_Sodium_Core32_XSalsa20::xsalsa20($len, $nonce, $key);
|
2359 |
+
}
|
2360 |
+
return ParagonIE_Sodium_Core_XSalsa20::xsalsa20($len, $nonce, $key);
|
2361 |
+
}
|
2362 |
+
|
2363 |
+
/**
|
2364 |
+
* DANGER! UNAUTHENTICATED ENCRYPTION!
|
2365 |
+
*
|
2366 |
+
* Unless you are following expert advice, do not used this feature.
|
2367 |
+
*
|
2368 |
+
* Algorithm: XSalsa20
|
2369 |
+
*
|
2370 |
+
* This DOES NOT provide ciphertext integrity.
|
2371 |
+
*
|
2372 |
+
* @param string $message Plaintext message
|
2373 |
+
* @param string $nonce Number to be used Once; must be 24 bytes
|
2374 |
+
* @param string $key Encryption key
|
2375 |
+
* @return string Encrypted text which is vulnerable to chosen-
|
2376 |
+
* ciphertext attacks unless you implement some
|
2377 |
+
* other mitigation to the ciphertext (i.e.
|
2378 |
+
* Encrypt then MAC)
|
2379 |
+
* @throws SodiumException
|
2380 |
+
* @throws TypeError
|
2381 |
+
* @psalm-suppress MixedArgument
|
2382 |
+
*/
|
2383 |
+
public static function crypto_stream_xor($message, $nonce, $key)
|
2384 |
+
{
|
2385 |
+
/* Type checks: */
|
2386 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($message, 'string', 1);
|
2387 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($nonce, 'string', 2);
|
2388 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($key, 'string', 3);
|
2389 |
+
|
2390 |
+
/* Input validation: */
|
2391 |
+
if (ParagonIE_Sodium_Core_Util::strlen($nonce) !== self::CRYPTO_STREAM_NONCEBYTES) {
|
2392 |
+
throw new SodiumException('Argument 2 must be CRYPTO_SECRETBOX_NONCEBYTES long.');
|
2393 |
+
}
|
2394 |
+
if (ParagonIE_Sodium_Core_Util::strlen($key) !== self::CRYPTO_STREAM_KEYBYTES) {
|
2395 |
+
throw new SodiumException('Argument 3 must be CRYPTO_SECRETBOX_KEYBYTES long.');
|
2396 |
+
}
|
2397 |
+
|
2398 |
+
if (self::isPhp72OrGreater()) {
|
2399 |
+
return sodium_crypto_stream_xor($message, $nonce, $key);
|
2400 |
+
}
|
2401 |
+
if (self::use_fallback('crypto_stream_xor')) {
|
2402 |
+
return (string) call_user_func('\\Sodium\\crypto_stream_xor', $message, $nonce, $key);
|
2403 |
+
}
|
2404 |
+
if (PHP_INT_SIZE === 4) {
|
2405 |
+
return ParagonIE_Sodium_Core32_XSalsa20::xsalsa20_xor($message, $nonce, $key);
|
2406 |
+
}
|
2407 |
+
return ParagonIE_Sodium_Core_XSalsa20::xsalsa20_xor($message, $nonce, $key);
|
2408 |
+
}
|
2409 |
+
|
2410 |
+
/**
|
2411 |
+
* Return a secure random key for use with crypto_stream
|
2412 |
+
*
|
2413 |
+
* @return string
|
2414 |
+
*/
|
2415 |
+
public static function crypto_stream_keygen()
|
2416 |
+
{
|
2417 |
+
return random_bytes(self::CRYPTO_STREAM_KEYBYTES);
|
2418 |
+
}
|
2419 |
+
|
2420 |
+
/**
|
2421 |
+
* Cache-timing-safe implementation of hex2bin().
|
2422 |
+
*
|
2423 |
+
* @param string $string Hexadecimal string
|
2424 |
+
* @return string Raw binary string
|
2425 |
+
* @throws SodiumException
|
2426 |
+
* @throws TypeError
|
2427 |
+
* @psalm-suppress TooFewArguments
|
2428 |
+
* @psalm-suppress MixedArgument
|
2429 |
+
*/
|
2430 |
+
public static function hex2bin($string)
|
2431 |
+
{
|
2432 |
+
/* Type checks: */
|
2433 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($string, 'string', 1);
|
2434 |
+
|
2435 |
+
if (self::isPhp72OrGreater()) {
|
2436 |
+
if (is_callable('sodium_hex2bin')) {
|
2437 |
+
return (string) sodium_hex2bin($string);
|
2438 |
+
}
|
2439 |
+
}
|
2440 |
+
if (self::use_fallback('hex2bin')) {
|
2441 |
+
return (string) call_user_func('\\Sodium\\hex2bin', $string);
|
2442 |
+
}
|
2443 |
+
return ParagonIE_Sodium_Core_Util::hex2bin($string);
|
2444 |
+
}
|
2445 |
+
|
2446 |
+
/**
|
2447 |
+
* Increase a string (little endian)
|
2448 |
+
*
|
2449 |
+
* @param string $var
|
2450 |
+
*
|
2451 |
+
* @return void
|
2452 |
+
* @throws SodiumException
|
2453 |
+
* @throws TypeError
|
2454 |
+
* @psalm-suppress MixedArgument
|
2455 |
+
*/
|
2456 |
+
public static function increment(&$var)
|
2457 |
+
{
|
2458 |
+
/* Type checks: */
|
2459 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($var, 'string', 1);
|
2460 |
+
|
2461 |
+
if (self::isPhp72OrGreater()) {
|
2462 |
+
sodium_increment($var);
|
2463 |
+
return;
|
2464 |
+
}
|
2465 |
+
if (self::use_fallback('increment')) {
|
2466 |
+
@call_user_func('\\Sodium\\increment', $var);
|
2467 |
+
return;
|
2468 |
+
}
|
2469 |
+
|
2470 |
+
$len = ParagonIE_Sodium_Core_Util::strlen($var);
|
2471 |
+
$c = 1;
|
2472 |
+
$copy = '';
|
2473 |
+
for ($i = 0; $i < $len; ++$i) {
|
2474 |
+
$c += ParagonIE_Sodium_Core_Util::chrToInt(
|
2475 |
+
ParagonIE_Sodium_Core_Util::substr($var, $i, 1)
|
2476 |
+
);
|
2477 |
+
$copy .= ParagonIE_Sodium_Core_Util::intToChr($c);
|
2478 |
+
$c >>= 8;
|
2479 |
+
}
|
2480 |
+
$var = $copy;
|
2481 |
+
}
|
2482 |
+
|
2483 |
+
/**
|
2484 |
+
* The equivalent to the libsodium minor version we aim to be compatible
|
2485 |
+
* with (sans pwhash and memzero).
|
2486 |
+
*
|
2487 |
+
* @return int
|
2488 |
+
* @psalm-suppress MixedInferredReturnType
|
2489 |
+
* @psalm-suppress UndefinedFunction
|
2490 |
+
*/
|
2491 |
+
public static function library_version_major()
|
2492 |
+
{
|
2493 |
+
if (self::isPhp72OrGreater()) {
|
2494 |
+
return sodium_library_version_major();
|
2495 |
+
}
|
2496 |
+
if (self::use_fallback('library_version_major')) {
|
2497 |
+
return (int) call_user_func('\\Sodium\\library_version_major');
|
2498 |
+
}
|
2499 |
+
return self::LIBRARY_VERSION_MAJOR;
|
2500 |
+
}
|
2501 |
+
|
2502 |
+
/**
|
2503 |
+
* The equivalent to the libsodium minor version we aim to be compatible
|
2504 |
+
* with (sans pwhash and memzero).
|
2505 |
+
*
|
2506 |
+
* @return int
|
2507 |
+
* @psalm-suppress MixedInferredReturnType
|
2508 |
+
* @psalm-suppress UndefinedFunction
|
2509 |
+
*/
|
2510 |
+
public static function library_version_minor()
|
2511 |
+
{
|
2512 |
+
if (self::isPhp72OrGreater()) {
|
2513 |
+
return sodium_library_version_minor();
|
2514 |
+
}
|
2515 |
+
if (self::use_fallback('library_version_minor')) {
|
2516 |
+
return (int) call_user_func('\\Sodium\\library_version_minor');
|
2517 |
+
}
|
2518 |
+
return self::LIBRARY_VERSION_MINOR;
|
2519 |
+
}
|
2520 |
+
|
2521 |
+
/**
|
2522 |
+
* Compare two strings.
|
2523 |
+
*
|
2524 |
+
* @param string $left
|
2525 |
+
* @param string $right
|
2526 |
+
* @return int
|
2527 |
+
* @throws SodiumException
|
2528 |
+
* @throws TypeError
|
2529 |
+
* @psalm-suppress MixedArgument
|
2530 |
+
*/
|
2531 |
+
public static function memcmp($left, $right)
|
2532 |
+
{
|
2533 |
+
/* Type checks: */
|
2534 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($left, 'string', 1);
|
2535 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($right, 'string', 2);
|
2536 |
+
|
2537 |
+
if (self::use_fallback('memcmp')) {
|
2538 |
+
return (int) call_user_func('\\Sodium\\memcmp', $left, $right);
|
2539 |
+
}
|
2540 |
+
/** @var string $left */
|
2541 |
+
/** @var string $right */
|
2542 |
+
return ParagonIE_Sodium_Core_Util::memcmp($left, $right);
|
2543 |
+
}
|
2544 |
+
|
2545 |
+
/**
|
2546 |
+
* It's actually not possible to zero memory buffers in PHP. You need the
|
2547 |
+
* native library for that.
|
2548 |
+
*
|
2549 |
+
* @param string|null $var
|
2550 |
+
*
|
2551 |
+
* @return void
|
2552 |
+
* @throws SodiumException (Unless libsodium is installed)
|
2553 |
+
* @throws TypeError
|
2554 |
+
* @psalm-suppress TooFewArguments
|
2555 |
+
*/
|
2556 |
+
public static function memzero(&$var)
|
2557 |
+
{
|
2558 |
+
/* Type checks: */
|
2559 |
+
ParagonIE_Sodium_Core_Util::declareScalarType($var, 'string', 1);
|
2560 |
+
|
2561 |
+
if (self::isPhp72OrGreater()) {
|
2562 |
+
sodium_memzero($var);
|
2563 |
+
return;
|
2564 |
+
}
|
2565 |
+
if (self::use_fallback('memzero')) {
|
2566 |
+
@call_user_func('\\Sodium\\memzero', $var);
|
2567 |
+
return;
|
2568 |
+
}
|
2569 |
+
// This is the best we can do.
|
2570 |
+
throw new SodiumException(
|
2571 |
+
'This is not implemented in sodium_compat, as it is not possible to securely wipe memory from PHP. ' .
|
2572 |
+
'To fix this error, make sure libsodium is installed and the PHP extension is enabled.'
|
2573 |
+
);
|
2574 |
+
}
|
2575 |
+
|
2576 |
+
/**
|
2577 |
+
* Generate a string of bytes from the kernel's CSPRNG.
|
2578 |
+
* Proudly uses /dev/urandom (if getrandom(2) is not available).
|
2579 |
+
*
|
2580 |
+
* @param int $numBytes
|
2581 |
+
* @return string
|
2582 |
+
* @throws TypeError
|
2583 |
+
*/
|
2584 |
+
public static function randombytes_buf($numBytes)
|
2585 |
+
{
|
2586 |
+
/* Type checks: */
|
2587 |
+
if (!is_int($numBytes)) {
|
2588 |
+
if (is_numeric($numBytes)) {
|
2589 |
+
$numBytes = (int) $numBytes;
|
2590 |
+
} else {
|
2591 |
+
throw new TypeError('Argument 1 must be an integer, ' . gettype($numBytes) . ' given.');
|
2592 |
+
}
|
2593 |
+
}
|
2594 |
+
if (self::use_fallback('randombytes_buf')) {
|
2595 |
+
return (string) call_user_func('\\Sodium\\randombytes_buf', $numBytes);
|
2596 |
+
}
|
2597 |
+
return random_bytes($numBytes);
|
2598 |
+
}
|
2599 |
+
|
2600 |
+
/**
|
2601 |
+
* Generate an integer between 0 and $range (non-inclusive).
|
2602 |
+
*
|
2603 |
+
* @param int $range
|
2604 |
+
* @return int
|
2605 |
+
* @throws TypeError
|
2606 |
+
*/
|
2607 |
+
public static function randombytes_uniform($range)
|
2608 |
+
{
|
2609 |
+
/* Type checks: */
|
2610 |
+
if (!is_int($range)) {
|
2611 |
+
if (is_numeric($range)) {
|
2612 |
+
$range = (int)$range;
|
2613 |
+
} else {
|
2614 |
+
throw new TypeError('Argument 1 must be an integer, ' . gettype($range) . ' given.');
|
2615 |
+
}
|
2616 |
+
}
|
2617 |
+
if (self::use_fallback('randombytes_uniform')) {
|
2618 |
+
return (int) call_user_func('\\Sodium\\randombytes_uniform', $range);
|
2619 |
+
}
|
2620 |
+
return random_int(0, $range - 1);
|
2621 |
+
}
|
2622 |
+
|
2623 |
+
/**
|
2624 |
+
* Generate a random 16-bit integer.
|
2625 |
+
*
|
2626 |
+
* @return int
|
2627 |
+
*/
|
2628 |
+
public static function randombytes_random16()
|
2629 |
+
{
|
2630 |
+
if (self::use_fallback('randombytes_random16')) {
|
2631 |
+
return (int) call_user_func('\\Sodium\\randombytes_random16');
|
2632 |
+
}
|
2633 |
+
return random_int(0, 65535);
|
2634 |
+
}
|
2635 |
+
|
2636 |
+
/**
|
2637 |
+
* This emulates libsodium's version_string() function, except ours is
|
2638 |
+
* prefixed with 'polyfill-'.
|
2639 |
+
*
|
2640 |
+
* @return string
|
2641 |
+
* @psalm-suppress MixedInferredReturnType
|
2642 |
+
* @psalm-suppress UndefinedFunction
|
2643 |
+
*/
|
2644 |
+
public static function version_string()
|
2645 |
+
{
|
2646 |
+
if (self::isPhp72OrGreater()) {
|
2647 |
+
return (string) sodium_version_string();
|
2648 |
+
}
|
2649 |
+
if (self::use_fallback('version_string')) {
|
2650 |
+
return (string) call_user_func('\\Sodium\\version_string');
|
2651 |
+
}
|
2652 |
+
return (string) self::VERSION_STRING;
|
2653 |
+
}
|
2654 |
+
|
2655 |
+
/**
|
2656 |
+
* Should we use the libsodium core function instead?
|
2657 |
+
* This is always a good idea, if it's available. (Unless we're in the
|
2658 |
+
* middle of running our unit test suite.)
|
2659 |
+
*
|
2660 |
+
* If ext/libsodium is available, use it. Return TRUE.
|
2661 |
+
* Otherwise, we have to use the code provided herein. Return FALSE.
|
2662 |
+
*
|
2663 |
+
* @param string $sodium_func_name
|
2664 |
+
*
|
2665 |
+
* @return bool
|
2666 |
+
*/
|
2667 |
+
protected static function use_fallback($sodium_func_name = '')
|
2668 |
+
{
|
2669 |
+
static $res = null;
|
2670 |
+
if ($res === null) {
|
2671 |
+
$res = extension_loaded('libsodium') && PHP_VERSION_ID >= 50300;
|
2672 |
+
}
|
2673 |
+
if ($res === false) {
|
2674 |
+
// No libsodium installed
|
2675 |
+
return false;
|
2676 |
+
}
|
2677 |
+
if (self::$disableFallbackForUnitTests) {
|
2678 |
+
// Don't fallback. Use the PHP implementation.
|
2679 |
+
return false;
|
2680 |
+
}
|
2681 |
+
if (!empty($sodium_func_name)) {
|
2682 |
+
return is_callable('\\Sodium\\' . $sodium_func_name);
|
2683 |
+
}
|
2684 |
+
return true;
|
2685 |
+
}
|
2686 |
+
|
2687 |
+
/**
|
2688 |
+
* Libsodium as implemented in PHP 7.2
|
2689 |
+
*
|
2690 |
+
* @ref https://wiki.php.net/rfc/libsodium
|
2691 |
+
* @return bool
|
2692 |
+
*/
|
2693 |
+
protected static function isPhp72OrGreater()
|
2694 |
+
{
|
2695 |
+
static $res = null;
|
2696 |
+
if ($res === null) {
|
2697 |
+
$res = PHP_VERSION_ID >= 70200 && extension_loaded('sodium');
|
2698 |
+
}
|
2699 |
+
if (self::$disableFallbackForUnitTests) {
|
2700 |
+
// Don't fallback. Use the PHP implementation.
|
2701 |
+
return false;
|
2702 |
+
}
|
2703 |
+
return (bool) $res;
|
2704 |
+
}
|
2705 |
+
}
|
vendor/paragonie/sodium_compat/src/Core/BLAKE2b.php
ADDED
@@ -0,0 +1,746 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if (class_exists('ParagonIE_Sodium_Core_BLAKE2b', false)) {
|
4 |
+
return;
|
5 |
+
}
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Class ParagonIE_Sodium_Core_BLAKE2b
|
9 |
+
*
|
10 |
+
* Based on the work of Devi Mandiri in devi/salt.
|
11 |
+
*/
|
12 |
+
abstract class ParagonIE_Sodium_Core_BLAKE2b extends ParagonIE_Sodium_Core_Util
|
13 |
+
{
|
14 |
+
/**
|
15 |
+
* @var SplFixedArray
|
16 |
+
*/
|
17 |
+
protected static $iv;
|
18 |
+
|
19 |
+
/**
|
20 |
+
* @var array<int, array<int, int>>
|
21 |
+
*/
|
22 |
+
protected static $sigma = array(
|
23 |
+
array( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15),
|
24 |
+
array( 14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3),
|
25 |
+
array( 11, 8, 12, 0, 5, 2, 15, 13, 10, 14, 3, 6, 7, 1, 9, 4),
|
26 |
+
array( 7, 9, 3, 1, 13, 12, 11, 14, 2, 6, 5, 10, 4, 0, 15, 8),
|
27 |
+
array( 9, 0, 5, 7, 2, 4, 10, 15, 14, 1, 11, 12, 6, 8, 3, 13),
|
28 |
+
array( 2, 12, 6, 10, 0, 11, 8, 3, 4, 13, 7, 5, 15, 14, 1, 9),
|
29 |
+
array( 12, 5, 1, 15, 14, 13, 4, 10, 0, 7, 6, 3, 9, 2, 8, 11),
|
30 |
+
array( 13, 11, 7, 14, 12, 1, 3, 9, 5, 0, 15, 4, 8, 6, 2, 10),
|
31 |
+
array( 6, 15, 14, 9, 11, 3, 0, 8, 12, 2, 13, 7, 1, 4, 10, 5),
|
32 |
+
array( 10, 2, 8, 4, 7, 6, 1, 5, 15, 11, 9, 14, 3, 12, 13 , 0),
|
33 |
+
array( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15),
|
34 |
+
array( 14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3)
|
35 |
+
);
|
36 |
+
|
37 |
+
const BLOCKBYTES = 128;
|
38 |
+
const OUTBYTES = 64;
|
39 |
+
const KEYBYTES = 64;
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Turn two 32-bit integers into a fixed array representing a 64-bit integer.
|
43 |
+
*
|
44 |
+
* @internal You should not use this directly from another application
|
45 |
+
*
|
46 |
+
* @param int $high
|
47 |
+
* @param int $low
|
48 |
+
* @return SplFixedArray
|
49 |
+
* @psalm-suppress MixedAssignment
|
50 |
+
*/
|
51 |
+
public static function new64($high, $low)
|
52 |
+
{
|
53 |
+
$i64 = new SplFixedArray(2);
|
54 |
+
$i64[0] = $high & 0xffffffff;
|
55 |
+
$i64[1] = $low & 0xffffffff;
|
56 |
+
return $i64;
|
57 |
+
}
|
58 |
+
|
59 |
+
/**
|
60 |
+
* Convert an arbitrary number into an SplFixedArray of two 32-bit integers
|
61 |
+
* that represents a 64-bit integer.
|
62 |
+
*
|
63 |
+
* @internal You should not use this directly from another application
|
64 |
+
*
|
65 |
+
* @param int $num
|
66 |
+
* @return SplFixedArray
|
67 |
+
*/
|
68 |
+
protected static function to64($num)
|
69 |
+
{
|
70 |
+
list($hi, $lo) = self::numericTo64BitInteger($num);
|
71 |
+
return self::new64($hi, $lo);
|
72 |
+
}
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Adds two 64-bit integers together, returning their sum as a SplFixedArray
|
76 |
+
* containing two 32-bit integers (representing a 64-bit integer).
|
77 |
+
*
|
78 |
+
* @internal You should not use this directly from another application
|
79 |
+
*
|
80 |
+
* @param SplFixedArray $x
|
81 |
+
* @param SplFixedArray $y
|
82 |
+
* @return SplFixedArray
|
83 |
+
* @psalm-suppress MixedArgument
|
84 |
+
* @psalm-suppress MixedAssignment
|
85 |
+
* @psalm-suppress MixedOperand
|
86 |
+
*/
|
87 |
+
protected static function add64($x, $y)
|
88 |
+
{
|
89 |
+
$l = ($x[1] + $y[1]) & 0xffffffff;
|
90 |
+
return self::new64(
|
91 |
+
$x[0] + $y[0] + (
|
92 |
+
($l < $x[1]) ? 1 : 0
|
93 |
+
),
|
94 |
+
$l
|
95 |
+
);
|
96 |
+
}
|
97 |
+
|
98 |
+
/**
|
99 |
+
* @internal You should not use this directly from another application
|
100 |
+
*
|
101 |
+
* @param SplFixedArray $x
|
102 |
+
* @param SplFixedArray $y
|
103 |
+
* @param SplFixedArray $z
|
104 |
+
* @return SplFixedArray
|
105 |
+
*/
|
106 |
+
protected static function add364($x, $y, $z)
|
107 |
+
{
|
108 |
+
return self::add64($x, self::add64($y, $z));
|
109 |
+
}
|
110 |
+
|
111 |
+
/**
|
112 |
+
* @internal You should not use this directly from another application
|
113 |
+
*
|
114 |
+
* @param SplFixedArray $x
|
115 |
+
* @param SplFixedArray $y
|
116 |
+
* @return SplFixedArray
|
117 |
+
* @throws SodiumException
|
118 |
+
* @throws TypeError
|
119 |
+
*/
|
120 |
+
protected static function xor64(SplFixedArray $x, SplFixedArray $y)
|
121 |
+
{
|
122 |
+
if (!is_numeric($x[0])) {
|
123 |
+
throw new SodiumException('x[0] is not an integer');
|
124 |
+
}
|
125 |
+
if (!is_numeric($x[1])) {
|
126 |
+
throw new SodiumException('x[1] is not an integer');
|
127 |
+
}
|
128 |
+
if (!is_numeric($y[0])) {
|
129 |
+
throw new SodiumException('y[0] is not an integer');
|
130 |
+
}
|
131 |
+
if (!is_numeric($y[1])) {
|
132 |
+
throw new SodiumException('y[1] is not an integer');
|
133 |
+
}
|
134 |
+
return self::new64($x[0] ^ $y[0], $x[1] ^ $y[1]);
|
135 |
+
}
|
136 |
+
|
137 |
+
/**
|
138 |
+
* @internal You should not use this directly from another application
|
139 |
+
*
|
140 |
+
* @param SplFixedArray $x
|
141 |
+
* @param int $c
|
142 |
+
* @return SplFixedArray
|
143 |
+
* @psalm-suppress MixedAssignment
|
144 |
+
*/
|
145 |
+
public static function rotr64($x, $c)
|
146 |
+
{
|
147 |
+
if ($c >= 64) {
|
148 |
+
$c %= 64;
|
149 |
+
}
|
150 |
+
if ($c >= 32) {
|
151 |
+
/** @var int $tmp */
|
152 |
+
$tmp = $x[0];
|
153 |
+
$x[0] = $x[1];
|
154 |
+
$x[1] = $tmp;
|
155 |
+
$c -= 32;
|
156 |
+
}
|
157 |
+
if ($c === 0) {
|
158 |
+
return $x;
|
159 |
+
}
|
160 |
+
|
161 |
+
$l0 = 0;
|
162 |
+
$c = 64 - $c;
|
163 |
+
|
164 |
+
if ($c < 32) {
|
165 |
+
/** @var int $h0 */
|
166 |
+
$h0 = ($x[0] << $c) | (
|
167 |
+
(
|
168 |
+
$x[1] & ((1 << $c) - 1)
|
169 |
+
<<
|
170 |
+
(32 - $c)
|
171 |
+
) >> (32 - $c)
|
172 |
+
);
|
173 |
+
/** @var int $l0 */
|
174 |
+
$l0 = $x[1] << $c;
|
175 |
+
} else {
|
176 |
+
/** @var int $h0 */
|
177 |
+
$h0 = $x[1] << ($c - 32);
|
178 |
+
}
|
179 |
+
|
180 |
+
$h1 = 0;
|
181 |
+
$c1 = 64 - $c;
|
182 |
+
|
183 |
+
if ($c1 < 32) {
|
184 |
+
/** @var int $h1 */
|
185 |
+
$h1 = $x[0] >> $c1;
|
186 |
+
/** @var int $l1 */
|
187 |
+
$l1 = ($x[1] >> $c1) | ($x[0] & ((1 << $c1) - 1)) << (32 - $c1);
|
188 |
+
} else {
|
189 |
+
/** @var int $l1 */
|
190 |
+
$l1 = $x[0] >> ($c1 - 32);
|
191 |
+
}
|
192 |
+
|
193 |
+
return self::new64($h0 | $h1, $l0 | $l1);
|
194 |
+
}
|
195 |
+
|
196 |
+
/**
|
197 |
+
* @internal You should not use this directly from another application
|
198 |
+
*
|
199 |
+
* @param SplFixedArray $x
|
200 |
+
* @return int
|
201 |
+
* @psalm-suppress MixedOperand
|
202 |
+
*/
|
203 |
+
protected static function flatten64($x)
|
204 |
+
{
|
205 |
+
return (int) ($x[0] * 4294967296 + $x[1]);
|
206 |
+
}
|
207 |
+
|
208 |
+
/**
|
209 |
+
* @internal You should not use this directly from another application
|
210 |
+
*
|
211 |
+
* @param SplFixedArray $x
|
212 |
+
* @param int $i
|
213 |
+
* @return SplFixedArray
|
214 |
+
* @psalm-suppress MixedArgument
|
215 |
+
* @psalm-suppress MixedArrayOffset
|
216 |
+
*/
|
217 |
+
protected static function load64(SplFixedArray $x, $i)
|
218 |
+
{
|
219 |
+
/** @var int $l */
|
220 |
+
$l = $x[$i] | ($x[$i+1]<<8) | ($x[$i+2]<<16) | ($x[$i+3]<<24);
|
221 |
+
/** @var int $h */
|
222 |
+
$h = $x[$i+4] | ($x[$i+5]<<8) | ($x[$i+6]<<16) | ($x[$i+7]<<24);
|
223 |
+
return self::new64($h, $l);
|
224 |
+
}
|
225 |
+
|
226 |
+
/**
|
227 |
+
* @internal You should not use this directly from another application
|
228 |
+
*
|
229 |
+
* @param SplFixedArray $x
|
230 |
+
* @param int $i
|
231 |
+
* @param SplFixedArray $u
|
232 |
+
* @return void
|
233 |
+
* @psalm-suppress MixedAssignment
|
234 |
+
*/
|
235 |
+
protected static function store64(SplFixedArray $x, $i, SplFixedArray $u)
|
236 |
+
{
|
237 |
+
$maxLength = $x->getSize() - 1;
|
238 |
+
for ($j = 0; $j < 8; ++$j) {
|
239 |
+
/*
|
240 |
+
[0, 1, 2, 3, 4, 5, 6, 7]
|
241 |
+
... becomes ...
|
242 |
+
[0, 0, 0, 0, 1, 1, 1, 1]
|
243 |
+
*/
|
244 |
+
/** @var int $uIdx */
|
245 |
+
$uIdx = ((7 - $j) & 4) >> 2;
|
246 |
+
$x[$i] = ($u[$uIdx] & 0xff);
|
247 |
+
if (++$i > $maxLength) {
|
248 |
+
return;
|
249 |
+
}
|
250 |
+
$u[$uIdx] >>= 8;
|
251 |
+
}
|
252 |
+
}
|
253 |
+
|
254 |
+
/**
|
255 |
+
* This just sets the $iv static variable.
|
256 |
+
*
|
257 |
+
* @internal You should not use this directly from another application
|
258 |
+
*
|
259 |
+
* @return void
|
260 |
+
*/
|
261 |
+
public static function pseudoConstructor()
|
262 |
+
{
|
263 |
+
static $called = false;
|
264 |
+
if ($called) {
|
265 |
+
return;
|
266 |
+
}
|
267 |
+
self::$iv = new SplFixedArray(8);
|
268 |
+
self::$iv[0] = self::new64(0x6a09e667, 0xf3bcc908);
|
269 |
+
self::$iv[1] = self::new64(0xbb67ae85, 0x84caa73b);
|
270 |
+
self::$iv[2] = self::new64(0x3c6ef372, 0xfe94f82b);
|
271 |
+
self::$iv[3] = self::new64(0xa54ff53a, 0x5f1d36f1);
|
272 |
+
self::$iv[4] = self::new64(0x510e527f, 0xade682d1);
|
273 |
+
self::$iv[5] = self::new64(0x9b05688c, 0x2b3e6c1f);
|
274 |
+
self::$iv[6] = self::new64(0x1f83d9ab, 0xfb41bd6b);
|
275 |
+
self::$iv[7] = self::new64(0x5be0cd19, 0x137e2179);
|
276 |
+
|
277 |
+
$called = true;
|
278 |
+
}
|
279 |
+
|
280 |
+
/**
|
281 |
+
* Returns a fresh BLAKE2 context.
|
282 |
+
*
|
283 |
+
* @internal You should not use this directly from another application
|
284 |
+
*
|
285 |
+
* @return SplFixedArray
|
286 |
+
* @psalm-suppress MixedAssignment
|
287 |
+
* @psalm-suppress MixedArrayAccess
|
288 |
+
* @psalm-suppress MixedArrayAssignment
|
289 |
+
*/
|
290 |
+
protected static function context()
|
291 |
+
{
|
292 |
+
$ctx = new SplFixedArray(5);
|
293 |
+
$ctx[0] = new SplFixedArray(8); // h
|
294 |
+
$ctx[1] = new SplFixedArray(2); // t
|
295 |
+
$ctx[2] = new SplFixedArray(2); // f
|
296 |
+
$ctx[3] = new SplFixedArray(256); // buf
|
297 |
+
$ctx[4] = 0; // buflen
|
298 |
+
|
299 |
+
for ($i = 8; $i--;) {
|
300 |
+
$ctx[0][$i] = self::$iv[$i];
|
301 |
+
}
|
302 |
+
for ($i = 256; $i--;) {
|
303 |
+
$ctx[3][$i] = 0;
|
304 |
+
}
|
305 |
+
|
306 |
+
$zero = self::new64(0, 0);
|
307 |
+
$ctx[1][0] = $zero;
|
308 |
+
$ctx[1][1] = $zero;
|
309 |
+
$ctx[2][0] = $zero;
|
310 |
+
$ctx[2][1] = $zero;
|
311 |
+
|
312 |
+
return $ctx;
|
313 |
+
}
|
314 |
+
|
315 |
+
/**
|
316 |
+
* @internal You should not use this directly from another application
|
317 |
+
*
|
318 |
+
* @param SplFixedArray $ctx
|
319 |
+
* @param SplFixedArray $buf
|
320 |
+
* @return void
|
321 |
+
* @throws SodiumException
|
322 |
+
* @throws TypeError
|
323 |
+
* @psalm-suppress MixedArgument
|
324 |
+
* @psalm-suppress MixedAssignment
|
325 |
+
* @psalm-suppress MixedArrayAccess
|
326 |
+
* @psalm-suppress MixedArrayAssignment
|
327 |
+
* @psalm-suppress MixedArrayOffset
|
328 |
+
*/
|
329 |
+
protected static function compress(SplFixedArray $ctx, SplFixedArray $buf)
|
330 |
+
{
|
331 |
+
$m = new SplFixedArray(16);
|
332 |
+
$v = new SplFixedArray(16);
|
333 |
+
|
334 |
+
for ($i = 16; $i--;) {
|
335 |
+
$m[$i] = self::load64($buf, $i << 3);
|
336 |
+
}
|
337 |
+
|
338 |
+
for ($i = 8; $i--;) {
|
339 |
+
$v[$i] = $ctx[0][$i];
|
340 |
+
}
|
341 |
+
|
342 |
+
$v[ 8] = self::$iv[0];
|
343 |
+
$v[ 9] = self::$iv[1];
|
344 |
+
$v[10] = self::$iv[2];
|
345 |
+
$v[11] = self::$iv[3];
|
346 |
+
|
347 |
+
$v[12] = self::xor64($ctx[1][0], self::$iv[4]);
|
348 |
+
$v[13] = self::xor64($ctx[1][1], self::$iv[5]);
|
349 |
+
$v[14] = self::xor64($ctx[2][0], self::$iv[6]);
|
350 |
+
$v[15] = self::xor64($ctx[2][1], self::$iv[7]);
|
351 |
+
|
352 |
+
for ($r = 0; $r < 12; ++$r) {
|
353 |
+
$v = self::G($r, 0, 0, 4, 8, 12, $v, $m);
|
354 |
+
$v = self::G($r, 1, 1, 5, 9, 13, $v, $m);
|
355 |
+
$v = self::G($r, 2, 2, 6, 10, 14, $v, $m);
|
356 |
+
$v = self::G($r, 3, 3, 7, 11, 15, $v, $m);
|
357 |
+
$v = self::G($r, 4, 0, 5, 10, 15, $v, $m);
|
358 |
+
$v = self::G($r, 5, 1, 6, 11, 12, $v, $m);
|
359 |
+
$v = self::G($r, 6, 2, 7, 8, 13, $v, $m);
|
360 |
+
$v = self::G($r, 7, 3, 4, 9, 14, $v, $m);
|
361 |
+
}
|
362 |
+
|
363 |
+
for ($i = 8; $i--;) {
|
364 |
+
$ctx[0][$i] = self::xor64(
|
365 |
+
$ctx[0][$i], self::xor64($v[$i], $v[$i+8])
|
366 |
+
);
|
367 |
+
}
|
368 |
+
}
|
369 |
+
|
370 |
+
/**
|
371 |
+
* @internal You should not use this directly from another application
|
372 |
+
*
|
373 |
+
* @param int $r
|
374 |
+
* @param int $i
|
375 |
+
* @param int $a
|
376 |
+
* @param int $b
|
377 |
+
* @param int $c
|
378 |
+
* @param int $d
|
379 |
+
* @param SplFixedArray $v
|
380 |
+
* @param SplFixedArray $m
|
381 |
+
* @return SplFixedArray
|
382 |
+
* @throws SodiumException
|
383 |
+
* @throws TypeError
|
384 |
+
* @psalm-suppress MixedArgument
|
385 |
+
* @psalm-suppress MixedArrayOffset
|
386 |
+
*/
|
387 |
+
public static function G($r, $i, $a, $b, $c, $d, SplFixedArray $v, SplFixedArray $m)
|
388 |
+
{
|
389 |
+
$v[$a] = self::add364($v[$a], $v[$b], $m[self::$sigma[$r][$i << 1]]);
|
390 |
+
$v[$d] = self::rotr64(self::xor64($v[$d], $v[$a]), 32);
|
391 |
+
$v[$c] = self::add64($v[$c], $v[$d]);
|
392 |
+
$v[$b] = self::rotr64(self::xor64($v[$b], $v[$c]), 24);
|
393 |
+
$v[$a] = self::add364($v[$a], $v[$b], $m[self::$sigma[$r][($i << 1) + 1]]);
|
394 |
+
$v[$d] = self::rotr64(self::xor64($v[$d], $v[$a]), 16);
|
395 |
+
$v[$c] = self::add64($v[$c], $v[$d]);
|
396 |
+
$v[$b] = self::rotr64(self::xor64($v[$b], $v[$c]), 63);
|
397 |
+
return $v;
|
398 |
+
}
|
399 |
+
|
400 |
+
/**
|
401 |
+
* @internal You should not use this directly from another application
|
402 |
+
*
|
403 |
+
* @param SplFixedArray $ctx
|
404 |
+
* @param int $inc
|
405 |
+
* @return void
|
406 |
+
* @throws SodiumException
|
407 |
+
* @psalm-suppress MixedArgument
|
408 |
+
* @psalm-suppress MixedArrayAccess
|
409 |
+
* @psalm-suppress MixedArrayAssignment
|
410 |
+
*/
|
411 |
+
public static function increment_counter($ctx, $inc)
|
412 |
+
{
|
413 |
+
if ($inc < 0) {
|
414 |
+
throw new SodiumException('Increasing by a negative number makes no sense.');
|
415 |
+
}
|
416 |
+
$t = self::to64($inc);
|
417 |
+
# S->t is $ctx[1] in our implementation
|
418 |
+
|
419 |
+
# S->t[0] = ( uint64_t )( t >> 0 );
|
420 |
+
$ctx[1][0] = self::add64($ctx[1][0], $t);
|
421 |
+
|
422 |
+
# S->t[1] += ( S->t[0] < inc );
|
423 |
+
if (self::flatten64($ctx[1][0]) < $inc) {
|
424 |
+
$ctx[1][1] = self::add64($ctx[1][1], self::to64(1));
|
425 |
+
}
|
426 |
+
}
|
427 |
+
|
428 |
+
/**
|
429 |
+
* @internal You should not use this directly from another application
|
430 |
+
*
|
431 |
+
* @param SplFixedArray $ctx
|
432 |
+
* @param SplFixedArray $p
|
433 |
+
* @param int $plen
|
434 |
+
* @return void
|
435 |
+
* @throws SodiumException
|
436 |
+
* @throws TypeError
|
437 |
+
* @psalm-suppress MixedArgument
|
438 |
+
* @psalm-suppress MixedAssignment
|
439 |
+
* @psalm-suppress MixedArrayAccess
|
440 |
+
* @psalm-suppress MixedArrayAssignment
|
441 |
+
* @psalm-suppress MixedArrayOffset
|
442 |
+
* @psalm-suppress MixedOperand
|
443 |
+
*/
|
444 |
+
public static function update(SplFixedArray $ctx, SplFixedArray $p, $plen)
|
445 |
+
{
|
446 |
+
self::pseudoConstructor();
|
447 |
+
|
448 |
+
$offset = 0;
|
449 |
+
while ($plen > 0) {
|
450 |
+
$left = $ctx[4];
|
451 |
+
$fill = 256 - $left;
|
452 |
+
|
453 |
+
if ($plen > $fill) {
|
454 |
+
# memcpy( S->buf + left, in, fill ); /* Fill buffer */
|
455 |
+
for ($i = $fill; $i--;) {
|
456 |
+
$ctx[3][$i + $left] = $p[$i + $offset];
|
457 |
+
}
|
458 |
+
|
459 |
+
# S->buflen += fill;
|
460 |
+
$ctx[4] += $fill;
|
461 |
+
|
462 |
+
# blake2b_increment_counter( S, BLAKE2B_BLOCKBYTES );
|
463 |
+
self::increment_counter($ctx, 128);
|
464 |
+
|
465 |
+
# blake2b_compress( S, S->buf ); /* Compress */
|
466 |
+
self::compress($ctx, $ctx[3]);
|
467 |
+
|
468 |
+
# memcpy( S->buf, S->buf + BLAKE2B_BLOCKBYTES, BLAKE2B_BLOCKBYTES ); /* Shift buffer left */
|
469 |
+
for ($i = 128; $i--;) {
|
470 |
+
$ctx[3][$i] = $ctx[3][$i + 128];
|
471 |
+
}
|
472 |
+
|
473 |
+
# S->buflen -= BLAKE2B_BLOCKBYTES;
|
474 |
+
$ctx[4] -= 128;
|
475 |
+
|
476 |
+
# in += fill;
|
477 |
+
$offset += $fill;
|
478 |
+
|
479 |
+
# inlen -= fill;
|
480 |
+
$plen -= $fill;
|
481 |
+
} else {
|
482 |
+
for ($i = $plen; $i--;) {
|
483 |
+
$ctx[3][$i + $left] = $p[$i + $offset];
|
484 |
+
}
|
485 |
+
$ctx[4] += $plen;
|
486 |
+
$offset += $plen;
|
487 |
+
$plen -= $plen;
|
488 |
+
}
|
489 |
+
}
|
490 |
+
}
|
491 |
+
|
492 |
+
/**
|
493 |
+
* @internal You should not use this directly from another application
|
494 |
+
*
|
495 |
+
* @param SplFixedArray $ctx
|
496 |
+
* @param SplFixedArray $out
|
497 |
+
* @return SplFixedArray
|
498 |
+
* @throws SodiumException
|
499 |
+
* @throws TypeError
|
500 |
+
* @psalm-suppress MixedArgument
|
501 |
+
* @psalm-suppress MixedAssignment
|
502 |
+
* @psalm-suppress MixedArrayAccess
|
503 |
+
* @psalm-suppress MixedArrayAssignment
|
504 |
+
* @psalm-suppress MixedArrayOffset
|
505 |
+
* @psalm-suppress MixedOperand
|
506 |
+
*/
|
507 |
+
public static function finish(SplFixedArray $ctx, SplFixedArray $out)
|
508 |
+
{
|
509 |
+
self::pseudoConstructor();
|
510 |
+
if ($ctx[4] > 128) {
|
511 |
+
self::increment_counter($ctx, 128);
|
512 |
+
self::compress($ctx, $ctx[3]);
|
513 |
+
$ctx[4] -= 128;
|
514 |
+
if ($ctx[4] > 128) {
|
515 |
+
throw new SodiumException('Failed to assert that buflen <= 128 bytes');
|
516 |
+
}
|
517 |
+
for ($i = $ctx[4]; $i--;) {
|
518 |
+
$ctx[3][$i] = $ctx[3][$i + 128];
|
519 |
+
}
|
520 |
+
}
|
521 |
+
|
522 |
+
self::increment_counter($ctx, $ctx[4]);
|
523 |
+
$ctx[2][0] = self::new64(0xffffffff, 0xffffffff);
|
524 |
+
|
525 |
+
for ($i = 256 - $ctx[4]; $i--;) {
|
526 |
+
$ctx[3][$i+$ctx[4]] = 0;
|
527 |
+
}
|
528 |
+
|
529 |
+
self::compress($ctx, $ctx[3]);
|
530 |
+
|
531 |
+
$i = (int) (($out->getSize() - 1) / 8);
|
532 |
+
for (; $i >= 0; --$i) {
|
533 |
+
self::store64($out, $i << 3, $ctx[0][$i]);
|
534 |
+
}
|
535 |
+
return $out;
|
536 |
+
}
|
537 |
+
|
538 |
+
/**
|
539 |
+
* @internal You should not use this directly from another application
|
540 |
+
*
|
541 |
+
* @param SplFixedArray|null $key
|
542 |
+
* @param int $outlen
|
543 |
+
* @return SplFixedArray
|
544 |
+
* @throws SodiumException
|
545 |
+
* @throws TypeError
|
546 |
+
* @psalm-suppress MixedArgument
|
547 |
+
* @psalm-suppress MixedAssignment
|
548 |
+
* @psalm-suppress MixedArrayAccess
|
549 |
+
* @psalm-suppress MixedArrayAssignment
|
550 |
+
* @psalm-suppress MixedArrayOffset
|
551 |
+
*/
|
552 |
+
public static function init($key = null, $outlen = 64)
|
553 |
+
{
|
554 |
+
self::pseudoConstructor();
|
555 |
+
$klen = 0;
|
556 |
+
|
557 |
+
if ($key !== null) {
|
558 |
+
if (count($key) > 64) {
|
559 |
+
throw new SodiumException('Invalid key size');
|
560 |
+
}
|
561 |
+
$klen = count($key);
|
562 |
+
}
|
563 |
+
|
564 |
+
if ($outlen > 64) {
|
565 |
+
throw new SodiumException('Invalid output size');
|
566 |
+
}
|
567 |
+
|
568 |
+
$ctx = self::context();
|
569 |
+
|
570 |
+
$p = new SplFixedArray(64);
|
571 |
+
for ($i = 64; --$i;) {
|
572 |
+
$p[$i] = 0;
|
573 |
+
}
|
574 |
+
|
575 |
+
$p[0] = $outlen; // digest_length
|
576 |
+
$p[1] = $klen; // key_length
|
577 |
+
$p[2] = 1; // fanout
|
578 |
+
$p[3] = 1; // depth
|
579 |
+
|
580 |
+
$ctx[0][0] = self::xor64(
|
581 |
+
$ctx[0][0],
|
582 |
+
self::load64($p, 0)
|
583 |
+
);
|
584 |
+
|
585 |
+
if ($klen > 0 && $key instanceof SplFixedArray) {
|
586 |
+
$block = new SplFixedArray(128);
|
587 |
+
for ($i = 128; $i--;) {
|
588 |
+
$block[$i] = 0;
|
589 |
+
}
|
590 |
+
for ($i = $klen; $i--;) {
|
591 |
+
$block[$i] = $key[$i];
|
592 |
+
}
|
593 |
+
self::update($ctx, $block, 128);
|
594 |
+
}
|
595 |
+
|
596 |
+
return $ctx;
|
597 |
+
}
|
598 |
+
|
599 |
+
/**
|
600 |
+
* Convert a string into an SplFixedArray of integers
|
601 |
+
*
|
602 |
+
* @internal You should not use this directly from another application
|
603 |
+
*
|
604 |
+
* @param string $str
|
605 |
+
* @return SplFixedArray
|
606 |
+
*/
|
607 |
+
public static function stringToSplFixedArray($str = '')
|
608 |
+
{
|
609 |
+
$values = unpack('C*', $str);
|
610 |
+
return SplFixedArray::fromArray(array_values($values));
|
611 |
+
}
|
612 |
+
|
613 |
+
/**
|
614 |
+
* Convert an SplFixedArray of integers into a string
|
615 |
+
*
|
616 |
+
* @internal You should not use this directly from another application
|
617 |
+
*
|
618 |
+
* @param SplFixedArray $a
|
619 |
+
* @return string
|
620 |
+
* @throws TypeError
|
621 |
+
*/
|
622 |
+
public static function SplFixedArrayToString(SplFixedArray $a)
|
623 |
+
{
|
624 |
+
/**
|
625 |
+
* @var array<mixed, int>
|
626 |
+
*/
|
627 |
+
$arr = $a->toArray();
|
628 |
+
$c = $a->count();
|
629 |
+
array_unshift($arr, str_repeat('C', $c));
|
630 |
+
return (string) (call_user_func_array('pack', $arr));
|
631 |
+
}
|
632 |
+
|
633 |
+
/**
|
634 |
+
* @internal You should not use this directly from another application
|
635 |
+
*
|
636 |
+
* @param SplFixedArray[SplFixedArray] $ctx
|
637 |
+
* @return string
|
638 |
+
* @throws TypeError
|
639 |
+
* @psalm-suppress MixedArgument
|
640 |
+
* @psalm-suppress MixedAssignment
|
641 |
+
* @psalm-suppress MixedArrayAccess
|
642 |
+
* @psalm-suppress MixedArrayAssignment
|
643 |
+
* @psalm-suppress MixedArrayOffset
|
644 |
+
* @psalm-suppress MixedMethodCall
|
645 |
+
*/
|
646 |
+
public static function contextToString(SplFixedArray $ctx)
|
647 |
+
{
|
648 |
+
$str = '';
|
649 |
+
/** @var array<int, array<int, int>> $ctxA */
|
650 |
+
$ctxA = $ctx[0]->toArray();
|
651 |
+
|
652 |
+
# uint64_t h[8];
|
653 |
+
for ($i = 0; $i < 8; ++$i) {
|
654 |
+
$str .= self::store32_le($ctxA[$i][1]);
|
655 |
+
$str .= self::store32_le($ctxA[$i][0]);
|
656 |
+
}
|
657 |
+
|
658 |
+
# uint64_t t[2];
|
659 |
+
# uint64_t f[2];
|
660 |
+
for ($i = 1; $i < 3; ++$i) {
|
661 |
+
$ctxA = $ctx[$i]->toArray();
|
662 |
+
$str .= self::store32_le($ctxA[0][1]);
|
663 |
+
$str .= self::store32_le($ctxA[0][0]);
|
664 |
+
$str .= self::store32_le($ctxA[1][1]);
|
665 |
+
$str .= self::store32_le($ctxA[1][0]);
|
666 |
+
}
|
667 |
+
|
668 |
+
# uint8_t buf[2 * 128];
|
669 |
+
$str .= self::SplFixedArrayToString($ctx[3]);
|
670 |
+
|
671 |
+
# size_t buflen;
|
672 |
+
$str .= implode('', array(
|
673 |
+
self::intToChr($ctx[4] & 0xff),
|
674 |
+
self::intToChr(($ctx[4] >> 8) & 0xff),
|
675 |
+
self::intToChr(($ctx[4] >> 16) & 0xff),
|
676 |
+
self::intToChr(($ctx[4] >> 24) & 0xff),
|
677 |
+
self::intToChr(($ctx[4] >> 32) & 0xff),
|
678 |
+
self::intToChr(($ctx[4] >> 40) & 0xff),
|
679 |
+
self::intToChr(($ctx[4] >> 48) & 0xff),
|
680 |
+
self::intToChr(($ctx[4] >> 56) & 0xff)
|
681 |
+
));
|
682 |
+
# uint8_t last_node;
|
683 |
+
return $str . "\x00";
|
684 |
+
}
|
685 |
+
|
686 |
+
/**
|
687 |
+
* Creates an SplFixedArray containing other SplFixedArray elements, from
|
688 |
+
* a string (compatible with \Sodium\crypto_generichash_{init, update, final})
|
689 |
+
*
|
690 |
+
* @internal You should not use this directly from another application
|
691 |
+
*
|
692 |
+
* @param string $string
|
693 |
+
* @return SplFixedArray
|
694 |
+
* @throws SodiumException
|
695 |
+
* @throws TypeError
|
696 |
+
* @psalm-suppress MixedArrayAssignment
|
697 |
+
*/
|
698 |
+
public static function stringToContext($string)
|
699 |
+
{
|
700 |
+
$ctx = self::context();
|
701 |
+
|
702 |
+
# uint64_t h[8];
|
703 |
+
for ($i = 0; $i < 8; ++$i) {
|
704 |
+
$ctx[0][$i] = SplFixedArray::fromArray(
|
705 |
+
array(
|
706 |
+
self::load_4(
|
707 |
+
self::substr($string, (($i << 3) + 4), 4)
|
708 |
+
),
|
709 |
+
self::load_4(
|
710 |
+
self::substr($string, (($i << 3) + 0), 4)
|
711 |
+
)
|
712 |
+
)
|
713 |
+
);
|
714 |
+
}
|
715 |
+
|
716 |
+
# uint64_t t[2];
|
717 |
+
# uint64_t f[2];
|
718 |
+
for ($i = 1; $i < 3; ++$i) {
|
719 |
+
$ctx[$i][1] = SplFixedArray::fromArray(
|
720 |
+
array(
|
721 |
+
self::load_4(self::substr($string, 76 + (($i - 1) << 4), 4)),
|
722 |
+
self::load_4(self::substr($string, 72 + (($i - 1) << 4), 4))
|
723 |
+
)
|
724 |
+
);
|
725 |
+
$ctx[$i][0] = SplFixedArray::fromArray(
|
726 |
+
array(
|
727 |
+
self::load_4(self::substr($string, 68 + (($i - 1) << 4), 4)),
|
728 |
+
self::load_4(self::substr($string, 64 + (($i - 1) << 4), 4))
|
729 |
+
)
|
730 |
+
);
|
731 |
+
}
|
732 |
+
|
733 |
+
# uint8_t buf[2 * 128];
|
734 |
+
$ctx[3] = self::stringToSplFixedArray(self::substr($string, 96, 256));
|
735 |
+
|
736 |
+
|
737 |
+
# uint8_t buf[2 * 128];
|
738 |
+
$int = 0;
|
739 |
+
for ($i = 0; $i < 8; ++$i) {
|
740 |
+
$int |= self::chrToInt($string[352 + $i]) << ($i << 3);
|
741 |
+
}
|
742 |
+
$ctx[4] = $int;
|
743 |
+
|
744 |
+
return $ctx;
|
745 |
+
}
|
746 |
+
}
|
vendor/paragonie/sodium_compat/src/Core/ChaCha20.php
ADDED
@@ -0,0 +1,395 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if (class_exists('ParagonIE_Sodium_Core_ChaCha20', false)) {
|
4 |
+
return;
|
5 |
+
}
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Class ParagonIE_Sodium_Core_ChaCha20
|
9 |
+
*/
|
10 |
+
class ParagonIE_Sodium_Core_ChaCha20 extends ParagonIE_Sodium_Core_Util
|
11 |
+
{
|
12 |
+
/**
|
13 |
+
* Bitwise left rotation
|
14 |
+
*
|
15 |
+
* @internal You should not use this directly from another application
|
16 |
+
*
|
17 |
+
* @param int $v
|
18 |
+
* @param int $n
|
19 |
+
* @return int
|
20 |
+
*/
|
21 |
+
public static function rotate($v, $n)
|
22 |
+
{
|
23 |
+
$v &= 0xffffffff;
|
24 |
+
$n &= 31;
|
25 |
+
return (int) (
|
26 |
+
0xffffffff & (
|
27 |
+
($v << $n)
|
28 |
+
|
|
29 |
+
($v >> (32 - $n))
|
30 |
+
)
|
31 |
+
);
|
32 |
+
}
|
33 |
+
|
34 |
+
/**
|
35 |
+
* The ChaCha20 quarter round function. Works on four 32-bit integers.
|
36 |
+
*
|
37 |
+
* @internal You should not use this directly from another application
|
38 |
+
*
|
39 |
+
* @param int $a
|
40 |
+
* @param int $b
|
41 |
+
* @param int $c
|
42 |
+
* @param int $d
|
43 |
+
* @return array<int, int>
|
44 |
+
*/
|
45 |
+
protected static function quarterRound($a, $b, $c, $d)
|
46 |
+
{
|
47 |
+
# a = PLUS(a,b); d = ROTATE(XOR(d,a),16);
|
48 |
+
/** @var int $a */
|
49 |
+
$a = ($a + $b) & 0xffffffff;
|
50 |
+
$d = self::rotate($d ^ $a, 16);
|
51 |
+
|
52 |
+
# c = PLUS(c,d); b = ROTATE(XOR(b,c),12);
|
53 |
+
/** @var int $c */
|
54 |
+
$c = ($c + $d) & 0xffffffff;
|
55 |
+
$b = self::rotate($b ^ $c, 12);
|
56 |
+
|
57 |
+
# a = PLUS(a,b); d = ROTATE(XOR(d,a), 8);
|
58 |
+
/** @var int $a */
|
59 |
+
$a = ($a + $b) & 0xffffffff;
|
60 |
+
$d = self::rotate($d ^ $a, 8);
|
61 |
+
|
62 |
+
# c = PLUS(c,d); b = ROTATE(XOR(b,c), 7);
|
63 |
+
/** @var int $c */
|
64 |
+
$c = ($c + $d) & 0xffffffff;
|
65 |
+
$b = self::rotate($b ^ $c, 7);
|
66 |
+
return array((int) $a, (int) $b, (int) $c, (int) $d);
|
67 |
+
}
|
68 |
+
|
69 |
+
/**
|
70 |
+
* @internal You should not use this directly from another application
|
71 |
+
*
|
72 |
+
* @param ParagonIE_Sodium_Core_ChaCha20_Ctx $ctx
|
73 |
+
* @param string $message
|
74 |
+
*
|
75 |
+
* @return string
|
76 |
+
* @throws TypeError
|
77 |
+
* @throws SodiumException
|
78 |
+
*/
|
79 |
+
public static function encryptBytes(
|
80 |
+
ParagonIE_Sodium_Core_ChaCha20_Ctx $ctx,
|
81 |
+
$message = ''
|
82 |
+
) {
|
83 |
+
$bytes = self::strlen($message);
|
84 |
+
|
85 |
+
/*
|
86 |
+
j0 = ctx->input[0];
|
87 |
+
j1 = ctx->input[1];
|
88 |
+
j2 = ctx->input[2];
|
89 |
+
j3 = ctx->input[3];
|
90 |
+
j4 = ctx->input[4];
|
91 |
+
j5 = ctx->input[5];
|
92 |
+
j6 = ctx->input[6];
|
93 |
+
j7 = ctx->input[7];
|
94 |
+
j8 = ctx->input[8];
|
95 |
+
j9 = ctx->input[9];
|
96 |
+
j10 = ctx->input[10];
|
97 |
+
j11 = ctx->input[11];
|
98 |
+
j12 = ctx->input[12];
|
99 |
+
j13 = ctx->input[13];
|
100 |
+
j14 = ctx->input[14];
|
101 |
+
j15 = ctx->input[15];
|
102 |
+
*/
|
103 |
+
$j0 = (int) $ctx[0];
|
104 |
+
$j1 = (int) $ctx[1];
|
105 |
+
$j2 = (int) $ctx[2];
|
106 |
+
$j3 = (int) $ctx[3];
|
107 |
+
$j4 = (int) $ctx[4];
|
108 |
+
$j5 = (int) $ctx[5];
|
109 |
+
$j6 = (int) $ctx[6];
|
110 |
+
$j7 = (int) $ctx[7];
|
111 |
+
$j8 = (int) $ctx[8];
|
112 |
+
$j9 = (int) $ctx[9];
|
113 |
+
$j10 = (int) $ctx[10];
|
114 |
+
$j11 = (int) $ctx[11];
|
115 |
+
$j12 = (int) $ctx[12];
|
116 |
+
$j13 = (int) $ctx[13];
|
117 |
+
$j14 = (int) $ctx[14];
|
118 |
+
$j15 = (int) $ctx[15];
|
119 |
+
|
120 |
+
$c = '';
|
121 |
+
for (;;) {
|
122 |
+
if ($bytes < 64) {
|
123 |
+
$message .= str_repeat("\x00", 64 - $bytes);
|
124 |
+
}
|
125 |
+
|
126 |
+
$x0 = (int) $j0;
|
127 |
+
$x1 = (int) $j1;
|
128 |
+
$x2 = (int) $j2;
|
129 |
+
$x3 = (int) $j3;
|
130 |
+
$x4 = (int) $j4;
|
131 |
+
$x5 = (int) $j5;
|
132 |
+
$x6 = (int) $j6;
|
133 |
+
$x7 = (int) $j7;
|
134 |
+
$x8 = (int) $j8;
|
135 |
+
$x9 = (int) $j9;
|
136 |
+
$x10 = (int) $j10;
|
137 |
+
$x11 = (int) $j11;
|
138 |
+
$x12 = (int) $j12;
|
139 |
+
$x13 = (int) $j13;
|
140 |
+
$x14 = (int) $j14;
|
141 |
+
$x15 = (int) $j15;
|
142 |
+
|
143 |
+
# for (i = 20; i > 0; i -= 2) {
|
144 |
+
for ($i = 20; $i > 0; $i -= 2) {
|
145 |
+
# QUARTERROUND( x0, x4, x8, x12)
|
146 |
+
list($x0, $x4, $x8, $x12) = self::quarterRound($x0, $x4, $x8, $x12);
|
147 |
+
|
148 |
+
# QUARTERROUND( x1, x5, x9, x13)
|
149 |
+
list($x1, $x5, $x9, $x13) = self::quarterRound($x1, $x5, $x9, $x13);
|
150 |
+
|
151 |
+
# QUARTERROUND( x2, x6, x10, x14)
|
152 |
+
list($x2, $x6, $x10, $x14) = self::quarterRound($x2, $x6, $x10, $x14);
|
153 |
+
|
154 |
+
# QUARTERROUND( x3, x7, x11, x15)
|
155 |
+
list($x3, $x7, $x11, $x15) = self::quarterRound($x3, $x7, $x11, $x15);
|
156 |
+
|
157 |
+
# QUARTERROUND( x0, x5, x10, x15)
|
158 |
+
list($x0, $x5, $x10, $x15) = self::quarterRound($x0, $x5, $x10, $x15);
|
159 |
+
|
160 |
+
# QUARTERROUND( x1, x6, x11, x12)
|
161 |
+
list($x1, $x6, $x11, $x12) = self::quarterRound($x1, $x6, $x11, $x12);
|
162 |
+
|
163 |
+
# QUARTERROUND( x2, x7, x8, x13)
|
164 |
+
list($x2, $x7, $x8, $x13) = self::quarterRound($x2, $x7, $x8, $x13);
|
165 |
+
|
166 |
+
# QUARTERROUND( x3, x4, x9, x14)
|
167 |
+
list($x3, $x4, $x9, $x14) = self::quarterRound($x3, $x4, $x9, $x14);
|
168 |
+
}
|
169 |
+
/*
|
170 |
+
x0 = PLUS(x0, j0);
|
171 |
+
x1 = PLUS(x1, j1);
|
172 |
+
x2 = PLUS(x2, j2);
|
173 |
+
x3 = PLUS(x3, j3);
|
174 |
+
x4 = PLUS(x4, j4);
|
175 |
+
x5 = PLUS(x5, j5);
|
176 |
+
x6 = PLUS(x6, j6);
|
177 |
+
x7 = PLUS(x7, j7);
|
178 |
+
x8 = PLUS(x8, j8);
|
179 |
+
x9 = PLUS(x9, j9);
|
180 |
+
x10 = PLUS(x10, j10);
|
181 |
+
x11 = PLUS(x11, j11);
|
182 |
+
x12 = PLUS(x12, j12);
|
183 |
+
x13 = PLUS(x13, j13);
|
184 |
+
x14 = PLUS(x14, j14);
|
185 |
+
x15 = PLUS(x15, j15);
|
186 |
+
*/
|
187 |
+
/** @var int $x0 */
|
188 |
+
$x0 = ($x0 & 0xffffffff) + $j0;
|
189 |
+
/** @var int $x1 */
|
190 |
+
$x1 = ($x1 & 0xffffffff) + $j1;
|
191 |
+
/** @var int $x2 */
|
192 |
+
$x2 = ($x2 & 0xffffffff) + $j2;
|
193 |
+
/** @var int $x3 */
|
194 |
+
$x3 = ($x3 & 0xffffffff) + $j3;
|
195 |
+
/** @var int $x4 */
|
196 |
+
$x4 = ($x4 & 0xffffffff) + $j4;
|
197 |
+
/** @var int $x5 */
|
198 |
+
$x5 = ($x5 & 0xffffffff) + $j5;
|
199 |
+
/** @var int $x6 */
|
200 |
+
$x6 = ($x6 & 0xffffffff) + $j6;
|
201 |
+
/** @var int $x7 */
|
202 |
+
$x7 = ($x7 & 0xffffffff) + $j7;
|
203 |
+
/** @var int $x8 */
|
204 |
+
$x8 = ($x8 & 0xffffffff) + $j8;
|
205 |
+
/** @var int $x9 */
|
206 |
+
$x9 = ($x9 & 0xffffffff) + $j9;
|
207 |
+
/** @var int $x10 */
|
208 |
+
$x10 = ($x10 & 0xffffffff) + $j10;
|
209 |
+
/** @var int $x11 */
|
210 |
+
$x11 = ($x11 & 0xffffffff) + $j11;
|
211 |
+
/** @var int $x12 */
|
212 |
+
$x12 = ($x12 & 0xffffffff) + $j12;
|
213 |
+
/** @var int $x13 */
|
214 |
+
$x13 = ($x13 & 0xffffffff) + $j13;
|
215 |
+
/** @var int $x14 */
|
216 |
+
$x14 = ($x14 & 0xffffffff) + $j14;
|
217 |
+
/** @var int $x15 */
|
218 |
+
$x15 = ($x15 & 0xffffffff) + $j15;
|
219 |
+
|
220 |
+
/*
|
221 |
+
x0 = XOR(x0, LOAD32_LE(m + 0));
|
222 |
+
x1 = XOR(x1, LOAD32_LE(m + 4));
|
223 |
+
x2 = XOR(x2, LOAD32_LE(m + 8));
|
224 |
+
x3 = XOR(x3, LOAD32_LE(m + 12));
|
225 |
+
x4 = XOR(x4, LOAD32_LE(m + 16));
|
226 |
+
x5 = XOR(x5, LOAD32_LE(m + 20));
|
227 |
+
x6 = XOR(x6, LOAD32_LE(m + 24));
|
228 |
+
x7 = XOR(x7, LOAD32_LE(m + 28));
|
229 |
+
x8 = XOR(x8, LOAD32_LE(m + 32));
|
230 |
+
x9 = XOR(x9, LOAD32_LE(m + 36));
|
231 |
+
x10 = XOR(x10, LOAD32_LE(m + 40));
|
232 |
+
x11 = XOR(x11, LOAD32_LE(m + 44));
|
233 |
+
x12 = XOR(x12, LOAD32_LE(m + 48));
|
234 |
+
x13 = XOR(x13, LOAD32_LE(m + 52));
|
235 |
+
x14 = XOR(x14, LOAD32_LE(m + 56));
|
236 |
+
x15 = XOR(x15, LOAD32_LE(m + 60));
|
237 |
+
*/
|
238 |
+
$x0 ^= self::load_4(self::substr($message, 0, 4));
|
239 |
+
$x1 ^= self::load_4(self::substr($message, 4, 4));
|
240 |
+
$x2 ^= self::load_4(self::substr($message, 8, 4));
|
241 |
+
$x3 ^= self::load_4(self::substr($message, 12, 4));
|
242 |
+
$x4 ^= self::load_4(self::substr($message, 16, 4));
|
243 |
+
$x5 ^= self::load_4(self::substr($message, 20, 4));
|
244 |
+
$x6 ^= self::load_4(self::substr($message, 24, 4));
|
245 |
+
$x7 ^= self::load_4(self::substr($message, 28, 4));
|
246 |
+
$x8 ^= self::load_4(self::substr($message, 32, 4));
|
247 |
+
$x9 ^= self::load_4(self::substr($message, 36, 4));
|
248 |
+
$x10 ^= self::load_4(self::substr($message, 40, 4));
|
249 |
+
$x11 ^= self::load_4(self::substr($message, 44, 4));
|
250 |
+
$x12 ^= self::load_4(self::substr($message, 48, 4));
|
251 |
+
$x13 ^= self::load_4(self::substr($message, 52, 4));
|
252 |
+
$x14 ^= self::load_4(self::substr($message, 56, 4));
|
253 |
+
$x15 ^= self::load_4(self::substr($message, 60, 4));
|
254 |
+
|
255 |
+
/*
|
256 |
+
j12 = PLUSONE(j12);
|
257 |
+
if (!j12) {
|
258 |
+
j13 = PLUSONE(j13);
|
259 |
+
}
|
260 |
+
*/
|
261 |
+
++$j12;
|
262 |
+
if ($j12 & 0xf0000000) {
|
263 |
+
throw new SodiumException('Overflow');
|
264 |
+
}
|
265 |
+
|
266 |
+
/*
|
267 |
+
STORE32_LE(c + 0, x0);
|
268 |
+
STORE32_LE(c + 4, x1);
|
269 |
+
STORE32_LE(c + 8, x2);
|
270 |
+
STORE32_LE(c + 12, x3);
|
271 |
+
STORE32_LE(c + 16, x4);
|
272 |
+
STORE32_LE(c + 20, x5);
|
273 |
+
STORE32_LE(c + 24, x6);
|
274 |
+
STORE32_LE(c + 28, x7);
|
275 |
+
STORE32_LE(c + 32, x8);
|
276 |
+
STORE32_LE(c + 36, x9);
|
277 |
+
STORE32_LE(c + 40, x10);
|
278 |
+
STORE32_LE(c + 44, x11);
|
279 |
+
STORE32_LE(c + 48, x12);
|
280 |
+
STORE32_LE(c + 52, x13);
|
281 |
+
STORE32_LE(c + 56, x14);
|
282 |
+
STORE32_LE(c + 60, x15);
|
283 |
+
*/
|
284 |
+
$block = self::store32_le((int) ($x0 & 0xffffffff)) .
|
285 |
+
self::store32_le((int) ($x1 & 0xffffffff)) .
|
286 |
+
self::store32_le((int) ($x2 & 0xffffffff)) .
|
287 |
+
self::store32_le((int) ($x3 & 0xffffffff)) .
|
288 |
+
self::store32_le((int) ($x4 & 0xffffffff)) .
|
289 |
+
self::store32_le((int) ($x5 & 0xffffffff)) .
|
290 |
+
self::store32_le((int) ($x6 & 0xffffffff)) .
|
291 |
+
self::store32_le((int) ($x7 & 0xffffffff)) .
|
292 |
+
self::store32_le((int) ($x8 & 0xffffffff)) .
|
293 |
+
self::store32_le((int) ($x9 & 0xffffffff)) .
|
294 |
+
self::store32_le((int) ($x10 & 0xffffffff)) .
|
295 |
+
self::store32_le((int) ($x11 & 0xffffffff)) .
|
296 |
+
self::store32_le((int) ($x12 & 0xffffffff)) .
|
297 |
+
self::store32_le((int) ($x13 & 0xffffffff)) .
|
298 |
+
self::store32_le((int) ($x14 & 0xffffffff)) .
|
299 |
+
self::store32_le((int) ($x15 & 0xffffffff));
|
300 |
+
|
301 |
+
/* Partial block */
|
302 |
+
if ($bytes < 64) {
|
303 |
+
$c .= self::substr($block, 0, $bytes);
|
304 |
+
break;
|
305 |
+
}
|
306 |
+
|
307 |
+
/* Full block */
|
308 |
+
$c .= $block;
|
309 |
+
$bytes -= 64;
|
310 |
+
if ($bytes <= 0) {
|
311 |
+
break;
|
312 |
+
}
|
313 |
+
$message = self::substr($message, 64);
|
314 |
+
}
|
315 |
+
/* end for(;;) loop */
|
316 |
+
|
317 |
+
$ctx[12] = $j12;
|
318 |
+
$ctx[13] = $j13;
|
319 |
+
return $c;
|
320 |
+
}
|
321 |
+
|
322 |
+
/**
|
323 |
+
* @internal You should not use this directly from another application
|
324 |
+
*
|
325 |
+
* @param int $len
|
326 |
+
* @param string $nonce
|
327 |
+
* @param string $key
|
328 |
+
* @return string
|
329 |
+
* @throws SodiumException
|
330 |
+
* @throws TypeError
|
331 |
+
*/
|
332 |
+
public static function stream($len = 64, $nonce = '', $key = '')
|
333 |
+
{
|
334 |
+
return self::encryptBytes(
|
335 |
+
new ParagonIE_Sodium_Core_ChaCha20_Ctx($key, $nonce),
|
336 |
+
str_repeat("\x00", $len)
|
337 |
+
);
|
338 |
+
}
|
339 |
+
|
340 |
+
/**
|
341 |
+
* @internal You should not use this directly from another application
|
342 |
+
*
|
343 |
+
* @param int $len
|
344 |
+
* @param string $nonce
|
345 |
+
* @param string $key
|
346 |
+
* @return string
|
347 |
+
* @throws SodiumException
|
348 |
+
* @throws TypeError
|
349 |
+
*/
|
350 |
+
public static function ietfStream($len, $nonce = '', $key = '')
|
351 |
+
{
|
352 |
+
return self::encryptBytes(
|
353 |
+
new ParagonIE_Sodium_Core_ChaCha20_IetfCtx($key, $nonce),
|
354 |
+
str_repeat("\x00", $len)
|
355 |
+
);
|
356 |
+
}
|
357 |
+
|
358 |
+
/**
|
359 |
+
* @internal You should not use this directly from another application
|
360 |
+
*
|
361 |
+
* @param string $message
|
362 |
+
* @param string $nonce
|
363 |
+
* @param string $key
|
364 |
+
* @param string $ic
|
365 |
+
* @return string
|
366 |
+
* @throws SodiumException
|
367 |
+
* @throws TypeError
|
368 |
+
*/
|
369 |
+
public static function ietfStreamXorIc($message, $nonce = '', $key = '', $ic = '')
|
370 |
+
{
|
371 |
+
return self::encryptBytes(
|
372 |
+
new ParagonIE_Sodium_Core_ChaCha20_IetfCtx($key, $nonce, $ic),
|
373 |
+
$message
|
374 |
+
);
|
375 |
+
}
|
376 |
+
|
377 |
+
/**
|
378 |
+
* @internal You should not use this directly from another application
|
379 |
+
*
|
380 |
+
* @param string $message
|
381 |
+
* @param string $nonce
|
382 |
+
* @param string $key
|
383 |
+
* @param string $ic
|
384 |
+
* @return string
|
385 |
+
* @throws SodiumException
|
386 |
+
* @throws TypeError
|
387 |
+
*/
|
388 |
+
public static function streamXorIc($message, $nonce = '', $key = '', $ic = '')
|
389 |
+
{
|
390 |
+
return self::encryptBytes(
|
391 |
+
new ParagonIE_Sodium_Core_ChaCha20_Ctx($key, $nonce, $ic),
|
392 |
+
$message
|
393 |
+
);
|
394 |
+
}
|
395 |
+
}
|
vendor/paragonie/sodium_compat/src/Core/ChaCha20/Ctx.php
ADDED
@@ -0,0 +1,120 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if (class_exists('ParagonIE_Sodium_Core_ChaCha20_Ctx', false)) {
|
4 |
+
return;
|
5 |
+
}
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Class ParagonIE_Sodium_Core_ChaCha20_Ctx
|
9 |
+
*/
|
10 |
+
class ParagonIE_Sodium_Core_ChaCha20_Ctx extends ParagonIE_Sodium_Core_Util implements ArrayAccess
|
11 |
+
{
|
12 |
+
/**
|
13 |
+
* @var SplFixedArray<int, int>
|
14 |
+
*/
|
15 |
+
protected $container;
|
16 |
+
|
17 |
+
/**
|
18 |
+
* ParagonIE_Sodium_Core_ChaCha20_Ctx constructor.
|
19 |
+
*
|
20 |
+
* @internal You should not use this directly from another application
|
21 |
+
*
|
22 |
+
* @param string $key ChaCha20 key.
|
23 |
+
* @param string $iv Initialization Vector (a.k.a. nonce).
|
24 |
+
* @param string $counter The initial counter value.
|
25 |
+
* Defaults to 8 0x00 bytes.
|
26 |
+
* @throws InvalidArgumentException
|
27 |
+
* @throws TypeError
|
28 |
+
*/
|
29 |
+
public function __construct($key = '', $iv = '', $counter = '')
|
30 |
+
{
|
31 |
+
if (self::strlen($key) !== 32) {
|
32 |
+
throw new InvalidArgumentException('ChaCha20 expects a 256-bit key.');
|
33 |
+
}
|
34 |
+
if (self::strlen($iv) !== 8) {
|
35 |
+
throw new InvalidArgumentException('ChaCha20 expects a 64-bit nonce.');
|
36 |
+
}
|
37 |
+
$this->container = new SplFixedArray(16);
|
38 |
+
|
39 |
+
/* "expand 32-byte k" as per ChaCha20 spec */
|
40 |
+
$this->container[0] = 0x61707865;
|
41 |
+
$this->container[1] = 0x3320646e;
|
42 |
+
$this->container[2] = 0x79622d32;
|
43 |
+
$this->container[3] = 0x6b206574;
|
44 |
+
$this->container[4] = self::load_4(self::substr($key, 0, 4));
|
45 |
+
$this->container[5] = self::load_4(self::substr($key, 4, 4));
|
46 |
+
$this->container[6] = self::load_4(self::substr($key, 8, 4));
|
47 |
+
$this->container[7] = self::load_4(self::substr($key, 12, 4));
|
48 |
+
$this->container[8] = self::load_4(self::substr($key, 16, 4));
|
49 |
+
$this->container[9] = self::load_4(self::substr($key, 20, 4));
|
50 |
+
$this->container[10] = self::load_4(self::substr($key, 24, 4));
|
51 |
+
$this->container[11] = self::load_4(self::substr($key, 28, 4));
|
52 |
+
|
53 |
+
if (empty($counter)) {
|
54 |
+
$this->container[12] = 0;
|
55 |
+
$this->container[13] = 0;
|
56 |
+
} else {
|
57 |
+
$this->container[12] = self::load_4(self::substr($counter, 0, 4));
|
58 |
+
$this->container[13] = self::load_4(self::substr($counter, 4, 4));
|
59 |
+
}
|
60 |
+
$this->container[14] = self::load_4(self::substr($iv, 0, 4));
|
61 |
+
$this->container[15] = self::load_4(self::substr($iv, 4, 4));
|
62 |
+
}
|
63 |
+
|
64 |
+
/**
|
65 |
+
* @internal You should not use this directly from another application
|
66 |
+
*
|
67 |
+
* @param int $offset
|
68 |
+
* @param int $value
|
69 |
+
* @return void
|
70 |
+
* @psalm-suppress MixedArrayOffset
|
71 |
+
*/
|
72 |
+
public function offsetSet($offset, $value)
|
73 |
+
{
|
74 |
+
if (!is_int($offset)) {
|
75 |
+
throw new InvalidArgumentException('Expected an integer');
|
76 |
+
}
|
77 |
+
if (!is_int($value)) {
|
78 |
+
throw new InvalidArgumentException('Expected an integer');
|
79 |
+
}
|
80 |
+
$this->container[$offset] = $value;
|
81 |
+
}
|
82 |
+
|
83 |
+
/**
|
84 |
+
* @internal You should not use this directly from another application
|
85 |
+
*
|
86 |
+
* @param mixed $offset
|
87 |
+
* @return bool
|
88 |
+
* @psalm-suppress MixedArrayOffset
|
89 |
+
*/
|
90 |
+
public function offsetExists($offset)
|
91 |
+
{
|
92 |
+
return isset($this->container[$offset]);
|
93 |
+
}
|
94 |
+
|
95 |
+
/**
|
96 |
+
* @internal You should not use this directly from another application
|
97 |
+
*
|
98 |
+
* @param mixed $offset
|
99 |
+
* @return void
|
100 |
+
* @psalm-suppress MixedArrayOffset
|
101 |
+
*/
|
102 |
+
public function offsetUnset($offset)
|
103 |
+
{
|
104 |
+
unset($this->container[$offset]);
|
105 |
+
}
|
106 |
+
|
107 |
+
/**
|
108 |
+
* @internal You should not use this directly from another application
|
109 |
+
*
|
110 |
+
* @param mixed $offset
|
111 |
+
* @return mixed|null
|
112 |
+
* @psalm-suppress MixedArrayOffset
|
113 |
+
*/
|
114 |
+
public function offsetGet($offset)
|
115 |
+
{
|
116 |
+
return isset($this->container[$offset])
|
117 |
+
? $this->container[$offset]
|
118 |
+
: null;
|
119 |
+
}
|
120 |
+
}
|
vendor/paragonie/sodium_compat/src/Core/ChaCha20/IetfCtx.php
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if (class_exists('ParagonIE_Sodium_Core_ChaCha20_IetfCtx', false)) {
|
4 |
+
return;
|
5 |
+
}
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Class ParagonIE_Sodium_Core_ChaCha20_IetfCtx
|
9 |
+
*/
|
10 |
+
class ParagonIE_Sodium_Core_ChaCha20_IetfCtx extends ParagonIE_Sodium_Core_ChaCha20_Ctx
|
11 |
+
{
|
12 |
+
/**
|
13 |
+
* ParagonIE_Sodium_Core_ChaCha20_IetfCtx constructor.
|
14 |
+
*
|
15 |
+
* @internal You should not use this directly from another application
|
16 |
+
*
|
17 |
+
* @param string $key ChaCha20 key.
|
18 |
+
* @param string $iv Initialization Vector (a.k.a. nonce).
|
19 |
+
* @param string $counter The initial counter value.
|
20 |
+
* Defaults to 4 0x00 bytes.
|
21 |
+
* @throws InvalidArgumentException
|
22 |
+
* @throws TypeError
|
23 |
+
*/
|
24 |
+
public function __construct($key = '', $iv = '', $counter = '')
|
25 |
+
{
|
26 |
+
if (self::strlen($iv) !== 12) {
|
27 |
+
throw new InvalidArgumentException('ChaCha20 expects a 96-bit nonce in IETF mode.');
|
28 |
+
}
|
29 |
+
parent::__construct($key, self::substr($iv, 0, 8), $counter);
|
30 |
+
|
31 |
+
if (!empty($counter)) {
|
32 |
+
$this->container[12] = self::load_4(self::substr($counter, 0, 4));
|
33 |
+
}
|
34 |
+
$this->container[13] = self::load_4(self::substr($iv, 0, 4));
|
35 |
+
$this->container[14] = self::load_4(self::substr($iv, 4, 4));
|
36 |
+
$this->container[15] = self::load_4(self::substr($iv, 8, 4));
|
37 |
+
}
|
38 |
+
}
|
vendor/paragonie/sodium_compat/src/Core/Curve25519.php
ADDED
@@ -0,0 +1,2978 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if (class_exists('ParagonIE_Sodium_Core_Curve25519', false)) {
|
4 |
+
return;
|
5 |
+
}
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Class ParagonIE_Sodium_Core_Curve25519
|
9 |
+
*
|
10 |
+
* Implements Curve25519 core functions
|
11 |
+
*
|
12 |
+
* Based on the ref10 curve25519 code provided by libsodium
|
13 |
+
*
|
14 |
+
* @ref https://github.com/jedisct1/libsodium/blob/master/src/libsodium/crypto_core/curve25519/ref10/curve25519_ref10.c
|
15 |
+
*/
|
16 |
+
abstract class ParagonIE_Sodium_Core_Curve25519 extends ParagonIE_Sodium_Core_Curve25519_H
|
17 |
+
{
|
18 |
+
/**
|
19 |
+
* Get a field element of size 10 with a value of 0
|
20 |
+
*
|
21 |
+
* @internal You should not use this directly from another application
|
22 |
+
*
|
23 |
+
* @return ParagonIE_Sodium_Core_Curve25519_Fe
|
24 |
+
*/
|
25 |
+
public static function fe_0()
|
26 |
+
{
|
27 |
+
return ParagonIE_Sodium_Core_Curve25519_Fe::fromArray(
|
28 |
+
array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
|
29 |
+
);
|
30 |
+
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Get a field element of size 10 with a value of 1
|
34 |
+
*
|
35 |
+
* @internal You should not use this directly from another application
|
36 |
+
*
|
37 |
+
* @return ParagonIE_Sodium_Core_Curve25519_Fe
|
38 |
+
*/
|
39 |
+
public static function fe_1()
|
40 |
+
{
|
41 |
+
return ParagonIE_Sodium_Core_Curve25519_Fe::fromArray(
|
42 |
+
array(1, 0, 0, 0, 0, 0, 0, 0, 0, 0)
|
43 |
+
);
|
44 |
+
}
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Add two field elements.
|
48 |
+
*
|
49 |
+
* @internal You should not use this directly from another application
|
50 |
+
*
|
51 |
+
* @param ParagonIE_Sodium_Core_Curve25519_Fe $f
|
52 |
+
* @param ParagonIE_Sodium_Core_Curve25519_Fe $g
|
53 |
+
* @return ParagonIE_Sodium_Core_Curve25519_Fe
|
54 |
+
* @psalm-suppress MixedAssignment
|
55 |
+
* @psalm-suppress MixedOperand
|
56 |
+
*/
|
57 |
+
public static function fe_add(
|
58 |
+
ParagonIE_Sodium_Core_Curve25519_Fe $f,
|
59 |
+
ParagonIE_Sodium_Core_Curve25519_Fe $g
|
60 |
+
) {
|
61 |
+
/** @var array<int, int> $arr */
|
62 |
+
$arr = array();
|
63 |
+
for ($i = 0; $i < 10; ++$i) {
|
64 |
+
$arr[$i] = (int) ($f[$i] + $g[$i]);
|
65 |
+
}
|
66 |
+
return ParagonIE_Sodium_Core_Curve25519_Fe::fromArray($arr);
|
67 |
+
}
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Constant-time conditional move.
|
71 |
+
*
|
72 |
+
* @internal You should not use this directly from another application
|
73 |
+
*
|
74 |
+
* @param ParagonIE_Sodium_Core_Curve25519_Fe $f
|
75 |
+
* @param ParagonIE_Sodium_Core_Curve25519_Fe $g
|
76 |
+
* @param int $b
|
77 |
+
* @return ParagonIE_Sodium_Core_Curve25519_Fe
|
78 |
+
* @psalm-suppress MixedAssignment
|
79 |
+
*/
|
80 |
+
public static function fe_cmov(
|
81 |
+
ParagonIE_Sodium_Core_Curve25519_Fe $f,
|
82 |
+
ParagonIE_Sodium_Core_Curve25519_Fe $g,
|
83 |
+
$b = 0
|
84 |
+
) {
|
85 |
+
/** @var array<int, int> $h */
|
86 |
+
$h = array();
|
87 |
+
$b *= -1;
|
88 |
+
for ($i = 0; $i < 10; ++$i) {
|
89 |
+
/** @var int $x */
|
90 |
+
$x = (($f[$i] ^ $g[$i]) & $b);
|
91 |
+
$h[$i] = (int) ($f[$i] ^ $x);
|
92 |
+
}
|
93 |
+
return ParagonIE_Sodium_Core_Curve25519_Fe::fromArray($h);
|
94 |
+
}
|
95 |
+
|
96 |
+
/**
|
97 |
+
* Create a copy of a field element.
|
98 |
+
*
|
99 |
+
* @internal You should not use this directly from another application
|
100 |
+
*
|
101 |
+
* @param ParagonIE_Sodium_Core_Curve25519_Fe $f
|
102 |
+
* @return ParagonIE_Sodium_Core_Curve25519_Fe
|
103 |
+
*/
|
104 |
+
public static function fe_copy(ParagonIE_Sodium_Core_Curve25519_Fe $f)
|
105 |
+
{
|
106 |
+
$h = clone $f;
|
107 |
+
return $h;
|
108 |
+
}
|
109 |
+
|
110 |
+
/**
|
111 |
+
* Give: 32-byte string.
|
112 |
+
* Receive: A field element object to use for internal calculations.
|
113 |
+
*
|
114 |
+
* @internal You should not use this directly from another application
|
115 |
+
*
|
116 |
+
* @param string $s
|
117 |
+
* @return ParagonIE_Sodium_Core_Curve25519_Fe
|
118 |
+
* @throws RangeException
|
119 |
+
* @throws TypeError
|
120 |
+
*/
|
121 |
+
public static function fe_frombytes($s)
|
122 |
+
{
|
123 |
+
if (self::strlen($s) !== 32) {
|
124 |
+
throw new RangeException('Expected a 32-byte string.');
|
125 |
+
}
|
126 |
+
/** @var int $h0 */
|
127 |
+
$h0 = self::load_4($s);
|
128 |
+
/** @var int $h1 */
|
129 |
+
$h1 = self::load_3(self::substr($s, 4, 3)) << 6;
|
130 |
+
/** @var int $h2 */
|
131 |
+
$h2 = self::load_3(self::substr($s, 7, 3)) << 5;
|
132 |
+
/** @var int $h3 */
|
133 |
+
$h3 = self::load_3(self::substr($s, 10, 3)) << 3;
|
134 |
+
/** @var int $h4 */
|
135 |
+
$h4 = self::load_3(self::substr($s, 13, 3)) << 2;
|
136 |
+
/** @var int $h5 */
|
137 |
+
$h5 = self::load_4(self::substr($s, 16, 4));
|
138 |
+
/** @var int $h6 */
|
139 |
+
$h6 = self::load_3(self::substr($s, 20, 3)) << 7;
|
140 |
+
/** @var int $h7 */
|
141 |
+
$h7 = self::load_3(self::substr($s, 23, 3)) << 5;
|
142 |
+
/** @var int $h8 */
|
143 |
+
$h8 = self::load_3(self::substr($s, 26, 3)) << 4;
|
144 |
+
/** @var int $h9 */
|
145 |
+
$h9 = (self::load_3(self::substr($s, 29, 3)) & 8388607) << 2;
|
146 |
+
|
147 |
+
/** @var int $carry9 */
|
148 |
+
$carry9 = ($h9 + (1 << 24)) >> 25;
|
149 |
+
$h0 += self::mul($carry9, 19, 5);
|
150 |
+
$h9 -= $carry9 << 25;
|
151 |
+
/** @var int $carry1 */
|
152 |
+
$carry1 = ($h1 + (1 << 24)) >> 25;
|
153 |
+
$h2 += $carry1;
|
154 |
+
$h1 -= $carry1 << 25;
|
155 |
+
/** @var int $carry3 */
|
156 |
+
$carry3 = ($h3 + (1 << 24)) >> 25;
|
157 |
+
$h4 += $carry3;
|
158 |
+
$h3 -= $carry3 << 25;
|
159 |
+
/** @var int $carry5 */
|
160 |
+
$carry5 = ($h5 + (1 << 24)) >> 25;
|
161 |
+
$h6 += $carry5;
|
162 |
+
$h5 -= $carry5 << 25;
|
163 |
+
/** @var int $carry7 */
|
164 |
+
$carry7 = ($h7 + (1 << 24)) >> 25;
|
165 |
+
$h8 += $carry7;
|
166 |
+
$h7 -= $carry7 << 25;
|
167 |
+
|
168 |
+
/** @var int $carry0 */
|
169 |
+
$carry0 = ($h0 + (1 << 25)) >> 26;
|
170 |
+
$h1 += $carry0;
|
171 |
+
$h0 -= $carry0 << 26;
|
172 |
+
/** @var int $carry2 */
|
173 |
+
$carry2 = ($h2 + (1 << 25)) >> 26;
|
174 |
+
$h3 += $carry2;
|
175 |
+
$h2 -= $carry2 << 26;
|
176 |
+
/** @var int $carry4 */
|
177 |
+
$carry4 = ($h4 + (1 << 25)) >> 26;
|
178 |
+
$h5 += $carry4;
|
179 |
+
$h4 -= $carry4 << 26;
|
180 |
+
/** @var int $carry6 */
|
181 |
+
$carry6 = ($h6 + (1 << 25)) >> 26;
|
182 |
+
$h7 += $carry6;
|
183 |
+
$h6 -= $carry6 << 26;
|
184 |
+
/** @var int $carry8 */
|
185 |
+
$carry8 = ($h8 + (1 << 25)) >> 26;
|
186 |
+
$h9 += $carry8;
|
187 |
+
$h8 -= $carry8 << 26;
|
188 |
+
|
189 |
+
return ParagonIE_Sodium_Core_Curve25519_Fe::fromArray(
|
190 |
+
array(
|
191 |
+
(int) $h0,
|
192 |
+
(int) $h1,
|
193 |
+
(int) $h2,
|
194 |
+
(int) $h3,
|
195 |
+
(int) $h4,
|
196 |
+
(int) $h5,
|
197 |
+
(int) $h6,
|
198 |
+
(int) $h7,
|
199 |
+
(int) $h8,
|
200 |
+
(int) $h9
|
201 |
+
)
|
202 |
+
);
|
203 |
+
}
|
204 |
+
|
205 |
+
/**
|
206 |
+
* Convert a field element to a byte string.
|
207 |
+
*
|
208 |
+
* @internal You should not use this directly from another application
|
209 |
+
*
|
210 |
+
* @param ParagonIE_Sodium_Core_Curve25519_Fe $h
|
211 |
+
* @return string
|
212 |
+
*/
|
213 |
+
public static function fe_tobytes(ParagonIE_Sodium_Core_Curve25519_Fe $h)
|
214 |
+
{
|
215 |
+
/** @var int $h0 */
|
216 |
+
$h0 = (int) $h[0];
|
217 |
+
/** @var int $h1 */
|
218 |
+
$h1 = (int) $h[1];
|
219 |
+
/** @var int $h2 */
|
220 |
+
$h2 = (int) $h[2];
|
221 |
+
/** @var int $h3 */
|
222 |
+
$h3 = (int) $h[3];
|
223 |
+
/** @var int $h4 */
|
224 |
+
$h4 = (int) $h[4];
|
225 |
+
/** @var int $h5 */
|
226 |
+
$h5 = (int) $h[5];
|
227 |
+
/** @var int $h6 */
|
228 |
+
$h6 = (int) $h[6];
|
229 |
+
/** @var int $h7 */
|
230 |
+
$h7 = (int) $h[7];
|
231 |
+
/** @var int $h8 */
|
232 |
+
$h8 = (int) $h[8];
|
233 |
+
/** @var int $h9 */
|
234 |
+
$h9 = (int) $h[9];
|
235 |
+
|
236 |
+
/** @var int $q */
|
237 |
+
$q = (self::mul($h9, 19, 5) + (1 << 24)) >> 25;
|
238 |
+
/** @var int $q */
|
239 |
+
$q = ($h0 + $q) >> 26;
|
240 |
+
/** @var int $q */
|
241 |
+
$q = ($h1 + $q) >> 25;
|
242 |
+
/** @var int $q */
|
243 |
+
$q = ($h2 + $q) >> 26;
|
244 |
+
/** @var int $q */
|
245 |
+
$q = ($h3 + $q) >> 25;
|
246 |
+
/** @var int $q */
|
247 |
+
$q = ($h4 + $q) >> 26;
|
248 |
+
/** @var int $q */
|
249 |
+
$q = ($h5 + $q) >> 25;
|
250 |
+
/** @var int $q */
|
251 |
+
$q = ($h6 + $q) >> 26;
|
252 |
+
/** @var int $q */
|
253 |
+
$q = ($h7 + $q) >> 25;
|
254 |
+
/** @var int $q */
|
255 |
+
$q = ($h8 + $q) >> 26;
|
256 |
+
/** @var int $q */
|
257 |
+
$q = ($h9 + $q) >> 25;
|
258 |
+
|
259 |
+
$h0 += self::mul($q, 19, 5);
|
260 |
+
|
261 |
+
/** @var int $carry0 */
|
262 |
+
$carry0 = $h0 >> 26;
|
263 |
+
$h1 += $carry0;
|
264 |
+
$h0 -= $carry0 << 26;
|
265 |
+
/** @var int $carry1 */
|
266 |
+
$carry1 = $h1 >> 25;
|
267 |
+
$h2 += $carry1;
|
268 |
+
$h1 -= $carry1 << 25;
|
269 |
+
/** @var int $carry2 */
|
270 |
+
$carry2 = $h2 >> 26;
|
271 |
+
$h3 += $carry2;
|
272 |
+
$h2 -= $carry2 << 26;
|
273 |
+
/** @var int $carry3 */
|
274 |
+
$carry3 = $h3 >> 25;
|
275 |
+
$h4 += $carry3;
|
276 |
+
$h3 -= $carry3 << 25;
|
277 |
+
/** @var int $carry4 */
|
278 |
+
$carry4 = $h4 >> 26;
|
279 |
+
$h5 += $carry4;
|
280 |
+
$h4 -= $carry4 << 26;
|
281 |
+
/** @var int $carry5 */
|
282 |
+
$carry5 = $h5 >> 25;
|
283 |
+
$h6 += $carry5;
|
284 |
+
$h5 -= $carry5 << 25;
|
285 |
+
/** @var int $carry6 */
|
286 |
+
$carry6 = $h6 >> 26;
|
287 |
+
$h7 += $carry6;
|
288 |
+
$h6 -= $carry6 << 26;
|
289 |
+
/** @var int $carry7 */
|
290 |
+
$carry7 = $h7 >> 25;
|
291 |
+
$h8 += $carry7;
|
292 |
+
$h7 -= $carry7 << 25;
|
293 |
+
/** @var int $carry8 */
|
294 |
+
$carry8 = $h8 >> 26;
|
295 |
+
$h9 += $carry8;
|
296 |
+
$h8 -= $carry8 << 26;
|
297 |
+
/** @var int $carry9 */
|
298 |
+
$carry9 = $h9 >> 25;
|
299 |
+
$h9 -= $carry9 << 25;
|
300 |
+
|
301 |
+
/**
|
302 |
+
* @var array<int, int>
|
303 |
+
*/
|
304 |
+
$s = array(
|
305 |
+
(int) (($h0 >> 0) & 0xff),
|
306 |
+
(int) (($h0 >> 8) & 0xff),
|
307 |
+
(int) (($h0 >> 16) & 0xff),
|
308 |
+
(int) ((($h0 >> 24) | ($h1 << 2)) & 0xff),
|
309 |
+
(int) (($h1 >> 6) & 0xff),
|
310 |
+
(int) (($h1 >> 14) & 0xff),
|
311 |
+
(int) ((($h1 >> 22) | ($h2 << 3)) & 0xff),
|
312 |
+
(int) (($h2 >> 5) & 0xff),
|
313 |
+
(int) (($h2 >> 13) & 0xff),
|
314 |
+
(int) ((($h2 >> 21) | ($h3 << 5)) & 0xff),
|
315 |
+
(int) (($h3 >> 3) & 0xff),
|
316 |
+
(int) (($h3 >> 11) & 0xff),
|
317 |
+
(int) ((($h3 >> 19) | ($h4 << 6)) & 0xff),
|
318 |
+
(int) (($h4 >> 2) & 0xff),
|
319 |
+
(int) (($h4 >> 10) & 0xff),
|
320 |
+
(int) (($h4 >> 18) & 0xff),
|
321 |
+
(int) (($h5 >> 0) & 0xff),
|
322 |
+
(int) (($h5 >> 8) & 0xff),
|
323 |
+
(int) (($h5 >> 16) & 0xff),
|
324 |
+
(int) ((($h5 >> 24) | ($h6 << 1)) & 0xff),
|
325 |
+
(int) (($h6 >> 7) & 0xff),
|
326 |
+
(int) (($h6 >> 15) & 0xff),
|
327 |
+
(int) ((($h6 >> 23) | ($h7 << 3)) & 0xff),
|
328 |
+
(int) (($h7 >> 5) & 0xff),
|
329 |
+
(int) (($h7 >> 13) & 0xff),
|
330 |
+
(int) ((($h7 >> 21) | ($h8 << 4)) & 0xff),
|
331 |
+
(int) (($h8 >> 4) & 0xff),
|
332 |
+
(int) (($h8 >> 12) & 0xff),
|
333 |
+
(int) ((($h8 >> 20) | ($h9 << 6)) & 0xff),
|
334 |
+
(int) (($h9 >> 2) & 0xff),
|
335 |
+
(int) (($h9 >> 10) & 0xff),
|
336 |
+
(int) (($h9 >> 18) & 0xff)
|
337 |
+
);
|
338 |
+
return self::intArrayToString($s);
|
339 |
+
}
|
340 |
+
|
341 |
+
/**
|
342 |
+
* Is a field element negative? (1 = yes, 0 = no. Used in calculations.)
|
343 |
+
*
|
344 |
+
* @internal You should not use this directly from another application
|
345 |
+
*
|
346 |
+
* @param ParagonIE_Sodium_Core_Curve25519_Fe $f
|
347 |
+
* @return int
|
348 |
+
* @throws SodiumException
|
349 |
+
* @throws TypeError
|
350 |
+
*/
|
351 |
+
public static function fe_isnegative(ParagonIE_Sodium_Core_Curve25519_Fe $f)
|
352 |
+
{
|
353 |
+
$str = self::fe_tobytes($f);
|
354 |
+
return (int) (self::chrToInt($str[0]) & 1);
|
355 |
+
}
|
356 |
+
|
357 |
+
/**
|
358 |
+
* Returns 0 if this field element results in all NUL bytes.
|
359 |
+
*
|
360 |
+
* @internal You should not use this directly from another application
|
361 |
+
*
|
362 |
+
* @param ParagonIE_Sodium_Core_Curve25519_Fe $f
|
363 |
+
* @return bool
|
364 |
+
* @throws SodiumException
|
365 |
+
* @throws TypeError
|
366 |
+
*/
|
367 |
+
public static function fe_isnonzero(ParagonIE_Sodium_Core_Curve25519_Fe $f)
|
368 |
+
{
|
369 |
+
static $zero;
|
370 |
+
if ($zero === null) {
|
371 |
+
$zero = str_repeat("\x00", 32);
|
372 |
+
}
|
373 |
+
/** @var string $zero */
|
374 |
+
/** @var string $str */
|
375 |
+
$str = self::fe_tobytes($f);
|
376 |
+
return !self::verify_32($str, (string) $zero);
|
377 |
+
}
|
378 |
+
|
379 |
+
/**
|
380 |
+
* Multiply two field elements
|
381 |
+
*
|
382 |
+
* h = f * g
|
383 |
+
*
|
384 |
+
* @internal You should not use this directly from another application
|
385 |
+
*
|
386 |
+
* @security Is multiplication a source of timing leaks? If so, can we do
|
387 |
+
* anything to prevent that from happening?
|
388 |
+
*
|
389 |
+
* @param ParagonIE_Sodium_Core_Curve25519_Fe $f
|
390 |
+
* @param ParagonIE_Sodium_Core_Curve25519_Fe $g
|
391 |
+
* @return ParagonIE_Sodium_Core_Curve25519_Fe
|
392 |
+
*/
|
393 |
+
public static function fe_mul(
|
394 |
+
ParagonIE_Sodium_Core_Curve25519_Fe $f,
|
395 |
+
ParagonIE_Sodium_Core_Curve25519_Fe $g
|
396 |
+
) {
|
397 |
+
/** @var int $f0 */
|
398 |
+
$f0 = $f[0];
|
399 |
+
/** @var int $f1 */
|
400 |
+
$f1 = $f[1];
|
401 |
+
/** @var int $f2 */
|
402 |
+
$f2 = $f[2];
|
403 |
+
/** @var int $f3 */
|
404 |
+
$f3 = $f[3];
|
405 |
+
/** @var int $f4 */
|
406 |
+
$f4 = $f[4];
|
407 |
+
/** @var int $f5 */
|
408 |
+
$f5 = $f[5];
|
409 |
+
/** @var int $f6 */
|
410 |
+
$f6 = $f[6];
|
411 |
+
/** @var int $f7 */
|
412 |
+
$f7 = $f[7];
|
413 |
+
/** @var int $f8 */
|
414 |
+
$f8 = $f[8];
|
415 |
+
/** @var int $f9 */
|
416 |
+
$f9 = $f[9];
|
417 |
+
/** @var int $g0 */
|
418 |
+
$g0 = $g[0];
|
419 |
+
/** @var int $g1 */
|
420 |
+
$g1 = $g[1];
|
421 |
+
/** @var int $g2 */
|
422 |
+
$g2 = $g[2];
|
423 |
+
/** @var int $g3 */
|
424 |
+
$g3 = $g[3];
|
425 |
+
/** @var int $g4 */
|
426 |
+
$g4 = $g[4];
|
427 |
+
/** @var int $g5 */
|
428 |
+
$g5 = $g[5];
|
429 |
+
/** @var int $g6 */
|
430 |
+
$g6 = $g[6];
|
431 |
+
/** @var int $g7 */
|
432 |
+
$g7 = $g[7];
|
433 |
+
/** @var int $g8 */
|
434 |
+
$g8 = $g[8];
|
435 |
+
/** @var int $g9 */
|
436 |
+
$g9 = $g[9];
|
437 |
+
$g1_19 = self::mul($g1, 19, 5);
|
438 |
+
$g2_19 = self::mul($g2, 19, 5);
|
439 |
+
$g3_19 = self::mul($g3, 19, 5);
|
440 |
+
$g4_19 = self::mul($g4, 19, 5);
|
441 |
+
$g5_19 = self::mul($g5, 19, 5);
|
442 |
+
$g6_19 = self::mul($g6, 19, 5);
|
443 |
+
$g7_19 = self::mul($g7, 19, 5);
|
444 |
+
$g8_19 = self::mul($g8, 19, 5);
|
445 |
+
$g9_19 = self::mul($g9, 19, 5);
|
446 |
+
/** @var int $f1_2 */
|
447 |
+
$f1_2 = $f1 << 1;
|
448 |
+
/** @var int $f3_2 */
|
449 |
+
$f3_2 = $f3 << 1;
|
450 |
+
/** @var int $f5_2 */
|
451 |
+
$f5_2 = $f5 << 1;
|
452 |
+
/** @var int $f7_2 */
|
453 |
+
$f7_2 = $f7 << 1;
|
454 |
+
/** @var int $f9_2 */
|
455 |
+
$f9_2 = $f9 << 1;
|
456 |
+
$f0g0 = self::mul($f0, $g0, 27);
|
457 |
+
$f0g1 = self::mul($f0, $g1, 26);
|
458 |
+
$f0g2 = self::mul($f0, $g2, 27);
|
459 |
+
$f0g3 = self::mul($f0, $g3, 26);
|
460 |
+
$f0g4 = self::mul($f0, $g4, 27);
|
461 |
+
$f0g5 = self::mul($f0, $g5, 26);
|
462 |
+
$f0g6 = self::mul($f0, $g6, 27);
|
463 |
+
$f0g7 = self::mul($f0, $g7, 26);
|
464 |
+
$f0g8 = self::mul($f0, $g8, 27);
|
465 |
+
$f0g9 = self::mul($f0, $g9, 27);
|
466 |
+
$f1g0 = self::mul($f1, $g0, 27);
|
467 |
+
$f1g1_2 = self::mul($f1_2, $g1, 26);
|
468 |
+
$f1g2 = self::mul($f1, $g2, 27);
|
469 |
+
$f1g3_2 = self::mul($f1_2, $g3, 26);
|
470 |
+
$f1g4 = self::mul($f1, $g4, 27);
|
471 |
+
$f1g5_2 = self::mul($f1_2, $g5, 26);
|
472 |
+
$f1g6 = self::mul($f1, $g6, 27);
|
473 |
+
$f1g7_2 = self::mul($f1_2, $g7, 26);
|
474 |
+
$f1g8 = self::mul($f1, $g8, 27);
|
475 |
+
$f1g9_38 = self::mul($g9_19, $f1_2, 27);
|
476 |
+
$f2g0 = self::mul($f2, $g0, 27);
|
477 |
+
$f2g1 = self::mul($f2, $g1, 26);
|
478 |
+
$f2g2 = self::mul($f2, $g2, 27);
|
479 |
+
$f2g3 = self::mul($f2, $g3, 26);
|
480 |
+
$f2g4 = self::mul($f2, $g4, 27);
|
481 |
+
$f2g5 = self::mul($f2, $g5, 26);
|
482 |
+
$f2g6 = self::mul($f2, $g6, 27);
|
483 |
+
$f2g7 = self::mul($f2, $g7, 26);
|
484 |
+
$f2g8_19 = self::mul($g8_19, $f2, 27);
|
485 |
+
$f2g9_19 = self::mul($g9_19, $f2, 27);
|
486 |
+
$f3g0 = self::mul($f3, $g0, 27);
|
487 |
+
$f3g1_2 = self::mul($f3_2, $g1, 26);
|
488 |
+
$f3g2 = self::mul($f3, $g2, 27);
|
489 |
+
$f3g3_2 = self::mul($f3_2, $g3, 26);
|
490 |
+
$f3g4 = self::mul($f3, $g4, 27);
|
491 |
+
$f3g5_2 = self::mul($f3_2, $g5, 26);
|
492 |
+
$f3g6 = self::mul($f3, $g6, 27);
|
493 |
+
$f3g7_38 = self::mul($g7_19, $f3_2, 27);
|
494 |
+
$f3g8_19 = self::mul($g8_19, $f3, 27);
|
495 |
+
$f3g9_38 = self::mul($g9_19, $f3_2, 27);
|
496 |
+
$f4g0 = self::mul($f4, $g0, 27);
|
497 |
+
$f4g1 = self::mul($f4, $g1, 26);
|
498 |
+
$f4g2 = self::mul($f4, $g2, 27);
|
499 |
+
$f4g3 = self::mul($f4, $g3, 26);
|
500 |
+
$f4g4 = self::mul($f4, $g4, 27);
|
501 |
+
$f4g5 = self::mul($f4, $g5, 26);
|
502 |
+
$f4g6_19 = self::mul($g6_19, $f4, 27);
|
503 |
+
$f4g7_19 = self::mul($g7_19, $f4, 27);
|
504 |
+
$f4g8_19 = self::mul($g8_19, $f4, 27);
|
505 |
+
$f4g9_19 = self::mul($g9_19, $f4, 27);
|
506 |
+
$f5g0 = self::mul($f5, $g0, 27);
|
507 |
+
$f5g1_2 = self::mul($f5_2, $g1, 26);
|
508 |
+
$f5g2 = self::mul($f5, $g2, 27);
|
509 |
+
$f5g3_2 = self::mul($f5_2, $g3, 26);
|
510 |
+
$f5g4 = self::mul($f5, $g4, 27);
|
511 |
+
$f5g5_38 = self::mul($g5_19, $f5_2, 27);
|
512 |
+
$f5g6_19 = self::mul($g6_19, $f5, 26);
|
513 |
+
$f5g7_38 = self::mul($g7_19, $f5_2, 27);
|
514 |
+
$f5g8_19 = self::mul($g8_19, $f5, 26);
|
515 |
+
$f5g9_38 = self::mul($g9_19, $f5_2, 27);
|
516 |
+
$f6g0 = self::mul($f6, $g0, 27);
|
517 |
+
$f6g1 = self::mul($f6, $g1, 26);
|
518 |
+
$f6g2 = self::mul($f6, $g2, 27);
|
519 |
+
$f6g3 = self::mul($f6, $g3, 26);
|
520 |
+
$f6g4_19 = self::mul($g4_19, $f6, 27);
|
521 |
+
$f6g5_19 = self::mul($g5_19, $f6, 27);
|
522 |
+
$f6g6_19 = self::mul($g6_19, $f6, 27);
|
523 |
+
$f6g7_19 = self::mul($g7_19, $f6, 27);
|
524 |
+
$f6g8_19 = self::mul($g8_19, $f6, 27);
|
525 |
+
$f6g9_19 = self::mul($g9_19, $f6, 27);
|
526 |
+
$f7g0 = self::mul($f7, $g0, 27);
|
527 |
+
$f7g1_2 = self::mul($f7_2, $g1, 26);
|
528 |
+
$f7g2 = self::mul($f7, $g2, 27);
|
529 |
+
$f7g3_38 = self::mul($g3_19, $f7_2, 27);
|
530 |
+
$f7g4_19 = self::mul($g4_19, $f7, 27);
|
531 |
+
$f7g5_38 = self::mul($g5_19, $f7_2, 27);
|
532 |
+
$f7g6_19 = self::mul($g6_19, $f7, 27);
|
533 |
+
$f7g7_38 = self::mul($g7_19, $f7_2, 27);
|
534 |
+
$f7g8_19 = self::mul($g8_19, $f7, 27);
|
535 |
+
$f7g9_38 = self::mul($g9_19,$f7_2, 27);
|
536 |
+
$f8g0 = self::mul($f8, $g0, 27);
|
537 |
+
$f8g1 = self::mul($f8, $g1, 26);
|
538 |
+
$f8g2_19 = self::mul($g2_19, $f8, 27);
|
539 |
+
$f8g3_19 = self::mul($g3_19, $f8, 27);
|
540 |
+
$f8g4_19 = self::mul($g4_19, $f8, 27);
|
541 |
+
$f8g5_19 = self::mul($g5_19, $f8, 27);
|
542 |
+
$f8g6_19 = self::mul($g6_19, $f8, 27);
|
543 |
+
$f8g7_19 = self::mul($g7_19, $f8, 27);
|
544 |
+
$f8g8_19 = self::mul($g8_19, $f8, 27);
|
545 |
+
$f8g9_19 = self::mul($g9_19, $f8, 27);
|
546 |
+
$f9g0 = self::mul($f9, $g0, 27);
|
547 |
+
$f9g1_38 = self::mul($g1_19, $f9_2, 27);
|
548 |
+
$f9g2_19 = self::mul($g2_19, $f9, 27);
|
549 |
+
$f9g3_38 = self::mul($g3_19, $f9_2, 27);
|
550 |
+
$f9g4_19 = self::mul($g4_19, $f9, 27);
|
551 |
+
$f9g5_38 = self::mul($g5_19, $f9_2, 27);
|
552 |
+
$f9g6_19 = self::mul($g6_19, $f9, 27);
|
553 |
+
$f9g7_38 = self::mul($g7_19, $f9_2, 27);
|
554 |
+
$f9g8_19 = self::mul($g8_19, $f9, 27);
|
555 |
+
$f9g9_38 = self::mul($g9_19, $f9_2, 27);
|
556 |
+
$h0 = $f0g0 + $f1g9_38 + $f2g8_19 + $f3g7_38 + $f4g6_19 + $f5g5_38 + $f6g4_19 + $f7g3_38 + $f8g2_19 + $f9g1_38;
|
557 |
+
$h1 = $f0g1 + $f1g0 + $f2g9_19 + $f3g8_19 + $f4g7_19 + $f5g6_19 + $f6g5_19 + $f7g4_19 + $f8g3_19 + $f9g2_19;
|
558 |
+
$h2 = $f0g2 + $f1g1_2 + $f2g0 + $f3g9_38 + $f4g8_19 + $f5g7_38 + $f6g6_19 + $f7g5_38 + $f8g4_19 + $f9g3_38;
|
559 |
+
$h3 = $f0g3 + $f1g2 + $f2g1 + $f3g0 + $f4g9_19 + $f5g8_19 + $f6g7_19 + $f7g6_19 + $f8g5_19 + $f9g4_19;
|
560 |
+
$h4 = $f0g4 + $f1g3_2 + $f2g2 + $f3g1_2 + $f4g0 + $f5g9_38 + $f6g8_19 + $f7g7_38 + $f8g6_19 + $f9g5_38;
|
561 |
+
$h5 = $f0g5 + $f1g4 + $f2g3 + $f3g2 + $f4g1 + $f5g0 + $f6g9_19 + $f7g8_19 + $f8g7_19 + $f9g6_19;
|
562 |
+
$h6 = $f0g6 + $f1g5_2 + $f2g4 + $f3g3_2 + $f4g2 + $f5g1_2 + $f6g0 + $f7g9_38 + $f8g8_19 + $f9g7_38;
|
563 |
+
$h7 = $f0g7 + $f1g6 + $f2g5 + $f3g4 + $f4g3 + $f5g2 + $f6g1 + $f7g0 + $f8g9_19 + $f9g8_19;
|
564 |
+
$h8 = $f0g8 + $f1g7_2 + $f2g6 + $f3g5_2 + $f4g4 + $f5g3_2 + $f6g2 + $f7g1_2 + $f8g0 + $f9g9_38;
|
565 |
+
$h9 = $f0g9 + $f1g8 + $f2g7 + $f3g6 + $f4g5 + $f5g4 + $f6g3 + $f7g2 + $f8g1 + $f9g0 ;
|
566 |
+
|
567 |
+
/** @var int $carry0 */
|
568 |
+
$carry0 = ($h0 + (1 << 25)) >> 26;
|
569 |
+
$h1 += $carry0;
|
570 |
+
$h0 -= $carry0 << 26;
|
571 |
+
/** @var int $carry4 */
|
572 |
+
$carry4 = ($h4 + (1 << 25)) >> 26;
|
573 |
+
$h5 += $carry4;
|
574 |
+
$h4 -= $carry4 << 26;
|
575 |
+
|
576 |
+
/** @var int $carry1 */
|
577 |
+
$carry1 = ($h1 + (1 << 24)) >> 25;
|
578 |
+
$h2 += $carry1;
|
579 |
+
$h1 -= $carry1 << 25;
|
580 |
+
/** @var int $carry5 */
|
581 |
+
$carry5 = ($h5 + (1 << 24)) >> 25;
|
582 |
+
$h6 += $carry5;
|
583 |
+
$h5 -= $carry5 << 25;
|
584 |
+
|
585 |
+
/** @var int $carry2 */
|
586 |
+
$carry2 = ($h2 + (1 << 25)) >> 26;
|
587 |
+
$h3 += $carry2;
|
588 |
+
$h2 -= $carry2 << 26;
|
589 |
+
/** @var int $carry6 */
|
590 |
+
$carry6 = ($h6 + (1 << 25)) >> 26;
|
591 |
+
$h7 += $carry6;
|
592 |
+
$h6 -= $carry6 << 26;
|
593 |
+
|
594 |
+
/** @var int $carry3 */
|
595 |
+
$carry3 = ($h3 + (1 << 24)) >> 25;
|
596 |
+
$h4 += $carry3;
|
597 |
+
$h3 -= $carry3 << 25;
|
598 |
+
/** @var int $carry7 */
|
599 |
+
$carry7 = ($h7 + (1 << 24)) >> 25;
|
600 |
+
$h8 += $carry7;
|
601 |
+
$h7 -= $carry7 << 25;
|
602 |
+
|
603 |
+
/** @var int $carry4 */
|
604 |
+
$carry4 = ($h4 + (1 << 25)) >> 26;
|
605 |
+
$h5 += $carry4;
|
606 |
+
$h4 -= $carry4 << 26;
|
607 |
+
/** @var int $carry8 */
|
608 |
+
$carry8 = ($h8 + (1 << 25)) >> 26;
|
609 |
+
$h9 += $carry8;
|
610 |
+
$h8 -= $carry8 << 26;
|
611 |
+
|
612 |
+
/** @var int $carry9 */
|
613 |
+
$carry9 = ($h9 + (1 << 24)) >> 25;
|
614 |
+
$h0 += self::mul($carry9, 19, 5);
|
615 |
+
$h9 -= $carry9 << 25;
|
616 |
+
|
617 |
+
/** @var int $carry0 */
|
618 |
+
$carry0 = ($h0 + (1 << 25)) >> 26;
|
619 |
+
$h1 += $carry0;
|
620 |
+
$h0 -= $carry0 << 26;
|
621 |
+
|
622 |
+
return ParagonIE_Sodium_Core_Curve25519_Fe::fromArray(
|
623 |
+
array(
|
624 |
+
(int) $h0,
|
625 |
+
(int) $h1,
|
626 |
+
(int) $h2,
|
627 |
+
(int) $h3,
|
628 |
+
(int) $h4,
|
629 |
+
(int) $h5,
|
630 |
+
(int) $h6,
|
631 |
+
(int) $h7,
|
632 |
+
(int) $h8,
|
633 |
+
(int) $h9
|
634 |
+
)
|
635 |
+
);
|
636 |
+
}
|
637 |
+
|
638 |
+
/**
|
639 |
+
* Get the negative values for each piece of the field element.
|
640 |
+
*
|
641 |
+
* h = -f
|
642 |
+
*
|
643 |
+
* @internal You should not use this directly from another application
|
644 |
+
*
|
645 |
+
* @param ParagonIE_Sodium_Core_Curve25519_Fe $f
|
646 |
+
* @return ParagonIE_Sodium_Core_Curve25519_Fe
|
647 |
+
* @psalm-suppress MixedAssignment
|
648 |
+
*/
|
649 |
+
public static function fe_neg(ParagonIE_Sodium_Core_Curve25519_Fe $f)
|
650 |
+
{
|
651 |
+
$h = new ParagonIE_Sodium_Core_Curve25519_Fe();
|
652 |
+
for ($i = 0; $i < 10; ++$i) {
|
653 |
+
$h[$i] = -$f[$i];
|
654 |
+
}
|
655 |
+
return $h;
|
656 |
+
}
|
657 |
+
|
658 |
+
/**
|
659 |
+
* Square a field element
|
660 |
+
*
|
661 |
+
* h = f * f
|
662 |
+
*
|
663 |
+
* @internal You should not use this directly from another application
|
664 |
+
*
|
665 |
+
* @param ParagonIE_Sodium_Core_Curve25519_Fe $f
|
666 |
+
* @return ParagonIE_Sodium_Core_Curve25519_Fe
|
667 |
+
*/
|
668 |
+
public static function fe_sq(ParagonIE_Sodium_Core_Curve25519_Fe $f)
|
669 |
+
{
|
670 |
+
$f0 = (int) $f[0];
|
671 |
+
$f1 = (int) $f[1];
|
672 |
+
$f2 = (int) $f[2];
|
673 |
+
$f3 = (int) $f[3];
|
674 |
+
$f4 = (int) $f[4];
|
675 |
+
$f5 = (int) $f[5];
|
676 |
+
$f6 = (int) $f[6];
|
677 |
+
$f7 = (int) $f[7];
|
678 |
+
$f8 = (int) $f[8];
|
679 |
+
$f9 = (int) $f[9];
|
680 |
+
|
681 |
+
/** @var int $f0_2 */
|
682 |
+
$f0_2 = $f0 << 1;
|
683 |
+
/** @var int $f1_2 */
|
684 |
+
$f1_2 = $f1 << 1;
|
685 |
+
/** @var int $f2_2 */
|
686 |
+
$f2_2 = $f2 << 1;
|
687 |
+
/** @var int $f3_2 */
|
688 |
+
$f3_2 = $f3 << 1;
|
689 |
+
/** @var int $f4_2 */
|
690 |
+
$f4_2 = $f4 << 1;
|
691 |
+
/** @var int $f5_2 */
|
692 |
+
$f5_2 = $f5 << 1;
|
693 |
+
/** @var int $f6_2 */
|
694 |
+
$f6_2 = $f6 << 1;
|
695 |
+
/** @var int $f7_2 */
|
696 |
+
$f7_2 = $f7 << 1;
|
697 |
+
$f5_38 = self::mul($f5, 38, 6);
|
698 |
+
$f6_19 = self::mul($f6, 19, 5);
|
699 |
+
$f7_38 = self::mul($f7, 38, 6);
|
700 |
+
$f8_19 = self::mul($f8, 19, 5);
|
701 |
+
$f9_38 = self::mul($f9, 38, 6);
|
702 |
+
$f0f0 = self::mul($f0, $f0, 26);
|
703 |
+
$f0f1_2 = self::mul($f0_2, $f1, 26);
|
704 |
+
$f0f2_2 = self::mul($f0_2, $f2, 26);
|
705 |
+
$f0f3_2 = self::mul($f0_2, $f3, 26);
|
706 |
+
$f0f4_2 = self::mul($f0_2, $f4, 26);
|
707 |
+
$f0f5_2 = self::mul($f0_2, $f5, 26);
|
708 |
+
$f0f6_2 = self::mul($f0_2, $f6, 26);
|
709 |
+
$f0f7_2 = self::mul($f0_2, $f7, 26);
|
710 |
+
$f0f8_2 = self::mul($f0_2, $f8, 26);
|
711 |
+
$f0f9_2 = self::mul($f0_2, $f9, 26);
|
712 |
+
$f1f1_2 = self::mul($f1_2, $f1, 26);
|
713 |
+
$f1f2_2 = self::mul($f1_2, $f2, 26);
|
714 |
+
$f1f3_4 = self::mul($f1_2, $f3_2, 26);
|
715 |
+
$f1f4_2 = self::mul($f1_2, $f4, 26);
|
716 |
+
$f1f5_4 = self::mul($f1_2, $f5_2, 27);
|
717 |
+
$f1f6_2 = self::mul($f1_2, $f6, 26);
|
718 |
+
$f1f7_4 = self::mul($f1_2, $f7_2, 26);
|
719 |
+
$f1f8_2 = self::mul($f1_2, $f8, 26);
|
720 |
+
$f1f9_76 = self::mul($f9_38, $f1_2, 26);
|
721 |
+
$f2f2 = self::mul($f2, $f2, 26);
|
722 |
+
$f2f3_2 = self::mul($f2_2, $f3, 26);
|
723 |
+
$f2f4_2 = self::mul($f2_2, $f4, 26);
|
724 |
+
$f2f5_2 = self::mul($f2_2, $f5, 26);
|
725 |
+
$f2f6_2 = self::mul($f2_2, $f6, 26);
|
726 |
+
$f2f7_2 = self::mul($f2_2, $f7, 26);
|
727 |
+
$f2f8_38 = self::mul($f8_19, $f2_2, 27);
|
728 |
+
$f2f9_38 = self::mul($f9_38, $f2, 26);
|
729 |
+
$f3f3_2 = self::mul($f3_2, $f3, 26);
|
730 |
+
$f3f4_2 = self::mul($f3_2, $f4, 26);
|
731 |
+
$f3f5_4 = self::mul($f3_2, $f5_2, 27);
|
732 |
+
$f3f6_2 = self::mul($f3_2, $f6, 26);
|
733 |
+
$f3f7_76 = self::mul($f7_38, $f3_2, 26);
|
734 |
+
$f3f8_38 = self::mul($f8_19, $f3_2, 26);
|
735 |
+
$f3f9_76 = self::mul($f9_38, $f3_2, 26);
|
736 |
+
$f4f4 = self::mul($f4, $f4, 26);
|
737 |
+
$f4f5_2 = self::mul($f4_2, $f5, 26);
|
738 |
+
$f4f6_38 = self::mul($f6_19, $f4_2, 27);
|
739 |
+
$f4f7_38 = self::mul($f7_38, $f4, 26);
|
740 |
+
$f4f8_38 = self::mul($f8_19, $f4_2, 27);
|
741 |
+
$f4f9_38 = self::mul($f9_38, $f4, 26);
|
742 |
+
$f5f5_38 = self::mul($f5_38, $f5, 26);
|
743 |
+
$f5f6_38 = self::mul($f6_19, $f5_2, 27);
|
744 |
+
$f5f7_76 = self::mul($f7_38, $f5_2, 27);
|
745 |
+
$f5f8_38 = self::mul($f8_19, $f5_2, 27);
|
746 |
+
$f5f9_76 = self::mul($f9_38, $f5_2, 27);
|
747 |
+
$f6f6_19 = self::mul($f6_19, $f6, 26);
|
748 |
+
$f6f7_38 = self::mul($f7_38, $f6, 26);
|
749 |
+
$f6f8_38 = self::mul($f8_19, $f6_2, 27);
|
750 |
+
$f6f9_38 = self::mul($f9_38, $f6, 26);
|
751 |
+
$f7f7_38 = self::mul($f7_38, $f7, 26);
|
752 |
+
$f7f8_38 = self::mul($f8_19, $f7_2, 27);
|
753 |
+
$f7f9_76 = self::mul($f9_38, $f7_2, 27);
|
754 |
+
$f8f8_19 = self::mul($f8_19, $f8, 26);
|
755 |
+
$f8f9_38 = self::mul($f9_38, $f8, 26);
|
756 |
+
$f9f9_38 = self::mul($f9_38, $f9, 27);
|
757 |
+
$h0 = $f0f0 + $f1f9_76 + $f2f8_38 + $f3f7_76 + $f4f6_38 + $f5f5_38;
|
758 |
+
$h1 = $f0f1_2 + $f2f9_38 + $f3f8_38 + $f4f7_38 + $f5f6_38;
|
759 |
+
$h2 = $f0f2_2 + $f1f1_2 + $f3f9_76 + $f4f8_38 + $f5f7_76 + $f6f6_19;
|
760 |
+
$h3 = $f0f3_2 + $f1f2_2 + $f4f9_38 + $f5f8_38 + $f6f7_38;
|
761 |
+
$h4 = $f0f4_2 + $f1f3_4 + $f2f2 + $f5f9_76 + $f6f8_38 + $f7f7_38;
|
762 |
+
$h5 = $f0f5_2 + $f1f4_2 + $f2f3_2 + $f6f9_38 + $f7f8_38;
|
763 |
+
$h6 = $f0f6_2 + $f1f5_4 + $f2f4_2 + $f3f3_2 + $f7f9_76 + $f8f8_19;
|
764 |
+
$h7 = $f0f7_2 + $f1f6_2 + $f2f5_2 + $f3f4_2 + $f8f9_38;
|
765 |
+
$h8 = $f0f8_2 + $f1f7_4 + $f2f6_2 + $f3f5_4 + $f4f4 + $f9f9_38;
|
766 |
+
$h9 = $f0f9_2 + $f1f8_2 + $f2f7_2 + $f3f6_2 + $f4f5_2;
|
767 |
+
|
768 |
+
/** @var int $carry0 */
|
769 |
+
$carry0 = ($h0 + (1 << 25)) >> 26;
|
770 |
+
$h1 += $carry0;
|
771 |
+
$h0 -= $carry0 << 26;
|
772 |
+
/** @var int $carry4 */
|
773 |
+
$carry4 = ($h4 + (1 << 25)) >> 26;
|
774 |
+
$h5 += $carry4;
|
775 |
+
$h4 -= $carry4 << 26;
|
776 |
+
|
777 |
+
/** @var int $carry1 */
|
778 |
+
$carry1 = ($h1 + (1 << 24)) >> 25;
|
779 |
+
$h2 += $carry1;
|
780 |
+
$h1 -= $carry1 << 25;
|
781 |
+
/** @var int $carry5 */
|
782 |
+
$carry5 = ($h5 + (1 << 24)) >> 25;
|
783 |
+
$h6 += $carry5;
|
784 |
+
$h5 -= $carry5 << 25;
|
785 |
+
|
786 |
+
/** @var int $carry2 */
|
787 |
+
$carry2 = ($h2 + (1 << 25)) >> 26;
|
788 |
+
$h3 += $carry2;
|
789 |
+
$h2 -= $carry2 << 26;
|
790 |
+
/** @var int $carry6 */
|
791 |
+
$carry6 = ($h6 + (1 << 25)) >> 26;
|
792 |
+
$h7 += $carry6;
|
793 |
+
$h6 -= $carry6 << 26;
|
794 |
+
|
795 |
+
/** @var int $carry3 */
|
796 |
+
$carry3 = ($h3 + (1 << 24)) >> 25;
|
797 |
+
$h4 += $carry3;
|
798 |
+
$h3 -= $carry3 << 25;
|
799 |
+
/** @var int $carry7 */
|
800 |
+
$carry7 = ($h7 + (1 << 24)) >> 25;
|
801 |
+
$h8 += $carry7;
|
802 |
+
$h7 -= $carry7 << 25;
|
803 |
+
|
804 |
+
/** @var int $carry4 */
|
805 |
+
$carry4 = ($h4 + (1 << 25)) >> 26;
|
806 |
+
$h5 += $carry4;
|
807 |
+
$h4 -= $carry4 << 26;
|
808 |
+
/** @var int $carry8 */
|
809 |
+
$carry8 = ($h8 + (1 << 25)) >> 26;
|
810 |
+
$h9 += $carry8;
|
811 |
+
$h8 -= $carry8 << 26;
|
812 |
+
|
813 |
+
/** @var int $carry9 */
|
814 |
+
$carry9 = ($h9 + (1 << 24)) >> 25;
|
815 |
+
$h0 += self::mul($carry9, 19, 5);
|
816 |
+
$h9 -= $carry9 << 25;
|
817 |
+
|
818 |
+
/** @var int $carry0 */
|
819 |
+
$carry0 = ($h0 + (1 << 25)) >> 26;
|
820 |
+
$h1 += $carry0;
|
821 |
+
$h0 -= $carry0 << 26;
|
822 |
+
|
823 |
+
return ParagonIE_Sodium_Core_Curve25519_Fe::fromArray(
|
824 |
+
array(
|
825 |
+
(int) $h0,
|
826 |
+
(int) $h1,
|
827 |
+
(int) $h2,
|
828 |
+
(int) $h3,
|
829 |
+
(int) $h4,
|
830 |
+
(int) $h5,
|
831 |
+
(int) $h6,
|
832 |
+
(int) $h7,
|
833 |
+
(int) $h8,
|
834 |
+
(int) $h9
|
835 |
+
)
|
836 |
+
);
|
837 |
+
}
|
838 |
+
|
839 |
+
|
840 |
+
/**
|
841 |
+
* Square and double a field element
|
842 |
+
*
|
843 |
+
* h = 2 * f * f
|
844 |
+
*
|
845 |
+
* @internal You should not use this directly from another application
|
846 |
+
*
|
847 |
+
* @param ParagonIE_Sodium_Core_Curve25519_Fe $f
|
848 |
+
* @return ParagonIE_Sodium_Core_Curve25519_Fe
|
849 |
+
*/
|
850 |
+
public static function fe_sq2(ParagonIE_Sodium_Core_Curve25519_Fe $f)
|
851 |
+
{
|
852 |
+
$f0 = (int) $f[0];
|
853 |
+
$f1 = (int) $f[1];
|
854 |
+
$f2 = (int) $f[2];
|
855 |
+
$f3 = (int) $f[3];
|
856 |
+
$f4 = (int) $f[4];
|
857 |
+
$f5 = (int) $f[5];
|
858 |
+
$f6 = (int) $f[6];
|
859 |
+
$f7 = (int) $f[7];
|
860 |
+
$f8 = (int) $f[8];
|
861 |
+
$f9 = (int) $f[9];
|
862 |
+
|
863 |
+
/** @var int $f0_2 */
|
864 |
+
$f0_2 = $f0 << 1;
|
865 |
+
/** @var int $f1_2 */
|
866 |
+
$f1_2 = $f1 << 1;
|
867 |
+
/** @var int $f2_2 */
|
868 |
+
$f2_2 = $f2 << 1;
|
869 |
+
/** @var int $f3_2 */
|
870 |
+
$f3_2 = $f3 << 1;
|
871 |
+
/** @var int $f4_2 */
|
872 |
+
$f4_2 = $f4 << 1;
|
873 |
+
/** @var int $f5_2 */
|
874 |
+
$f5_2 = $f5 << 1;
|
875 |
+
/** @var int $f6_2 */
|
876 |
+
$f6_2 = $f6 << 1;
|
877 |
+
/** @var int $f7_2 */
|
878 |
+
$f7_2 = $f7 << 1;
|
879 |
+
$f5_38 = self::mul($f5, 38, 6); /* 1.959375*2^30 */
|
880 |
+
$f6_19 = self::mul($f6, 19, 5); /* 1.959375*2^30 */
|
881 |
+
$f7_38 = self::mul($f7, 38, 6); /* 1.959375*2^30 */
|
882 |
+
$f8_19 = self::mul($f8, 19, 5); /* 1.959375*2^30 */
|
883 |
+
$f9_38 = self::mul($f9, 38, 6); /* 1.959375*2^30 */
|
884 |
+
$f0f0 = self::mul($f0, $f0, 26);
|
885 |
+
$f0f1_2 = self::mul($f0_2, $f1, 26);
|
886 |
+
$f0f2_2 = self::mul($f0_2, $f2, 26);
|
887 |
+
$f0f3_2 = self::mul($f0_2, $f3, 26);
|
888 |
+
$f0f4_2 = self::mul($f0_2, $f4, 26);
|
889 |
+
$f0f5_2 = self::mul($f0_2, $f5, 26);
|
890 |
+
$f0f6_2 = self::mul($f0_2, $f6, 26);
|
891 |
+
$f0f7_2 = self::mul($f0_2, $f7, 26);
|
892 |
+
$f0f8_2 = self::mul($f0_2, $f8, 26);
|
893 |
+
$f0f9_2 = self::mul($f0_2, $f9, 26);
|
894 |
+
$f1f1_2 = self::mul($f1_2, $f1, 26);
|
895 |
+
$f1f2_2 = self::mul($f1_2, $f2, 26);
|
896 |
+
$f1f3_4 = self::mul($f1_2, $f3_2, 27);
|
897 |
+
$f1f4_2 = self::mul($f1_2, $f4, 26);
|
898 |
+
$f1f5_4 = self::mul($f1_2, $f5_2, 27);
|
899 |
+
$f1f6_2 = self::mul($f1_2, $f6, 26);
|
900 |
+
$f1f7_4 = self::mul($f1_2, $f7_2, 27);
|
901 |
+
$f1f8_2 = self::mul($f1_2, $f8, 26);
|
902 |
+
$f1f9_76 = self::mul($f9_38, $f1_2, 27);
|
903 |
+
$f2f2 = self::mul($f2, $f2, 26);
|
904 |
+
$f2f3_2 = self::mul($f2_2, $f3, 26);
|
905 |
+
$f2f4_2 = self::mul($f2_2, $f4, 26);
|
906 |
+
$f2f5_2 = self::mul($f2_2, $f5, 26);
|
907 |
+
$f2f6_2 = self::mul($f2_2, $f6, 26);
|
908 |
+
$f2f7_2 = self::mul($f2_2, $f7, 26);
|
909 |
+
$f2f8_38 = self::mul($f8_19, $f2_2, 27);
|
910 |
+
$f2f9_38 = self::mul($f9_38, $f2, 26);
|
911 |
+
$f3f3_2 = self::mul($f3_2, $f3, 26);
|
912 |
+
$f3f4_2 = self::mul($f3_2, $f4, 26);
|
913 |
+
$f3f5_4 = self::mul($f3_2, $f5_2, 27);
|
914 |
+
$f3f6_2 = self::mul($f3_2, $f6, 27);
|
915 |
+
$f3f7_76 = self::mul($f7_38, $f3_2, 27);
|
916 |
+
$f3f8_38 = self::mul($f8_19, $f3_2, 27);
|
917 |
+
$f3f9_76 = self::mul($f9_38, $f3_2, 27);
|
918 |
+
$f4f4 = self::mul($f4, $f4, 26);
|
919 |
+
$f4f5_2 = self::mul($f4_2, $f5, 26);
|
920 |
+
$f4f6_38 = self::mul($f6_19, $f4_2, 27);
|
921 |
+
$f4f7_38 = self::mul($f7_38, $f4, 27);
|
922 |
+
$f4f8_38 = self::mul($f8_19, $f4_2, 27);
|
923 |
+
$f4f9_38 = self::mul($f9_38, $f4, 27);
|
924 |
+
$f5f5_38 = self::mul($f5_38, $f5, 26);
|
925 |
+
$f5f6_38 = self::mul($f6_19, $f5_2, 27);
|
926 |
+
$f5f7_76 = self::mul($f7_38, $f5_2, 27);
|
927 |
+
$f5f8_38 = self::mul($f8_19, $f5_2, 27);
|
928 |
+
$f5f9_76 = self::mul($f9_38, $f5_2, 27);
|
929 |
+
$f6f6_19 = self::mul($f6_19, $f6, 26);
|
930 |
+
$f6f7_38 = self::mul($f7_38, $f6, 26);
|
931 |
+
$f6f8_38 = self::mul($f8_19, $f6_2, 27);
|
932 |
+
$f6f9_38 = self::mul($f9_38, $f6, 26);
|
933 |
+
$f7f7_38 = self::mul($f7_38, $f7, 26);
|
934 |
+
$f7f8_38 = self::mul($f8_19, $f7_2, 27);
|
935 |
+
$f7f9_76 = self::mul($f9_38, $f7_2, 27);
|
936 |
+
$f8f8_19 = self::mul($f8_19, $f8, 26);
|
937 |
+
$f8f9_38 = self::mul($f9_38, $f8, 26);
|
938 |
+
$f9f9_38 = self::mul($f9_38, $f9, 27);
|
939 |
+
|
940 |
+
/** @var int $h0 */
|
941 |
+
$h0 = (int) ($f0f0 + $f1f9_76 + $f2f8_38 + $f3f7_76 + $f4f6_38 + $f5f5_38) << 1;
|
942 |
+
/** @var int $h1 */
|
943 |
+
$h1 = (int) ($f0f1_2 + $f2f9_38 + $f3f8_38 + $f4f7_38 + $f5f6_38) << 1;
|
944 |
+
/** @var int $h2 */
|
945 |
+
$h2 = (int) ($f0f2_2 + $f1f1_2 + $f3f9_76 + $f4f8_38 + $f5f7_76 + $f6f6_19) << 1;
|
946 |
+
/** @var int $h3 */
|
947 |
+
$h3 = (int) ($f0f3_2 + $f1f2_2 + $f4f9_38 + $f5f8_38 + $f6f7_38) << 1;
|
948 |
+
/** @var int $h4 */
|
949 |
+
$h4 = (int) ($f0f4_2 + $f1f3_4 + $f2f2 + $f5f9_76 + $f6f8_38 + $f7f7_38) << 1;
|
950 |
+
/** @var int $h5 */
|
951 |
+
$h5 = (int) ($f0f5_2 + $f1f4_2 + $f2f3_2 + $f6f9_38 + $f7f8_38) << 1;
|
952 |
+
/** @var int $h6 */
|
953 |
+
$h6 = (int) ($f0f6_2 + $f1f5_4 + $f2f4_2 + $f3f3_2 + $f7f9_76 + $f8f8_19) << 1;
|
954 |
+
/** @var int $h7 */
|
955 |
+
$h7 = (int) ($f0f7_2 + $f1f6_2 + $f2f5_2 + $f3f4_2 + $f8f9_38) << 1;
|
956 |
+
/** @var int $h8 */
|
957 |
+
$h8 = (int) ($f0f8_2 + $f1f7_4 + $f2f6_2 + $f3f5_4 + $f4f4 + $f9f9_38) << 1;
|
958 |
+
/** @var int $h9 */
|
959 |
+
$h9 = (int) ($f0f9_2 + $f1f8_2 + $f2f7_2 + $f3f6_2 + $f4f5_2) << 1;
|
960 |
+
|
961 |
+
/** @var int $carry0 */
|
962 |
+
$carry0 = ($h0 + (1 << 25)) >> 26;
|
963 |
+
$h1 += $carry0;
|
964 |
+
$h0 -= $carry0 << 26;
|
965 |
+
/** @var int $carry4 */
|
966 |
+
$carry4 = ($h4 + (1 << 25)) >> 26;
|
967 |
+
$h5 += $carry4;
|
968 |
+
$h4 -= $carry4 << 26;
|
969 |
+
|
970 |
+
/** @var int $carry1 */
|
971 |
+
$carry1 = ($h1 + (1 << 24)) >> 25;
|
972 |
+
$h2 += $carry1;
|
973 |
+
$h1 -= $carry1 << 25;
|
974 |
+
/** @var int $carry5 */
|
975 |
+
$carry5 = ($h5 + (1 << 24)) >> 25;
|
976 |
+
$h6 += $carry5;
|
977 |
+
$h5 -= $carry5 << 25;
|
978 |
+
|
979 |
+
/** @var int $carry2 */
|
980 |
+
$carry2 = ($h2 + (1 << 25)) >> 26;
|
981 |
+
$h3 += $carry2;
|
982 |
+
$h2 -= $carry2 << 26;
|
983 |
+
/** @var int $carry6 */
|
984 |
+
$carry6 = ($h6 + (1 << 25)) >> 26;
|
985 |
+
$h7 += $carry6;
|
986 |
+
$h6 -= $carry6 << 26;
|
987 |
+
|
988 |
+
/** @var int $carry3 */
|
989 |
+
$carry3 = ($h3 + (1 << 24)) >> 25;
|
990 |
+
$h4 += $carry3;
|
991 |
+
$h3 -= $carry3 << 25;
|
992 |
+
/** @var int $carry7 */
|
993 |
+
$carry7 = ($h7 + (1 << 24)) >> 25;
|
994 |
+
$h8 += $carry7;
|
995 |
+
$h7 -= $carry7 << 25;
|
996 |
+
|
997 |
+
/** @var int $carry4 */
|
998 |
+
$carry4 = ($h4 + (1 << 25)) >> 26;
|
999 |
+
$h5 += $carry4;
|
1000 |
+
$h4 -= $carry4 << 26;
|
1001 |
+
/** @var int $carry8 */
|
1002 |
+
$carry8 = ($h8 + (1 << 25)) >> 26;
|
1003 |
+
$h9 += $carry8;
|
1004 |
+
$h8 -= $carry8 << 26;
|
1005 |
+
|
1006 |
+
/** @var int $carry9 */
|
1007 |
+
$carry9 = ($h9 + (1 << 24)) >> 25;
|
1008 |
+
$h0 += self::mul($carry9, 19, 5);
|
1009 |
+
$h9 -= $carry9 << 25;
|
1010 |
+
|
1011 |
+
/** @var int $carry0 */
|
1012 |
+
$carry0 = ($h0 + (1 << 25)) >> 26;
|
1013 |
+
$h1 += $carry0;
|
1014 |
+
$h0 -= $carry0 << 26;
|
1015 |
+
|
1016 |
+
return ParagonIE_Sodium_Core_Curve25519_Fe::fromArray(
|
1017 |
+
array(
|
1018 |
+
(int) $h0,
|
1019 |
+
(int) $h1,
|
1020 |
+
(int) $h2,
|
1021 |
+
(int) $h3,
|
1022 |
+
(int) $h4,
|
1023 |
+
(int) $h5,
|
1024 |
+
(int) $h6,
|
1025 |
+
(int) $h7,
|
1026 |
+
(int) $h8,
|
1027 |
+
(int) $h9
|
1028 |
+
)
|
1029 |
+
);
|
1030 |
+
}
|
1031 |
+
|
1032 |
+
/**
|
1033 |
+
* @internal You should not use this directly from another application
|
1034 |
+
*
|
1035 |
+
* @param ParagonIE_Sodium_Core_Curve25519_Fe $Z
|
1036 |
+
* @return ParagonIE_Sodium_Core_Curve25519_Fe
|
1037 |
+
*/
|
1038 |
+
public static function fe_invert(ParagonIE_Sodium_Core_Curve25519_Fe $Z)
|
1039 |
+
{
|
1040 |
+
$z = clone $Z;
|
1041 |
+
$t0 = self::fe_sq($z);
|
1042 |
+
$t1 = self::fe_sq($t0);
|
1043 |
+
$t1 = self::fe_sq($t1);
|
1044 |
+
$t1 = self::fe_mul($z, $t1);
|
1045 |
+
$t0 = self::fe_mul($t0, $t1);
|
1046 |
+
$t2 = self::fe_sq($t0);
|
1047 |
+
$t1 = self::fe_mul($t1, $t2);
|
1048 |
+
$t2 = self::fe_sq($t1);
|
1049 |
+
for ($i = 1; $i < 5; ++$i) {
|
1050 |
+
$t2 = self::fe_sq($t2);
|
1051 |
+
}
|
1052 |
+
$t1 = self::fe_mul($t2, $t1);
|
1053 |
+
$t2 = self::fe_sq($t1);
|
1054 |
+
for ($i = 1; $i < 10; ++$i) {
|
1055 |
+
$t2 = self::fe_sq($t2);
|
1056 |
+
}
|
1057 |
+
$t2 = self::fe_mul($t2, $t1);
|
1058 |
+
$t3 = self::fe_sq($t2);
|
1059 |
+
for ($i = 1; $i < 20; ++$i) {
|
1060 |
+
$t3 = self::fe_sq($t3);
|
1061 |
+
}
|
1062 |
+
$t2 = self::fe_mul($t3, $t2);
|
1063 |
+
$t2 = self::fe_sq($t2);
|
1064 |
+
for ($i = 1; $i < 10; ++$i) {
|
1065 |
+
$t2 = self::fe_sq($t2);
|
1066 |
+
}
|
1067 |
+
$t1 = self::fe_mul($t2, $t1);
|
1068 |
+
$t2 = self::fe_sq($t1);
|
1069 |
+
for ($i = 1; $i < 50; ++$i) {
|
1070 |
+
$t2 = self::fe_sq($t2);
|
1071 |
+
}
|
1072 |
+
$t2 = self::fe_mul($t2, $t1);
|
1073 |
+
$t3 = self::fe_sq($t2);
|
1074 |
+
for ($i = 1; $i < 100; ++$i) {
|
1075 |
+
$t3 = self::fe_sq($t3);
|
1076 |
+
}
|
1077 |
+
$t2 = self::fe_mul($t3, $t2);
|
1078 |
+
$t2 = self::fe_sq($t2);
|
1079 |
+
for ($i = 1; $i < 50; ++$i) {
|
1080 |
+
$t2 = self::fe_sq($t2);
|
1081 |
+
}
|
1082 |
+
$t1 = self::fe_mul($t2, $t1);
|
1083 |
+
$t1 = self::fe_sq($t1);
|
1084 |
+
for ($i = 1; $i < 5; ++$i) {
|
1085 |
+
$t1 = self::fe_sq($t1);
|
1086 |
+
}
|
1087 |
+
return self::fe_mul($t1, $t0);
|
1088 |
+
}
|
1089 |
+
|
1090 |
+
/**
|
1091 |
+
* @internal You should not use this directly from another application
|
1092 |
+
*
|
1093 |
+
* @ref https://github.com/jedisct1/libsodium/blob/68564326e1e9dc57ef03746f85734232d20ca6fb/src/libsodium/crypto_core/curve25519/ref10/curve25519_ref10.c#L1054-L1106
|
1094 |
+
*
|
1095 |
+
* @param ParagonIE_Sodium_Core_Curve25519_Fe $z
|
1096 |
+
* @return ParagonIE_Sodium_Core_Curve25519_Fe
|
1097 |
+
*/
|
1098 |
+
public static function fe_pow22523(ParagonIE_Sodium_Core_Curve25519_Fe $z)
|
1099 |
+
{
|
1100 |
+
# fe_sq(t0, z);
|
1101 |
+
# fe_sq(t1, t0);
|
1102 |
+
# fe_sq(t1, t1);
|
1103 |
+
# fe_mul(t1, z, t1);
|
1104 |
+
# fe_mul(t0, t0, t1);
|
1105 |
+
# fe_sq(t0, t0);
|
1106 |
+
# fe_mul(t0, t1, t0);
|
1107 |
+
# fe_sq(t1, t0);
|
1108 |
+
$t0 = self::fe_sq($z);
|
1109 |
+
$t1 = self::fe_sq($t0);
|
1110 |
+
$t1 = self::fe_sq($t1);
|
1111 |
+
$t1 = self::fe_mul($z, $t1);
|
1112 |
+
$t0 = self::fe_mul($t0, $t1);
|
1113 |
+
$t0 = self::fe_sq($t0);
|
1114 |
+
$t0 = self::fe_mul($t1, $t0);
|
1115 |
+
$t1 = self::fe_sq($t0);
|
1116 |
+
|
1117 |
+
# for (i = 1; i < 5; ++i) {
|
1118 |
+
# fe_sq(t1, t1);
|
1119 |
+
# }
|
1120 |
+
for ($i = 1; $i < 5; ++$i) {
|
1121 |
+
$t1 = self::fe_sq($t1);
|
1122 |
+
}
|
1123 |
+
|
1124 |
+
# fe_mul(t0, t1, t0);
|
1125 |
+
# fe_sq(t1, t0);
|
1126 |
+
$t0 = self::fe_mul($t1, $t0);
|
1127 |
+
$t1 = self::fe_sq($t0);
|
1128 |
+
|
1129 |
+
# for (i = 1; i < 10; ++i) {
|
1130 |
+
# fe_sq(t1, t1);
|
1131 |
+
# }
|
1132 |
+
for ($i = 1; $i < 10; ++$i) {
|
1133 |
+
$t1 = self::fe_sq($t1);
|
1134 |
+
}
|
1135 |
+
|
1136 |
+
# fe_mul(t1, t1, t0);
|
1137 |
+
# fe_sq(t2, t1);
|
1138 |
+
$t1 = self::fe_mul($t1, $t0);
|
1139 |
+
$t2 = self::fe_sq($t1);
|
1140 |
+
|
1141 |
+
# for (i = 1; i < 20; ++i) {
|
1142 |
+
# fe_sq(t2, t2);
|
1143 |
+
# }
|
1144 |
+
for ($i = 1; $i < 20; ++$i) {
|
1145 |
+
$t2 = self::fe_sq($t2);
|
1146 |
+
}
|
1147 |
+
|
1148 |
+
# fe_mul(t1, t2, t1);
|
1149 |
+
# fe_sq(t1, t1);
|
1150 |
+
$t1 = self::fe_mul($t2, $t1);
|
1151 |
+
$t1 = self::fe_sq($t1);
|
1152 |
+
|
1153 |
+
# for (i = 1; i < 10; ++i) {
|
1154 |
+
# fe_sq(t1, t1);
|
1155 |
+
# }
|
1156 |
+
for ($i = 1; $i < 10; ++$i) {
|
1157 |
+
$t1 = self::fe_sq($t1);
|
1158 |
+
}
|
1159 |
+
|
1160 |
+
# fe_mul(t0, t1, t0);
|
1161 |
+
# fe_sq(t1, t0);
|
1162 |
+
$t0 = self::fe_mul($t1, $t0);
|
1163 |
+
$t1 = self::fe_sq($t0);
|
1164 |
+
|
1165 |
+
# for (i = 1; i < 50; ++i) {
|
1166 |
+
# fe_sq(t1, t1);
|
1167 |
+
# }
|
1168 |
+
for ($i = 1; $i < 50; ++$i) {
|
1169 |
+
$t1 = self::fe_sq($t1);
|
1170 |
+
}
|
1171 |
+
|
1172 |
+
# fe_mul(t1, t1, t0);
|
1173 |
+
# fe_sq(t2, t1);
|
1174 |
+
$t1 = self::fe_mul($t1, $t0);
|
1175 |
+
$t2 = self::fe_sq($t1);
|
1176 |
+
|
1177 |
+
# for (i = 1; i < 100; ++i) {
|
1178 |
+
# fe_sq(t2, t2);
|
1179 |
+
# }
|
1180 |
+
for ($i = 1; $i < 100; ++$i) {
|
1181 |
+
$t2 = self::fe_sq($t2);
|
1182 |
+
}
|
1183 |
+
|
1184 |
+
# fe_mul(t1, t2, t1);
|
1185 |
+
# fe_sq(t1, t1);
|
1186 |
+
$t1 = self::fe_mul($t2, $t1);
|
1187 |
+
$t1 = self::fe_sq($t1);
|
1188 |
+
|
1189 |
+
# for (i = 1; i < 50; ++i) {
|
1190 |
+
# fe_sq(t1, t1);
|
1191 |
+
# }
|
1192 |
+
for ($i = 1; $i < 50; ++$i) {
|
1193 |
+
$t1 = self::fe_sq($t1);
|
1194 |
+
}
|
1195 |
+
|
1196 |
+
# fe_mul(t0, t1, t0);
|
1197 |
+
# fe_sq(t0, t0);
|
1198 |
+
# fe_sq(t0, t0);
|
1199 |
+
# fe_mul(out, t0, z);
|
1200 |
+
$t0 = self::fe_mul($t1, $t0);
|
1201 |
+
$t0 = self::fe_sq($t0);
|
1202 |
+
$t0 = self::fe_sq($t0);
|
1203 |
+
return self::fe_mul($t0, $z);
|
1204 |
+
}
|
1205 |
+
|
1206 |
+
/**
|
1207 |
+
* Subtract two field elements.
|
1208 |
+
*
|
1209 |
+
* h = f - g
|
1210 |
+
*
|
1211 |
+
* Preconditions:
|
1212 |
+
* |f| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc.
|
1213 |
+
* |g| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc.
|
1214 |
+
*
|
1215 |
+
* Postconditions:
|
1216 |
+
* |h| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc.
|
1217 |
+
*
|
1218 |
+
* @internal You should not use this directly from another application
|
1219 |
+
*
|
1220 |
+
* @param ParagonIE_Sodium_Core_Curve25519_Fe $f
|
1221 |
+
* @param ParagonIE_Sodium_Core_Curve25519_Fe $g
|
1222 |
+
* @return ParagonIE_Sodium_Core_Curve25519_Fe
|
1223 |
+
* @psalm-suppress MixedOperand
|
1224 |
+
*/
|
1225 |
+
public static function fe_sub(ParagonIE_Sodium_Core_Curve25519_Fe $f, ParagonIE_Sodium_Core_Curve25519_Fe $g)
|
1226 |
+
{
|
1227 |
+
return ParagonIE_Sodium_Core_Curve25519_Fe::fromArray(
|
1228 |
+
array(
|
1229 |
+
(int) ($f[0] - $g[0]),
|
1230 |
+
(int) ($f[1] - $g[1]),
|
1231 |
+
(int) ($f[2] - $g[2]),
|
1232 |
+
(int) ($f[3] - $g[3]),
|
1233 |
+
(int) ($f[4] - $g[4]),
|
1234 |
+
(int) ($f[5] - $g[5]),
|
1235 |
+
(int) ($f[6] - $g[6]),
|
1236 |
+
(int) ($f[7] - $g[7]),
|
1237 |
+
(int) ($f[8] - $g[8]),
|
1238 |
+
(int) ($f[9] - $g[9])
|
1239 |
+
)
|
1240 |
+
);
|
1241 |
+
}
|
1242 |
+
|
1243 |
+
/**
|
1244 |
+
* Add two group elements.
|
1245 |
+
*
|
1246 |
+
* r = p + q
|
1247 |
+
*
|
1248 |
+
* @internal You should not use this directly from another application
|
1249 |
+
*
|
1250 |
+
* @param ParagonIE_Sodium_Core_Curve25519_Ge_P3 $p
|
1251 |
+
* @param ParagonIE_Sodium_Core_Curve25519_Ge_Cached $q
|
1252 |
+
* @return ParagonIE_Sodium_Core_Curve25519_Ge_P1p1
|
1253 |
+
*/
|
1254 |
+
public static function ge_add(
|
1255 |
+
ParagonIE_Sodium_Core_Curve25519_Ge_P3 $p,
|
1256 |
+
ParagonIE_Sodium_Core_Curve25519_Ge_Cached $q
|
1257 |
+
) {
|
1258 |
+
$r = new ParagonIE_Sodium_Core_Curve25519_Ge_P1p1();
|
1259 |
+
$r->X = self::fe_add($p->Y, $p->X);
|
1260 |
+
$r->Y = self::fe_sub($p->Y, $p->X);
|
1261 |
+
$r->Z = self::fe_mul($r->X, $q->YplusX);
|
1262 |
+
$r->Y = self::fe_mul($r->Y, $q->YminusX);
|
1263 |
+
$r->T = self::fe_mul($q->T2d, $p->T);
|
1264 |
+
$r->X = self::fe_mul($p->Z, $q->Z);
|
1265 |
+
$t0 = self::fe_add($r->X, $r->X);
|
1266 |
+
$r->X = self::fe_sub($r->Z, $r->Y);
|
1267 |
+
$r->Y = self::fe_add($r->Z, $r->Y);
|
1268 |
+
$r->Z = self::fe_add($t0, $r->T);
|
1269 |
+
$r->T = self::fe_sub($t0, $r->T);
|
1270 |
+
return $r;
|
1271 |
+
}
|
1272 |
+
|
1273 |
+
/**
|
1274 |
+
* @internal You should not use this directly from another application
|
1275 |
+
*
|
1276 |
+
* @ref https://github.com/jedisct1/libsodium/blob/157c4a80c13b117608aeae12178b2d38825f9f8f/src/libsodium/crypto_core/curve25519/ref10/curve25519_ref10.c#L1185-L1215
|
1277 |
+
* @param string $a
|
1278 |
+
* @return array<int, mixed>
|
1279 |
+
* @throws SodiumException
|
1280 |
+
* @throws TypeError
|
1281 |
+
*/
|
1282 |
+
public static function slide($a)
|
1283 |
+
{
|
1284 |
+
if (self::strlen($a) < 256) {
|
1285 |
+
if (self::strlen($a) < 16) {
|
1286 |
+
$a = str_pad($a, 256, '0', STR_PAD_RIGHT);
|
1287 |
+
}
|
1288 |
+
}
|
1289 |
+
/** @var array<int, int> $r */
|
1290 |
+
$r = array();
|
1291 |
+
|
1292 |
+
/** @var int $i */
|
1293 |
+
for ($i = 0; $i < 256; ++$i) {
|
1294 |
+
$r[$i] = (int) (
|
1295 |
+
1 & (
|
1296 |
+
self::chrToInt($a[(int) ($i >> 3)])
|
1297 |
+
>>
|
1298 |
+
($i & 7)
|
1299 |
+
)
|
1300 |
+
);
|
1301 |
+
}
|
1302 |
+
|
1303 |
+
for ($i = 0;$i < 256;++$i) {
|
1304 |
+
if ($r[$i]) {
|
1305 |
+
for ($b = 1;$b <= 6 && $i + $b < 256;++$b) {
|
1306 |
+
if ($r[$i + $b]) {
|
1307 |
+
if ($r[$i] + ($r[$i + $b] << $b) <= 15) {
|
1308 |
+
$r[$i] += $r[$i + $b] << $b;
|
1309 |
+
$r[$i + $b] = 0;
|
1310 |
+
} elseif ($r[$i] - ($r[$i + $b] << $b) >= -15) {
|
1311 |
+
$r[$i] -= $r[$i + $b] << $b;
|
1312 |
+
for ($k = $i + $b; $k < 256; ++$k) {
|
1313 |
+
if (!$r[$k]) {
|
1314 |
+
$r[$k] = 1;
|
1315 |
+
break;
|
1316 |
+
}
|
1317 |
+
$r[$k] = 0;
|
1318 |
+
}
|
1319 |
+
} else {
|
1320 |
+
break;
|
1321 |
+
}
|
1322 |
+
}
|
1323 |
+
}
|
1324 |
+
}
|
1325 |
+
}
|
1326 |
+
return $r;
|
1327 |
+
}
|
1328 |
+
|
1329 |
+
/**
|
1330 |
+
* @internal You should not use this directly from another application
|
1331 |
+
*
|
1332 |
+
* @param string $s
|
1333 |
+
* @return ParagonIE_Sodium_Core_Curve25519_Ge_P3
|
1334 |
+
* @throws SodiumException
|
1335 |
+
* @throws TypeError
|
1336 |
+
*/
|
1337 |
+
public static function ge_frombytes_negate_vartime($s)
|
1338 |
+
{
|
1339 |
+
static $d = null;
|
1340 |
+
if (!$d) {
|
1341 |
+
$d = ParagonIE_Sodium_Core_Curve25519_Fe::fromArray(self::$d);
|
1342 |
+
}
|
1343 |
+
|
1344 |
+
# fe_frombytes(h->Y,s);
|
1345 |
+
# fe_1(h->Z);
|
1346 |
+
$h = new ParagonIE_Sodium_Core_Curve25519_Ge_P3(
|
1347 |
+
self::fe_0(),
|
1348 |
+
self::fe_frombytes($s),
|
1349 |
+
self::fe_1()
|
1350 |
+
);
|
1351 |
+
|
1352 |
+
# fe_sq(u,h->Y);
|
1353 |
+
# fe_mul(v,u,d);
|
1354 |
+
# fe_sub(u,u,h->Z); /* u = y^2-1 */
|
1355 |
+
# fe_add(v,v,h->Z); /* v = dy^2+1 */
|
1356 |
+
$u = self::fe_sq($h->Y);
|
1357 |
+
/** @var ParagonIE_Sodium_Core_Curve25519_Fe $d */
|
1358 |
+
$v = self::fe_mul($u, $d);
|
1359 |
+
$u = self::fe_sub($u, $h->Z); /* u = y^2 - 1 */
|
1360 |
+
$v = self::fe_add($v, $h->Z); /* v = dy^2 + 1 */
|
1361 |
+
|
1362 |
+
# fe_sq(v3,v);
|
1363 |
+
# fe_mul(v3,v3,v); /* v3 = v^3 */
|
1364 |
+
# fe_sq(h->X,v3);
|
1365 |
+
# fe_mul(h->X,h->X,v);
|
1366 |
+
# fe_mul(h->X,h->X,u); /* x = uv^7 */
|
1367 |
+
$v3 = self::fe_sq($v);
|
1368 |
+
$v3 = self::fe_mul($v3, $v); /* v3 = v^3 */
|
1369 |
+
$h->X = self::fe_sq($v3);
|
1370 |
+
$h->X = self::fe_mul($h->X, $v);
|
1371 |
+
$h->X = self::fe_mul($h->X, $u); /* x = uv^7 */
|
1372 |
+
|
1373 |
+
# fe_pow22523(h->X,h->X); /* x = (uv^7)^((q-5)/8) */
|
1374 |
+
# fe_mul(h->X,h->X,v3);
|
1375 |
+
# fe_mul(h->X,h->X,u); /* x = uv^3(uv^7)^((q-5)/8) */
|
1376 |
+
$h->X = self::fe_pow22523($h->X); /* x = (uv^7)^((q-5)/8) */
|
1377 |
+
$h->X = self::fe_mul($h->X, $v3);
|
1378 |
+
$h->X = self::fe_mul($h->X, $u); /* x = uv^3(uv^7)^((q-5)/8) */
|
1379 |
+
|
1380 |
+
# fe_sq(vxx,h->X);
|
1381 |
+
# fe_mul(vxx,vxx,v);
|
1382 |
+
# fe_sub(check,vxx,u); /* vx^2-u */
|
1383 |
+
$vxx = self::fe_sq($h->X);
|
1384 |
+
$vxx = self::fe_mul($vxx, $v);
|
1385 |
+
$check = self::fe_sub($vxx, $u); /* vx^2 - u */
|
1386 |
+
|
1387 |
+
# if (fe_isnonzero(check)) {
|
1388 |
+
# fe_add(check,vxx,u); /* vx^2+u */
|
1389 |
+
# if (fe_isnonzero(check)) {
|
1390 |
+
# return -1;
|
1391 |
+
# }
|
1392 |
+
# fe_mul(h->X,h->X,sqrtm1);
|
1393 |
+
# }
|
1394 |
+
if (self::fe_isnonzero($check)) {
|
1395 |
+
$check = self::fe_add($vxx, $u); /* vx^2 + u */
|
1396 |
+
if (self::fe_isnonzero($check)) {
|
1397 |
+
throw new RangeException('Internal check failed.');
|
1398 |
+
}
|
1399 |
+
$h->X = self::fe_mul(
|
1400 |
+
$h->X,
|
1401 |
+
ParagonIE_Sodium_Core_Curve25519_Fe::fromArray(self::$sqrtm1)
|
1402 |
+
);
|
1403 |
+
}
|
1404 |
+
|
1405 |
+
# if (fe_isnegative(h->X) == (s[31] >> 7)) {
|
1406 |
+
# fe_neg(h->X,h->X);
|
1407 |
+
# }
|
1408 |
+
$i = self::chrToInt($s[31]);
|
1409 |
+
if (self::fe_isnegative($h->X) === ($i >> 7)) {
|
1410 |
+
$h->X = self::fe_neg($h->X);
|
1411 |
+
}
|
1412 |
+
|
1413 |
+
# fe_mul(h->T,h->X,h->Y);
|
1414 |
+
$h->T = self::fe_mul($h->X, $h->Y);
|
1415 |
+
return $h;
|
1416 |
+
}
|
1417 |
+
|
1418 |
+
/**
|
1419 |
+
* @internal You should not use this directly from another application
|
1420 |
+
*
|
1421 |
+
* @param ParagonIE_Sodium_Core_Curve25519_Ge_P1p1 $R
|
1422 |
+
* @param ParagonIE_Sodium_Core_Curve25519_Ge_P3 $p
|
1423 |
+
* @param ParagonIE_Sodium_Core_Curve25519_Ge_Precomp $q
|
1424 |
+
* @return ParagonIE_Sodium_Core_Curve25519_Ge_P1p1
|
1425 |
+
*/
|
1426 |
+
public static function ge_madd(
|
1427 |
+
ParagonIE_Sodium_Core_Curve25519_Ge_P1p1 $R,
|
1428 |
+
ParagonIE_Sodium_Core_Curve25519_Ge_P3 $p,
|
1429 |
+
ParagonIE_Sodium_Core_Curve25519_Ge_Precomp $q
|
1430 |
+
) {
|
1431 |
+
$r = clone $R;
|
1432 |
+
$r->X = self::fe_add($p->Y, $p->X);
|
1433 |
+
$r->Y = self::fe_sub($p->Y, $p->X);
|
1434 |
+
$r->Z = self::fe_mul($r->X, $q->yplusx);
|
1435 |
+
$r->Y = self::fe_mul($r->Y, $q->yminusx);
|
1436 |
+
$r->T = self::fe_mul($q->xy2d, $p->T);
|
1437 |
+
$t0 = self::fe_add(clone $p->Z, clone $p->Z);
|
1438 |
+
$r->X = self::fe_sub($r->Z, $r->Y);
|
1439 |
+
$r->Y = self::fe_add($r->Z, $r->Y);
|
1440 |
+
$r->Z = self::fe_add($t0, $r->T);
|
1441 |
+
$r->T = self::fe_sub($t0, $r->T);
|
1442 |
+
|
1443 |
+
return $r;
|
1444 |
+
}
|
1445 |
+
|
1446 |
+
/**
|
1447 |
+
* @internal You should not use this directly from another application
|
1448 |
+
*
|
1449 |
+
* @param ParagonIE_Sodium_Core_Curve25519_Ge_P1p1 $R
|
1450 |
+
* @param ParagonIE_Sodium_Core_Curve25519_Ge_P3 $p
|
1451 |
+
* @param ParagonIE_Sodium_Core_Curve25519_Ge_Precomp $q
|
1452 |
+
* @return ParagonIE_Sodium_Core_Curve25519_Ge_P1p1
|
1453 |
+
*/
|
1454 |
+
public static function ge_msub(
|
1455 |
+
ParagonIE_Sodium_Core_Curve25519_Ge_P1p1 $R,
|
1456 |
+
ParagonIE_Sodium_Core_Curve25519_Ge_P3 $p,
|
1457 |
+
ParagonIE_Sodium_Core_Curve25519_Ge_Precomp $q
|
1458 |
+
) {
|
1459 |
+
$r = clone $R;
|
1460 |
+
|
1461 |
+
$r->X = self::fe_add($p->Y, $p->X);
|
1462 |
+
$r->Y = self::fe_sub($p->Y, $p->X);
|
1463 |
+
$r->Z = self::fe_mul($r->X, $q->yminusx);
|
1464 |
+
$r->Y = self::fe_mul($r->Y, $q->yplusx);
|
1465 |
+
$r->T = self::fe_mul($q->xy2d, $p->T);
|
1466 |
+
$t0 = self::fe_add($p->Z, $p->Z);
|
1467 |
+
$r->X = self::fe_sub($r->Z, $r->Y);
|
1468 |
+
$r->Y = self::fe_add($r->Z, $r->Y);
|
1469 |
+
$r->Z = self::fe_sub($t0, $r->T);
|
1470 |
+
$r->T = self::fe_add($t0, $r->T);
|
1471 |
+
|
1472 |
+
return $r;
|
1473 |
+
}
|
1474 |
+
|
1475 |
+
/**
|
1476 |
+
* @internal You should not use this directly from another application
|
1477 |
+
*
|
1478 |
+
* @param ParagonIE_Sodium_Core_Curve25519_Ge_P1p1 $p
|
1479 |
+
* @return ParagonIE_Sodium_Core_Curve25519_Ge_P2
|
1480 |
+
*/
|
1481 |
+
public static function ge_p1p1_to_p2(ParagonIE_Sodium_Core_Curve25519_Ge_P1p1 $p)
|
1482 |
+
{
|
1483 |
+
$r = new ParagonIE_Sodium_Core_Curve25519_Ge_P2();
|
1484 |
+
$r->X = self::fe_mul($p->X, $p->T);
|
1485 |
+
$r->Y = self::fe_mul($p->Y, $p->Z);
|
1486 |
+
$r->Z = self::fe_mul($p->Z, $p->T);
|
1487 |
+
return $r;
|
1488 |
+
}
|
1489 |
+
|
1490 |
+
/**
|
1491 |
+
* @internal You should not use this directly from another application
|
1492 |
+
*
|
1493 |
+
* @param ParagonIE_Sodium_Core_Curve25519_Ge_P1p1 $p
|
1494 |
+
* @return ParagonIE_Sodium_Core_Curve25519_Ge_P3
|
1495 |
+
*/
|
1496 |
+
public static function ge_p1p1_to_p3(ParagonIE_Sodium_Core_Curve25519_Ge_P1p1 $p)
|
1497 |
+
{
|
1498 |
+
$r = new ParagonIE_Sodium_Core_Curve25519_Ge_P3();
|
1499 |
+
$r->X = self::fe_mul($p->X, $p->T);
|
1500 |
+
$r->Y = self::fe_mul($p->Y, $p->Z);
|
1501 |
+
$r->Z = self::fe_mul($p->Z, $p->T);
|
1502 |
+
$r->T = self::fe_mul($p->X, $p->Y);
|
1503 |
+
return $r;
|
1504 |
+
}
|
1505 |
+
|
1506 |
+
/**
|
1507 |
+
* @internal You should not use this directly from another application
|
1508 |
+
*
|
1509 |
+
* @return ParagonIE_Sodium_Core_Curve25519_Ge_P2
|
1510 |
+
*/
|
1511 |
+
public static function ge_p2_0()
|
1512 |
+
{
|
1513 |
+
return new ParagonIE_Sodium_Core_Curve25519_Ge_P2(
|
1514 |
+
self::fe_0(),
|
1515 |
+
self::fe_1(),
|
1516 |
+
self::fe_1()
|
1517 |
+
);
|
1518 |
+
}
|
1519 |
+
|
1520 |
+
/**
|
1521 |
+
* @internal You should not use this directly from another application
|
1522 |
+
*
|
1523 |
+
* @param ParagonIE_Sodium_Core_Curve25519_Ge_P2 $p
|
1524 |
+
* @return ParagonIE_Sodium_Core_Curve25519_Ge_P1p1
|
1525 |
+
*/
|
1526 |
+
public static function ge_p2_dbl(ParagonIE_Sodium_Core_Curve25519_Ge_P2 $p)
|
1527 |
+
{
|
1528 |
+
$r = new ParagonIE_Sodium_Core_Curve25519_Ge_P1p1();
|
1529 |
+
|
1530 |
+
$r->X = self::fe_sq($p->X);
|
1531 |
+
$r->Z = self::fe_sq($p->Y);
|
1532 |
+
$r->T = self::fe_sq2($p->Z);
|
1533 |
+
$r->Y = self::fe_add($p->X, $p->Y);
|
1534 |
+
$t0 = self::fe_sq($r->Y);
|
1535 |
+
$r->Y = self::fe_add($r->Z, $r->X);
|
1536 |
+
$r->Z = self::fe_sub($r->Z, $r->X);
|
1537 |
+
$r->X = self::fe_sub($t0, $r->Y);
|
1538 |
+
$r->T = self::fe_sub($r->T, $r->Z);
|
1539 |
+
|
1540 |
+
return $r;
|
1541 |
+
}
|
1542 |
+
|
1543 |
+
/**
|
1544 |
+
* @internal You should not use this directly from another application
|
1545 |
+
*
|
1546 |
+
* @return ParagonIE_Sodium_Core_Curve25519_Ge_P3
|
1547 |
+
*/
|
1548 |
+
public static function ge_p3_0()
|
1549 |
+
{
|
1550 |
+
return new ParagonIE_Sodium_Core_Curve25519_Ge_P3(
|
1551 |
+
self::fe_0(),
|
1552 |
+
self::fe_1(),
|
1553 |
+
self::fe_1(),
|
1554 |
+
self::fe_0()
|
1555 |
+
);
|
1556 |
+
}
|
1557 |
+
|
1558 |
+
/**
|
1559 |
+
* @internal You should not use this directly from another application
|
1560 |
+
*
|
1561 |
+
* @param ParagonIE_Sodium_Core_Curve25519_Ge_P3 $p
|
1562 |
+
* @return ParagonIE_Sodium_Core_Curve25519_Ge_Cached
|
1563 |
+
*/
|
1564 |
+
public static function ge_p3_to_cached(ParagonIE_Sodium_Core_Curve25519_Ge_P3 $p)
|
1565 |
+
{
|
1566 |
+
static $d2 = null;
|
1567 |
+
if ($d2 === null) {
|
1568 |
+
$d2 = ParagonIE_Sodium_Core_Curve25519_Fe::fromArray(self::$d2);
|
1569 |
+
}
|
1570 |
+
/** @var ParagonIE_Sodium_Core_Curve25519_Fe $d2 */
|
1571 |
+
$r = new ParagonIE_Sodium_Core_Curve25519_Ge_Cached();
|
1572 |
+
$r->YplusX = self::fe_add($p->Y, $p->X);
|
1573 |
+
$r->YminusX = self::fe_sub($p->Y, $p->X);
|
1574 |
+
$r->Z = self::fe_copy($p->Z);
|
1575 |
+
$r->T2d = self::fe_mul($p->T, $d2);
|
1576 |
+
return $r;
|
1577 |
+
}
|
1578 |
+
|
1579 |
+
/**
|
1580 |
+
* @internal You should not use this directly from another application
|
1581 |
+
*
|
1582 |
+
* @param ParagonIE_Sodium_Core_Curve25519_Ge_P3 $p
|
1583 |
+
* @return ParagonIE_Sodium_Core_Curve25519_Ge_P2
|
1584 |
+
*/
|
1585 |
+
public static function ge_p3_to_p2(ParagonIE_Sodium_Core_Curve25519_Ge_P3 $p)
|
1586 |
+
{
|
1587 |
+
return new ParagonIE_Sodium_Core_Curve25519_Ge_P2(
|
1588 |
+
$p->X,
|
1589 |
+
$p->Y,
|
1590 |
+
$p->Z
|
1591 |
+
);
|
1592 |
+
}
|
1593 |
+
|
1594 |
+
/**
|
1595 |
+
* @internal You should not use this directly from another application
|
1596 |
+
*
|
1597 |
+
* @param ParagonIE_Sodium_Core_Curve25519_Ge_P3 $h
|
1598 |
+
* @return string
|
1599 |
+
* @throws SodiumException
|
1600 |
+
* @throws TypeError
|
1601 |
+
*/
|
1602 |
+
public static function ge_p3_tobytes(ParagonIE_Sodium_Core_Curve25519_Ge_P3 $h)
|
1603 |
+
{
|
1604 |
+
$recip = self::fe_invert($h->Z);
|
1605 |
+
$x = self::fe_mul($h->X, $recip);
|
1606 |
+
$y = self::fe_mul($h->Y, $recip);
|
1607 |
+
$s = self::fe_tobytes($y);
|
1608 |
+
$s[31] = self::intToChr(
|
1609 |
+
self::chrToInt($s[31]) ^ (self::fe_isnegative($x) << 7)
|
1610 |
+
);
|
1611 |
+
return $s;
|
1612 |
+
}
|
1613 |
+
|
1614 |
+
/**
|
1615 |
+
* @internal You should not use this directly from another application
|
1616 |
+
*
|
1617 |
+
* @param ParagonIE_Sodium_Core_Curve25519_Ge_P3 $p
|
1618 |
+
* @return ParagonIE_Sodium_Core_Curve25519_Ge_P1p1
|
1619 |
+
*/
|
1620 |
+
public static function ge_p3_dbl(ParagonIE_Sodium_Core_Curve25519_Ge_P3 $p)
|
1621 |
+
{
|
1622 |
+
$q = self::ge_p3_to_p2($p);
|
1623 |
+
return self::ge_p2_dbl($q);
|
1624 |
+
}
|
1625 |
+
|
1626 |
+
/**
|
1627 |
+
* @return ParagonIE_Sodium_Core_Curve25519_Ge_Precomp
|
1628 |
+
*/
|
1629 |
+
public static function ge_precomp_0()
|
1630 |
+
{
|
1631 |
+
return new ParagonIE_Sodium_Core_Curve25519_Ge_Precomp(
|
1632 |
+
self::fe_1(),
|
1633 |
+
self::fe_1(),
|
1634 |
+
self::fe_0()
|
1635 |
+
);
|
1636 |
+
}
|
1637 |
+
|
1638 |
+
/**
|
1639 |
+
* @internal You should not use this directly from another application
|
1640 |
+
*
|
1641 |
+
* @param int $b
|
1642 |
+
* @param int $c
|
1643 |
+
* @return int
|
1644 |
+
*/
|
1645 |
+
public static function equal($b, $c)
|
1646 |
+
{
|
1647 |
+
return (int) ((($b ^ $c) - 1 & 0xffffffff) >> 31);
|
1648 |
+
}
|
1649 |
+
|
1650 |
+
/**
|
1651 |
+
* @internal You should not use this directly from another application
|
1652 |
+
*
|
1653 |
+
* @param int|string $char
|
1654 |
+
* @return int (1 = yes, 0 = no)
|
1655 |
+
* @throws SodiumException
|
1656 |
+
* @throws TypeError
|
1657 |
+
*/
|
1658 |
+
public static function negative($char)
|
1659 |
+
{
|
1660 |
+
if (is_int($char)) {
|
1661 |
+
return $char < 0 ? 1 : 0;
|
1662 |
+
}
|
1663 |
+
$x = self::chrToInt(self::substr($char, 0, 1));
|
1664 |
+
return (int) ($x >> 63);
|
1665 |
+
}
|
1666 |
+
|
1667 |
+
/**
|
1668 |
+
* Conditional move
|
1669 |
+
*
|
1670 |
+
* @internal You should not use this directly from another application
|
1671 |
+
*
|
1672 |
+
* @param ParagonIE_Sodium_Core_Curve25519_Ge_Precomp $t
|
1673 |
+
* @param ParagonIE_Sodium_Core_Curve25519_Ge_Precomp $u
|
1674 |
+
* @param int $b
|
1675 |
+
* @return ParagonIE_Sodium_Core_Curve25519_Ge_Precomp
|
1676 |
+
*/
|
1677 |
+
public static function cmov(
|
1678 |
+
ParagonIE_Sodium_Core_Curve25519_Ge_Precomp $t,
|
1679 |
+
ParagonIE_Sodium_Core_Curve25519_Ge_Precomp $u,
|
1680 |
+
$b
|
1681 |
+
) {
|
1682 |
+
if (!is_int($b)) {
|
1683 |
+
throw new InvalidArgumentException('Expected an integer.');
|
1684 |
+
}
|
1685 |
+
return new ParagonIE_Sodium_Core_Curve25519_Ge_Precomp(
|
1686 |
+
self::fe_cmov($t->yplusx, $u->yplusx, $b),
|
1687 |
+
self::fe_cmov($t->yminusx, $u->yminusx, $b),
|
1688 |
+
self::fe_cmov($t->xy2d, $u->xy2d, $b)
|
1689 |
+
);
|
1690 |
+
}
|
1691 |
+
|
1692 |
+
/**
|
1693 |
+
* @internal You should not use this directly from another application
|
1694 |
+
*
|
1695 |
+
* @param int $pos
|
1696 |
+
* @param int $b
|
1697 |
+
* @return ParagonIE_Sodium_Core_Curve25519_Ge_Precomp
|
1698 |
+
* @throws SodiumException
|
1699 |
+
* @throws TypeError
|
1700 |
+
* @psalm-suppress MixedArgument
|
1701 |
+
* @psalm-suppress MixedArrayAccess
|
1702 |
+
* @psalm-suppress MixedArrayOffset
|
1703 |
+
*/
|
1704 |
+
public static function ge_select($pos = 0, $b = 0)
|
1705 |
+
{
|
1706 |
+
static $base = null;
|
1707 |
+
if ($base === null) {
|
1708 |
+
$base = array();
|
1709 |
+
/** @var int $i */
|
1710 |
+
foreach (self::$base as $i => $bas) {
|
1711 |
+
for ($j = 0; $j < 8; ++$j) {
|
1712 |
+
$base[$i][$j] = new ParagonIE_Sodium_Core_Curve25519_Ge_Precomp(
|
1713 |
+
ParagonIE_Sodium_Core_Curve25519_Fe::fromArray($bas[$j][0]),
|
1714 |
+
ParagonIE_Sodium_Core_Curve25519_Fe::fromArray($bas[$j][1]),
|
1715 |
+
ParagonIE_Sodium_Core_Curve25519_Fe::fromArray($bas[$j][2])
|
1716 |
+
);
|
1717 |
+
}
|
1718 |
+
}
|
1719 |
+
}
|
1720 |
+
/** @var array<int, array<int, ParagonIE_Sodium_Core_Curve25519_Ge_Precomp>> $base */
|
1721 |
+
if (!is_int($pos)) {
|
1722 |
+
throw new InvalidArgumentException('Position must be an integer');
|
1723 |
+
}
|
1724 |
+
if ($pos < 0 || $pos > 31) {
|
1725 |
+
throw new RangeException('Position is out of range [0, 31]');
|
1726 |
+
}
|
1727 |
+
|
1728 |
+
/** @var int $bnegative */
|
1729 |
+
$bnegative = self::negative($b);
|
1730 |
+
/** @var int $babs */
|
1731 |
+
$babs = $b - (((-$bnegative) & $b) << 1);
|
1732 |
+
|
1733 |
+
$t = self::ge_precomp_0();
|
1734 |
+
for ($i = 0; $i < 8; ++$i) {
|
1735 |
+
$t = self::cmov(
|
1736 |
+
$t,
|
1737 |
+
$base[$pos][$i],
|
1738 |
+
self::equal($babs, $i + 1)
|
1739 |
+
);
|
1740 |
+
}
|
1741 |
+
$minusT = new ParagonIE_Sodium_Core_Curve25519_Ge_Precomp(
|
1742 |
+
self::fe_copy($t->yminusx),
|
1743 |
+
self::fe_copy($t->yplusx),
|
1744 |
+
self::fe_neg($t->xy2d)
|
1745 |
+
);
|
1746 |
+
return self::cmov($t, $minusT, $bnegative);
|
1747 |
+
}
|
1748 |
+
|
1749 |
+
/**
|
1750 |
+
* Subtract two group elements.
|
1751 |
+
*
|
1752 |
+
* r = p - q
|
1753 |
+
*
|
1754 |
+
* @internal You should not use this directly from another application
|
1755 |
+
*
|
1756 |
+
* @param ParagonIE_Sodium_Core_Curve25519_Ge_P3 $p
|
1757 |
+
* @param ParagonIE_Sodium_Core_Curve25519_Ge_Cached $q
|
1758 |
+
* @return ParagonIE_Sodium_Core_Curve25519_Ge_P1p1
|
1759 |
+
*/
|
1760 |
+
public static function ge_sub(
|
1761 |
+
ParagonIE_Sodium_Core_Curve25519_Ge_P3 $p,
|
1762 |
+
ParagonIE_Sodium_Core_Curve25519_Ge_Cached $q
|
1763 |
+
) {
|
1764 |
+
$r = new ParagonIE_Sodium_Core_Curve25519_Ge_P1p1();
|
1765 |
+
|
1766 |
+
$r->X = self::fe_add($p->Y, $p->X);
|
1767 |
+
$r->Y = self::fe_sub($p->Y, $p->X);
|
1768 |
+
$r->Z = self::fe_mul($r->X, $q->YminusX);
|
1769 |
+
$r->Y = self::fe_mul($r->Y, $q->YplusX);
|
1770 |
+
$r->T = self::fe_mul($q->T2d, $p->T);
|
1771 |
+
$r->X = self::fe_mul($p->Z, $q->Z);
|
1772 |
+
$t0 = self::fe_add($r->X, $r->X);
|
1773 |
+
$r->X = self::fe_sub($r->Z, $r->Y);
|
1774 |
+
$r->Y = self::fe_add($r->Z, $r->Y);
|
1775 |
+
$r->Z = self::fe_sub($t0, $r->T);
|
1776 |
+
$r->T = self::fe_add($t0, $r->T);
|
1777 |
+
|
1778 |
+
return $r;
|
1779 |
+
}
|
1780 |
+
|
1781 |
+
/**
|
1782 |
+
* Convert a group element to a byte string.
|
1783 |
+
*
|
1784 |
+
* @param ParagonIE_Sodium_Core_Curve25519_Ge_P2 $h
|
1785 |
+
* @return string
|
1786 |
+
* @throws SodiumException
|
1787 |
+
* @throws TypeError
|
1788 |
+
*/
|
1789 |
+
public static function ge_tobytes(ParagonIE_Sodium_Core_Curve25519_Ge_P2 $h)
|
1790 |
+
{
|
1791 |
+
$recip = self::fe_invert($h->Z);
|
1792 |
+
$x = self::fe_mul($h->X, $recip);
|
1793 |
+
$y = self::fe_mul($h->Y, $recip);
|
1794 |
+
$s = self::fe_tobytes($y);
|
1795 |
+
$s[31] = self::intToChr(
|
1796 |
+
self::chrToInt($s[31]) ^ (self::fe_isnegative($x) << 7)
|
1797 |
+
);
|
1798 |
+
return $s;
|
1799 |
+
}
|
1800 |
+
|
1801 |
+
/**
|
1802 |
+
* @internal You should not use this directly from another application
|
1803 |
+
*
|
1804 |
+
* @param string $a
|
1805 |
+
* @param ParagonIE_Sodium_Core_Curve25519_Ge_P3 $A
|
1806 |
+
* @param string $b
|
1807 |
+
* @return ParagonIE_Sodium_Core_Curve25519_Ge_P2
|
1808 |
+
* @throws SodiumException
|
1809 |
+
* @throws TypeError
|
1810 |
+
* @psalm-suppress MixedArgument
|
1811 |
+
* @psalm-suppress MixedArrayAccess
|
1812 |
+
*/
|
1813 |
+
public static function ge_double_scalarmult_vartime(
|
1814 |
+
$a,
|
1815 |
+
ParagonIE_Sodium_Core_Curve25519_Ge_P3 $A,
|
1816 |
+
$b
|
1817 |
+
) {
|
1818 |
+
/** @var array<int, ParagonIE_Sodium_Core_Curve25519_Ge_Cached> $Ai */
|
1819 |
+
$Ai = array();
|
1820 |
+
|
1821 |
+
/** @var array<int, ParagonIE_Sodium_Core_Curve25519_Ge_Precomp> $Bi */
|
1822 |
+
static $Bi = array();
|
1823 |
+
if (!$Bi) {
|
1824 |
+
for ($i = 0; $i < 8; ++$i) {
|
1825 |
+
$Bi[$i] = new ParagonIE_Sodium_Core_Curve25519_Ge_Precomp(
|
1826 |
+
ParagonIE_Sodium_Core_Curve25519_Fe::fromArray(self::$base2[$i][0]),
|
1827 |
+
ParagonIE_Sodium_Core_Curve25519_Fe::fromArray(self::$base2[$i][1]),
|
1828 |
+
ParagonIE_Sodium_Core_Curve25519_Fe::fromArray(self::$base2[$i][2])
|
1829 |
+
);
|
1830 |
+
}
|
1831 |
+
}
|
1832 |
+
for ($i = 0; $i < 8; ++$i) {
|
1833 |
+
$Ai[$i] = new ParagonIE_Sodium_Core_Curve25519_Ge_Cached(
|
1834 |
+
self::fe_0(),
|
1835 |
+
self::fe_0(),
|
1836 |
+
self::fe_0(),
|
1837 |
+
self::fe_0()
|
1838 |
+
);
|
1839 |
+
}
|
1840 |
+
|
1841 |
+
# slide(aslide,a);
|
1842 |
+
# slide(bslide,b);
|
1843 |
+
$aslide = self::slide($a);
|
1844 |
+
$bslide = self::slide($b);
|
1845 |
+
|
1846 |
+
# ge_p3_to_cached(&Ai[0],A);
|
1847 |
+
# ge_p3_dbl(&t,A); ge_p1p1_to_p3(&A2,&t);
|
1848 |
+
$Ai[0] = self::ge_p3_to_cached($A);
|
1849 |
+
$t = self::ge_p3_dbl($A);
|
1850 |
+
$A2 = self::ge_p1p1_to_p3($t);
|
1851 |
+
|
1852 |
+
# ge_add(&t,&A2,&Ai[0]); ge_p1p1_to_p3(&u,&t); ge_p3_to_cached(&Ai[1],&u);
|
1853 |
+
# ge_add(&t,&A2,&Ai[1]); ge_p1p1_to_p3(&u,&t); ge_p3_to_cached(&Ai[2],&u);
|
1854 |
+
# ge_add(&t,&A2,&Ai[2]); ge_p1p1_to_p3(&u,&t); ge_p3_to_cached(&Ai[3],&u);
|
1855 |
+
# ge_add(&t,&A2,&Ai[3]); ge_p1p1_to_p3(&u,&t); ge_p3_to_cached(&Ai[4],&u);
|
1856 |
+
# ge_add(&t,&A2,&Ai[4]); ge_p1p1_to_p3(&u,&t); ge_p3_to_cached(&Ai[5],&u);
|
1857 |
+
# ge_add(&t,&A2,&Ai[5]); ge_p1p1_to_p3(&u,&t); ge_p3_to_cached(&Ai[6],&u);
|
1858 |
+
# ge_add(&t,&A2,&Ai[6]); ge_p1p1_to_p3(&u,&t); ge_p3_to_cached(&Ai[7],&u);
|
1859 |
+
for ($i = 0; $i < 7; ++$i) {
|
1860 |
+
$t = self::ge_add($A2, $Ai[$i]);
|
1861 |
+
$u = self::ge_p1p1_to_p3($t);
|
1862 |
+
$Ai[$i + 1] = self::ge_p3_to_cached($u);
|
1863 |
+
}
|
1864 |
+
|
1865 |
+
# ge_p2_0(r);
|
1866 |
+
$r = self::ge_p2_0();
|
1867 |
+
|
1868 |
+
# for (i = 255;i >= 0;--i) {
|
1869 |
+
# if (aslide[i] || bslide[i]) break;
|
1870 |
+
# }
|
1871 |
+
$i = 255;
|
1872 |
+
for (; $i >= 0; --$i) {
|
1873 |
+
if ($aslide[$i] || $bslide[$i]) {
|
1874 |
+
break;
|
1875 |
+
}
|
1876 |
+
}
|
1877 |
+
|
1878 |
+
# for (;i >= 0;--i) {
|
1879 |
+
for (; $i >= 0; --$i) {
|
1880 |
+
# ge_p2_dbl(&t,r);
|
1881 |
+
$t = self::ge_p2_dbl($r);
|
1882 |
+
|
1883 |
+
# if (aslide[i] > 0) {
|
1884 |
+
if ($aslide[$i] > 0) {
|
1885 |
+
# ge_p1p1_to_p3(&u,&t);
|
1886 |
+
# ge_add(&t,&u,&Ai[aslide[i]/2]);
|
1887 |
+
$u = self::ge_p1p1_to_p3($t);
|
1888 |
+
$t = self::ge_add(
|
1889 |
+
$u,
|
1890 |
+
$Ai[(int) floor($aslide[$i] / 2)]
|
1891 |
+
);
|
1892 |
+
# } else if (aslide[i] < 0) {
|
1893 |
+
} elseif ($aslide[$i] < 0) {
|
1894 |
+
# ge_p1p1_to_p3(&u,&t);
|
1895 |
+
# ge_sub(&t,&u,&Ai[(-aslide[i])/2]);
|
1896 |
+
$u = self::ge_p1p1_to_p3($t);
|
1897 |
+
$t = self::ge_sub(
|
1898 |
+
$u,
|
1899 |
+
$Ai[(int) floor(-$aslide[$i] / 2)]
|
1900 |
+
);
|
1901 |
+
}
|
1902 |
+
|
1903 |
+
# if (bslide[i] > 0) {
|
1904 |
+
if ($bslide[$i] > 0) {
|
1905 |
+
/** @var int $index */
|
1906 |
+
$index = (int) floor($bslide[$i] / 2);
|
1907 |
+
# ge_p1p1_to_p3(&u,&t);
|
1908 |
+
# ge_madd(&t,&u,&Bi[bslide[i]/2]);
|
1909 |
+
$u = self::ge_p1p1_to_p3($t);
|
1910 |
+
$t = self::ge_madd($t, $u, $Bi[$index]);
|
1911 |
+
# } else if (bslide[i] < 0) {
|
1912 |
+
} elseif ($bslide[$i] < 0) {
|
1913 |
+
/** @var int $index */
|
1914 |
+
$index = (int) floor(-$bslide[$i] / 2);
|
1915 |
+
# ge_p1p1_to_p3(&u,&t);
|
1916 |
+
# ge_msub(&t,&u,&Bi[(-bslide[i])/2]);
|
1917 |
+
$u = self::ge_p1p1_to_p3($t);
|
1918 |
+
$t = self::ge_msub($t, $u, $Bi[$index]);
|
1919 |
+
}
|
1920 |
+
# ge_p1p1_to_p2(r,&t);
|
1921 |
+
$r = self::ge_p1p1_to_p2($t);
|
1922 |
+
}
|
1923 |
+
return $r;
|
1924 |
+
}
|
1925 |
+
|
1926 |
+
/**
|
1927 |
+
* @internal You should not use this directly from another application
|
1928 |
+
*
|
1929 |
+
* @param string $a
|
1930 |
+
* @return ParagonIE_Sodium_Core_Curve25519_Ge_P3
|
1931 |
+
* @throws SodiumException
|
1932 |
+
* @throws TypeError
|
1933 |
+
* @psalm-suppress MixedAssignment
|
1934 |
+
* @psalm-suppress MixedOperand
|
1935 |
+
*/
|
1936 |
+
public static function ge_scalarmult_base($a)
|
1937 |
+
{
|
1938 |
+
/** @var array<int, int> $e */
|
1939 |
+
$e = array();
|
1940 |
+
$r = new ParagonIE_Sodium_Core_Curve25519_Ge_P1p1();
|
1941 |
+
|
1942 |
+
for ($i = 0; $i < 32; ++$i) {
|
1943 |
+
/** @var int $dbl */
|
1944 |
+
$dbl = (int) $i << 1;
|
1945 |
+
$e[$dbl] = (int) self::chrToInt($a[$i]) & 15;
|
1946 |
+
$e[$dbl + 1] = (int) (self::chrToInt($a[$i]) >> 4) & 15;
|
1947 |
+
}
|
1948 |
+
|
1949 |
+
/** @var int $carry */
|
1950 |
+
$carry = 0;
|
1951 |
+
for ($i = 0; $i < 63; ++$i) {
|
1952 |
+
$e[$i] += $carry;
|
1953 |
+
/** @var int $carry */
|
1954 |
+
$carry = $e[$i] + 8;
|
1955 |
+
/** @var int $carry */
|
1956 |
+
$carry >>= 4;
|
1957 |
+
$e[$i] -= $carry << 4;
|
1958 |
+
}
|
1959 |
+
/** @var array<int, int> $e */
|
1960 |
+
$e[63] += (int) $carry;
|
1961 |
+
|
1962 |
+
$h = self::ge_p3_0();
|
1963 |
+
|
1964 |
+
for ($i = 1; $i < 64; $i += 2) {
|
1965 |
+
$t = self::ge_select((int) floor($i / 2), (int) $e[$i]);
|
1966 |
+
$r = self::ge_madd($r, $h, $t);
|
1967 |
+
$h = self::ge_p1p1_to_p3($r);
|
1968 |
+
}
|
1969 |
+
|
1970 |
+
$r = self::ge_p3_dbl($h);
|
1971 |
+
|
1972 |
+
$s = self::ge_p1p1_to_p2($r);
|
1973 |
+
$r = self::ge_p2_dbl($s);
|
1974 |
+
$s = self::ge_p1p1_to_p2($r);
|
1975 |
+
$r = self::ge_p2_dbl($s);
|
1976 |
+
$s = self::ge_p1p1_to_p2($r);
|
1977 |
+
$r = self::ge_p2_dbl($s);
|
1978 |
+
|
1979 |
+
$h = self::ge_p1p1_to_p3($r);
|
1980 |
+
|
1981 |
+
for ($i = 0; $i < 64; $i += 2) {
|
1982 |
+
$t = self::ge_select($i >> 1, (int) $e[$i]);
|
1983 |
+
$r = self::ge_madd($r, $h, $t);
|
1984 |
+
$h = self::ge_p1p1_to_p3($r);
|
1985 |
+
}
|
1986 |
+
return $h;
|
1987 |
+
}
|
1988 |
+
|
1989 |
+
/**
|
1990 |
+
* Calculates (ab + c) mod l
|
1991 |
+
* where l = 2^252 + 27742317777372353535851937790883648493
|
1992 |
+
*
|
1993 |
+
* @internal You should not use this directly from another application
|
1994 |
+
*
|
1995 |
+
* @param string $a
|
1996 |
+
* @param string $b
|
1997 |
+
* @param string $c
|
1998 |
+
* @return string
|
1999 |
+
* @throws TypeError
|
2000 |
+
*/
|
2001 |
+
public static function sc_muladd($a, $b, $c)
|
2002 |
+
{
|
2003 |
+
/** @var int $a0 */
|
2004 |
+
$a0 = 2097151 & self::load_3(self::substr($a, 0, 3));
|
2005 |
+
/** @var int $a1 */
|
2006 |
+
$a1 = 2097151 & (self::load_4(self::substr($a, 2, 4)) >> 5);
|
2007 |
+
/** @var int $a2 */
|
2008 |
+
$a2 = 2097151 & (self::load_3(self::substr($a, 5, 3)) >> 2);
|
2009 |
+
/** @var int $a3 */
|
2010 |
+
$a3 = 2097151 & (self::load_4(self::substr($a, 7, 4)) >> 7);
|
2011 |
+
/** @var int $a4 */
|
2012 |
+
$a4 = 2097151 & (self::load_4(self::substr($a, 10, 4)) >> 4);
|
2013 |
+
/** @var int $a5 */
|
2014 |
+
$a5 = 2097151 & (self::load_3(self::substr($a, 13, 3)) >> 1);
|
2015 |
+
/** @var int $a6 */
|
2016 |
+
$a6 = 2097151 & (self::load_4(self::substr($a, 15, 4)) >> 6);
|
2017 |
+
/** @var int $a7 */
|
2018 |
+
$a7 = 2097151 & (self::load_3(self::substr($a, 18, 3)) >> 3);
|
2019 |
+
/** @var int $a8 */
|
2020 |
+
$a8 = 2097151 & self::load_3(self::substr($a, 21, 3));
|
2021 |
+
/** @var int $a9 */
|
2022 |
+
$a9 = 2097151 & (self::load_4(self::substr($a, 23, 4)) >> 5);
|
2023 |
+
/** @var int $a10 */
|
2024 |
+
$a10 = 2097151 & (self::load_3(self::substr($a, 26, 3)) >> 2);
|
2025 |
+
/** @var int $a11 */
|
2026 |
+
$a11 = (self::load_4(self::substr($a, 28, 4)) >> 7);
|
2027 |
+
|
2028 |
+
/** @var int $b0 */
|
2029 |
+
$b0 = 2097151 & self::load_3(self::substr($b, 0, 3));
|
2030 |
+
/** @var int $b1 */
|
2031 |
+
$b1 = 2097151 & (self::load_4(self::substr($b, 2, 4)) >> 5);
|
2032 |
+
/** @var int $b2 */
|
2033 |
+
$b2 = 2097151 & (self::load_3(self::substr($b, 5, 3)) >> 2);
|
2034 |
+
/** @var int $b3 */
|
2035 |
+
$b3 = 2097151 & (self::load_4(self::substr($b, 7, 4)) >> 7);
|
2036 |
+
/** @var int $b4 */
|
2037 |
+
$b4 = 2097151 & (self::load_4(self::substr($b, 10, 4)) >> 4);
|
2038 |
+
/** @var int $b5 */
|
2039 |
+
$b5 = 2097151 & (self::load_3(self::substr($b, 13, 3)) >> 1);
|
2040 |
+
/** @var int $b6 */
|
2041 |
+
$b6 = 2097151 & (self::load_4(self::substr($b, 15, 4)) >> 6);
|
2042 |
+
/** @var int $b7 */
|
2043 |
+
$b7 = 2097151 & (self::load_3(self::substr($b, 18, 3)) >> 3);
|
2044 |
+
/** @var int $b8 */
|
2045 |
+
$b8 = 2097151 & self::load_3(self::substr($b, 21, 3));
|
2046 |
+
/** @var int $b9 */
|
2047 |
+
$b9 = 2097151 & (self::load_4(self::substr($b, 23, 4)) >> 5);
|
2048 |
+
/** @var int $b10 */
|
2049 |
+
$b10 = 2097151 & (self::load_3(self::substr($b, 26, 3)) >> 2);
|
2050 |
+
/** @var int $b11 */
|
2051 |
+
$b11 = (self::load_4(self::substr($b, 28, 4)) >> 7);
|
2052 |
+
|
2053 |
+
/** @var int $c0 */
|
2054 |
+
$c0 = 2097151 & self::load_3(self::substr($c, 0, 3));
|
2055 |
+
/** @var int $c1 */
|
2056 |
+
$c1 = 2097151 & (self::load_4(self::substr($c, 2, 4)) >> 5);
|
2057 |
+
/** @var int $c2 */
|
2058 |
+
$c2 = 2097151 & (self::load_3(self::substr($c, 5, 3)) >> 2);
|
2059 |
+
/** @var int $c3 */
|
2060 |
+
$c3 = 2097151 & (self::load_4(self::substr($c, 7, 4)) >> 7);
|
2061 |
+
/** @var int $c4 */
|
2062 |
+
$c4 = 2097151 & (self::load_4(self::substr($c, 10, 4)) >> 4);
|
2063 |
+
/** @var int $c5 */
|
2064 |
+
$c5 = 2097151 & (self::load_3(self::substr($c, 13, 3)) >> 1);
|
2065 |
+
/** @var int $c6 */
|
2066 |
+
$c6 = 2097151 & (self::load_4(self::substr($c, 15, 4)) >> 6);
|
2067 |
+
/** @var int $c7 */
|
2068 |
+
$c7 = 2097151 & (self::load_3(self::substr($c, 18, 3)) >> 3);
|
2069 |
+
/** @var int $c8 */
|
2070 |
+
$c8 = 2097151 & self::load_3(self::substr($c, 21, 3));
|
2071 |
+
/** @var int $c9 */
|
2072 |
+
$c9 = 2097151 & (self::load_4(self::substr($c, 23, 4)) >> 5);
|
2073 |
+
/** @var int $c10 */
|
2074 |
+
$c10 = 2097151 & (self::load_3(self::substr($c, 26, 3)) >> 2);
|
2075 |
+
/** @var int $c11 */
|
2076 |
+
$c11 = (self::load_4(self::substr($c, 28, 4)) >> 7);
|
2077 |
+
|
2078 |
+
/* Can't really avoid the pyramid here: */
|
2079 |
+
$s0 = $c0 + self::mul($a0, $b0, 24);
|
2080 |
+
$s1 = $c1 + self::mul($a0, $b1, 24) + self::mul($a1, $b0, 24);
|
2081 |
+
$s2 = $c2 + self::mul($a0, $b2, 24) + self::mul($a1, $b1, 24) + self::mul($a2, $b0, 24);
|
2082 |
+
$s3 = $c3 + self::mul($a0, $b3, 24) + self::mul($a1, $b2, 24) + self::mul($a2, $b1, 24) + self::mul($a3, $b0, 24);
|
2083 |
+
$s4 = $c4 + self::mul($a0, $b4, 24) + self::mul($a1, $b3, 24) + self::mul($a2, $b2, 24) + self::mul($a3, $b1, 24) + self::mul($a4, $b0, 24);
|
2084 |
+
$s5 = $c5 + self::mul($a0, $b5, 24) + self::mul($a1, $b4, 24) + self::mul($a2, $b3, 24) + self::mul($a3, $b2, 24) + self::mul($a4, $b1, 24) + self::mul($a5, $b0, 24);
|
2085 |
+
$s6 = $c6 + self::mul($a0, $b6, 24) + self::mul($a1, $b5, 24) + self::mul($a2, $b4, 24) + self::mul($a3, $b3, 24) + self::mul($a4, $b2, 24) + self::mul($a5, $b1, 24) + self::mul($a6, $b0, 24);
|
2086 |
+
$s7 = $c7 + self::mul($a0, $b7, 24) + self::mul($a1, $b6, 24) + self::mul($a2, $b5, 24) + self::mul($a3, $b4, 24) + self::mul($a4, $b3, 24) + self::mul($a5, $b2, 24) + self::mul($a6, $b1, 24) + self::mul($a7, $b0, 24);
|
2087 |
+
$s8 = $c8 + self::mul($a0, $b8, 24) + self::mul($a1, $b7, 24) + self::mul($a2, $b6, 24) + self::mul($a3, $b5, 24) + self::mul($a4, $b4, 24) + self::mul($a5, $b3, 24) + self::mul($a6, $b2, 24) + self::mul($a7, $b1, 24) + self::mul($a8, $b0, 24);
|
2088 |
+
$s9 = $c9 + self::mul($a0, $b9, 24) + self::mul($a1, $b8, 24) + self::mul($a2, $b7, 24) + self::mul($a3, $b6, 24) + self::mul($a4, $b5, 24) + self::mul($a5, $b4, 24) + self::mul($a6, $b3, 24) + self::mul($a7, $b2, 24) + self::mul($a8, $b1, 24) + self::mul($a9, $b0, 24);
|
2089 |
+
$s10 = $c10 + self::mul($a0, $b10, 24) + self::mul($a1, $b9, 24) + self::mul($a2, $b8, 24) + self::mul($a3, $b7, 24) + self::mul($a4, $b6, 24) + self::mul($a5, $b5, 24) + self::mul($a6, $b4, 24) + self::mul($a7, $b3, 24) + self::mul($a8, $b2, 24) + self::mul($a9, $b1, 24) + self::mul($a10, $b0, 24);
|
2090 |
+
$s11 = $c11 + self::mul($a0, $b11, 24) + self::mul($a1, $b10, 24) + self::mul($a2, $b9, 24) + self::mul($a3, $b8, 24) + self::mul($a4, $b7, 24) + self::mul($a5, $b6, 24) + self::mul($a6, $b5, 24) + self::mul($a7, $b4, 24) + self::mul($a8, $b3, 24) + self::mul($a9, $b2, 24) + self::mul($a10, $b1, 24) + self::mul($a11, $b0, 24);
|
2091 |
+
$s12 = self::mul($a1, $b11, 24) + self::mul($a2, $b10, 24) + self::mul($a3, $b9, 24) + self::mul($a4, $b8, 24) + self::mul($a5, $b7, 24) + self::mul($a6, $b6, 24) + self::mul($a7, $b5, 24) + self::mul($a8, $b4, 24) + self::mul($a9, $b3, 24) + self::mul($a10, $b2, 24) + self::mul($a11, $b1, 24);
|
2092 |
+
$s13 = self::mul($a2, $b11, 24) + self::mul($a3, $b10, 24) + self::mul($a4, $b9, 24) + self::mul($a5, $b8, 24) + self::mul($a6, $b7, 24) + self::mul($a7, $b6, 24) + self::mul($a8, $b5, 24) + self::mul($a9, $b4, 24) + self::mul($a10, $b3, 24) + self::mul($a11, $b2, 24);
|
2093 |
+
$s14 = self::mul($a3, $b11, 24) + self::mul($a4, $b10, 24) + self::mul($a5, $b9, 24) + self::mul($a6, $b8, 24) + self::mul($a7, $b7, 24) + self::mul($a8, $b6, 24) + self::mul($a9, $b5, 24) + self::mul($a10, $b4, 24) + self::mul($a11, $b3, 24);
|
2094 |
+
$s15 = self::mul($a4, $b11, 24) + self::mul($a5, $b10, 24) + self::mul($a6, $b9, 24) + self::mul($a7, $b8, 24) + self::mul($a8, $b7, 24) + self::mul($a9, $b6, 24) + self::mul($a10, $b5, 24) + self::mul($a11, $b4, 24);
|
2095 |
+
$s16 = self::mul($a5, $b11, 24) + self::mul($a6, $b10, 24) + self::mul($a7, $b9, 24) + self::mul($a8, $b8, 24) + self::mul($a9, $b7, 24) + self::mul($a10, $b6, 24) + self::mul($a11, $b5, 24);
|
2096 |
+
$s17 = self::mul($a6, $b11, 24) + self::mul($a7, $b10, 24) + self::mul($a8, $b9, 24) + self::mul($a9, $b8, 24) + self::mul($a10, $b7, 24) + self::mul($a11, $b6, 24);
|
2097 |
+
$s18 = self::mul($a7, $b11, 24) + self::mul($a8, $b10, 24) + self::mul($a9, $b9, 24) + self::mul($a10, $b8, 24) + self::mul($a11, $b7, 24);
|
2098 |
+
$s19 = self::mul($a8, $b11, 24) + self::mul($a9, $b10, 24) + self::mul($a10, $b9, 24) + self::mul($a11, $b8, 24);
|
2099 |
+
$s20 = self::mul($a9, $b11, 24) + self::mul($a10, $b10, 24) + self::mul($a11, $b9, 24);
|
2100 |
+
$s21 = self::mul($a10, $b11, 24) + self::mul($a11, $b10, 24);
|
2101 |
+
$s22 = self::mul($a11, $b11, 24);
|
2102 |
+
$s23 = 0;
|
2103 |
+
|
2104 |
+
/** @var int $carry0 */
|
2105 |
+
$carry0 = ($s0 + (1 << 20)) >> 21;
|
2106 |
+
$s1 += $carry0;
|
2107 |
+
$s0 -= $carry0 << 21;
|
2108 |
+
/** @var int $carry2 */
|
2109 |
+
$carry2 = ($s2 + (1 << 20)) >> 21;
|
2110 |
+
$s3 += $carry2;
|
2111 |
+
$s2 -= $carry2 << 21;
|
2112 |
+
/** @var int $carry4 */
|
2113 |
+
$carry4 = ($s4 + (1 << 20)) >> 21;
|
2114 |
+
$s5 += $carry4;
|
2115 |
+
$s4 -= $carry4 << 21;
|
2116 |
+
/** @var int $carry6 */
|
2117 |
+
$carry6 = ($s6 + (1 << 20)) >> 21;
|
2118 |
+
$s7 += $carry6;
|
2119 |
+
$s6 -= $carry6 << 21;
|
2120 |
+
/** @var int $carry8 */
|
2121 |
+
$carry8 = ($s8 + (1 << 20)) >> 21;
|
2122 |
+
$s9 += $carry8;
|
2123 |
+
$s8 -= $carry8 << 21;
|
2124 |
+
/** @var int $carry10 */
|
2125 |
+
$carry10 = ($s10 + (1 << 20)) >> 21;
|
2126 |
+
$s11 += $carry10;
|
2127 |
+
$s10 -= $carry10 << 21;
|
2128 |
+
/** @var int $carry12 */
|
2129 |
+
$carry12 = ($s12 + (1 << 20)) >> 21;
|
2130 |
+
$s13 += $carry12;
|
2131 |
+
$s12 -= $carry12 << 21;
|
2132 |
+
/** @var int $carry14 */
|
2133 |
+
$carry14 = ($s14 + (1 << 20)) >> 21;
|
2134 |
+
$s15 += $carry14;
|
2135 |
+
$s14 -= $carry14 << 21;
|
2136 |
+
/** @var int $carry16 */
|
2137 |
+
$carry16 = ($s16 + (1 << 20)) >> 21;
|
2138 |
+
$s17 += $carry16;
|
2139 |
+
$s16 -= $carry16 << 21;
|
2140 |
+
/** @var int $carry18 */
|
2141 |
+
$carry18 = ($s18 + (1 << 20)) >> 21;
|
2142 |
+
$s19 += $carry18;
|
2143 |
+
$s18 -= $carry18 << 21;
|
2144 |
+
/** @var int $carry20 */
|
2145 |
+
$carry20 = ($s20 + (1 << 20)) >> 21;
|
2146 |
+
$s21 += $carry20;
|
2147 |
+
$s20 -= $carry20 << 21;
|
2148 |
+
/** @var int $carry22 */
|
2149 |
+
$carry22 = ($s22 + (1 << 20)) >> 21;
|
2150 |
+
$s23 += $carry22;
|
2151 |
+
$s22 -= $carry22 << 21;
|
2152 |
+
|
2153 |
+
/** @var int $carry1 */
|
2154 |
+
$carry1 = ($s1 + (1 << 20)) >> 21;
|
2155 |
+
$s2 += $carry1;
|
2156 |
+
$s1 -= $carry1 << 21;
|
2157 |
+
/** @var int $carry3 */
|
2158 |
+
$carry3 = ($s3 + (1 << 20)) >> 21;
|
2159 |
+
$s4 += $carry3;
|
2160 |
+
$s3 -= $carry3 << 21;
|
2161 |
+
/** @var int $carry5 */
|
2162 |
+
$carry5 = ($s5 + (1 << 20)) >> 21;
|
2163 |
+
$s6 += $carry5;
|
2164 |
+
$s5 -= $carry5 << 21;
|
2165 |
+
/** @var int $carry7 */
|
2166 |
+
$carry7 = ($s7 + (1 << 20)) >> 21;
|
2167 |
+
$s8 += $carry7;
|
2168 |
+
$s7 -= $carry7 << 21;
|
2169 |
+
/** @var int $carry9 */
|
2170 |
+
$carry9 = ($s9 + (1 << 20)) >> 21;
|
2171 |
+
$s10 += $carry9;
|
2172 |
+
$s9 -= $carry9 << 21;
|
2173 |
+
/** @var int $carry11 */
|
2174 |
+
$carry11 = ($s11 + (1 << 20)) >> 21;
|
2175 |
+
$s12 += $carry11;
|
2176 |
+
$s11 -= $carry11 << 21;
|
2177 |
+
/** @var int $carry13 */
|
2178 |
+
$carry13 = ($s13 + (1 << 20)) >> 21;
|
2179 |
+
$s14 += $carry13;
|
2180 |
+
$s13 -= $carry13 << 21;
|
2181 |
+
/** @var int $carry15 */
|
2182 |
+
$carry15 = ($s15 + (1 << 20)) >> 21;
|
2183 |
+
$s16 += $carry15;
|
2184 |
+
$s15 -= $carry15 << 21;
|
2185 |
+
/** @var int $carry17 */
|
2186 |
+
$carry17 = ($s17 + (1 << 20)) >> 21;
|
2187 |
+
$s18 += $carry17;
|
2188 |
+
$s17 -= $carry17 << 21;
|
2189 |
+
/** @var int $carry19 */
|
2190 |
+
$carry19 = ($s19 + (1 << 20)) >> 21;
|
2191 |
+
$s20 += $carry19;
|
2192 |
+
$s19 -= $carry19 << 21;
|
2193 |
+
/** @var int $carry21 */
|
2194 |
+
$carry21 = ($s21 + (1 << 20)) >> 21;
|
2195 |
+
$s22 += $carry21;
|
2196 |
+
$s21 -= $carry21 << 21;
|
2197 |
+
|
2198 |
+
$s11 += self::mul($s23, 666643, 20);
|
2199 |
+
$s12 += self::mul($s23, 470296, 19);
|
2200 |
+
$s13 += self::mul($s23, 654183, 20);
|
2201 |
+
$s14 -= self::mul($s23, 997805, 20);
|
2202 |
+
$s15 += self::mul($s23, 136657, 18);
|
2203 |
+
$s16 -= self::mul($s23, 683901, 20);
|
2204 |
+
|
2205 |
+
$s10 += self::mul($s22, 666643, 20);
|
2206 |
+
$s11 += self::mul($s22, 470296, 19);
|
2207 |
+
$s12 += self::mul($s22, 654183, 20);
|
2208 |
+
$s13 -= self::mul($s22, 997805, 20);
|
2209 |
+
$s14 += self::mul($s22, 136657, 18);
|
2210 |
+
$s15 -= self::mul($s22, 683901, 20);
|
2211 |
+
|
2212 |
+
$s9 += self::mul($s21, 666643, 20);
|
2213 |
+
$s10 += self::mul($s21, 470296, 19);
|
2214 |
+
$s11 += self::mul($s21, 654183, 20);
|
2215 |
+
$s12 -= self::mul($s21, 997805, 20);
|
2216 |
+
$s13 += self::mul($s21, 136657, 18);
|
2217 |
+
$s14 -= self::mul($s21, 683901, 20);
|
2218 |
+
|
2219 |
+
$s8 += self::mul($s20, 666643, 20);
|
2220 |
+
$s9 += self::mul($s20, 470296, 19);
|
2221 |
+
$s10 += self::mul($s20, 654183, 20);
|
2222 |
+
$s11 -= self::mul($s20, 997805, 20);
|
2223 |
+
$s12 += self::mul($s20, 136657, 18);
|
2224 |
+
$s13 -= self::mul($s20, 683901, 20);
|
2225 |
+
|
2226 |
+
$s7 += self::mul($s19, 666643, 20);
|
2227 |
+
$s8 += self::mul($s19, 470296, 19);
|
2228 |
+
$s9 += self::mul($s19, 654183, 20);
|
2229 |
+
$s10 -= self::mul($s19, 997805, 20);
|
2230 |
+
$s11 += self::mul($s19, 136657, 18);
|
2231 |
+
$s12 -= self::mul($s19, 683901, 20);
|
2232 |
+
|
2233 |
+
$s6 += self::mul($s18, 666643, 20);
|
2234 |
+
$s7 += self::mul($s18, 470296, 19);
|
2235 |
+
$s8 += self::mul($s18, 654183, 20);
|
2236 |
+
$s9 -= self::mul($s18, 997805, 20);
|
2237 |
+
$s10 += self::mul($s18, 136657, 18);
|
2238 |
+
$s11 -= self::mul($s18, 683901, 20);
|
2239 |
+
|
2240 |
+
/** @var int $carry6 */
|
2241 |
+
$carry6 = ($s6 + (1 << 20)) >> 21;
|
2242 |
+
$s7 += $carry6;
|
2243 |
+
$s6 -= $carry6 << 21;
|
2244 |
+
/** @var int $carry8 */
|
2245 |
+
$carry8 = ($s8 + (1 << 20)) >> 21;
|
2246 |
+
$s9 += $carry8;
|
2247 |
+
$s8 -= $carry8 << 21;
|
2248 |
+
/** @var int $carry10 */
|
2249 |
+
$carry10 = ($s10 + (1 << 20)) >> 21;
|
2250 |
+
$s11 += $carry10;
|
2251 |
+
$s10 -= $carry10 << 21;
|
2252 |
+
/** @var int $carry12 */
|
2253 |
+
$carry12 = ($s12 + (1 << 20)) >> 21;
|
2254 |
+
$s13 += $carry12;
|
2255 |
+
$s12 -= $carry12 << 21;
|
2256 |
+
/** @var int $carry14 */
|
2257 |
+
$carry14 = ($s14 + (1 << 20)) >> 21;
|
2258 |
+
$s15 += $carry14;
|
2259 |
+
$s14 -= $carry14 << 21;
|
2260 |
+
/** @var int $carry16 */
|
2261 |
+
$carry16 = ($s16 + (1 << 20)) >> 21;
|
2262 |
+
$s17 += $carry16;
|
2263 |
+
$s16 -= $carry16 << 21;
|
2264 |
+
|
2265 |
+
/** @var int $carry7 */
|
2266 |
+
$carry7 = ($s7 + (1 << 20)) >> 21;
|
2267 |
+
$s8 += $carry7;
|
2268 |
+
$s7 -= $carry7 << 21;
|
2269 |
+
/** @var int $carry9 */
|
2270 |
+
$carry9 = ($s9 + (1 << 20)) >> 21;
|
2271 |
+
$s10 += $carry9;
|
2272 |
+
$s9 -= $carry9 << 21;
|
2273 |
+
/** @var int $carry11 */
|
2274 |
+
$carry11 = ($s11 + (1 << 20)) >> 21;
|
2275 |
+
$s12 += $carry11;
|
2276 |
+
$s11 -= $carry11 << 21;
|
2277 |
+
/** @var int $carry13 */
|
2278 |
+
$carry13 = ($s13 + (1 << 20)) >> 21;
|
2279 |
+
$s14 += $carry13;
|
2280 |
+
$s13 -= $carry13 << 21;
|
2281 |
+
/** @var int $carry15 */
|
2282 |
+
$carry15 = ($s15 + (1 << 20)) >> 21;
|
2283 |
+
$s16 += $carry15;
|
2284 |
+
$s15 -= $carry15 << 21;
|
2285 |
+
|
2286 |
+
$s5 += self::mul($s17, 666643, 20);
|
2287 |
+
$s6 += self::mul($s17, 470296, 19);
|
2288 |
+
$s7 += self::mul($s17, 654183, 20);
|
2289 |
+
$s8 -= self::mul($s17, 997805, 20);
|
2290 |
+
$s9 += self::mul($s17, 136657, 18);
|
2291 |
+
$s10 -= self::mul($s17, 683901, 20);
|
2292 |
+
|
2293 |
+
$s4 += self::mul($s16, 666643, 20);
|
2294 |
+
$s5 += self::mul($s16, 470296, 19);
|
2295 |
+
$s6 += self::mul($s16, 654183, 20);
|
2296 |
+
$s7 -= self::mul($s16, 997805, 20);
|
2297 |
+
$s8 += self::mul($s16, 136657, 18);
|
2298 |
+
$s9 -= self::mul($s16, 683901, 20);
|
2299 |
+
|
2300 |
+
$s3 += self::mul($s15, 666643, 20);
|
2301 |
+
$s4 += self::mul($s15, 470296, 19);
|
2302 |
+
$s5 += self::mul($s15, 654183, 20);
|
2303 |
+
$s6 -= self::mul($s15, 997805, 20);
|
2304 |
+
$s7 += self::mul($s15, 136657, 18);
|
2305 |
+
$s8 -= self::mul($s15, 683901, 20);
|
2306 |
+
|
2307 |
+
$s2 += self::mul($s14, 666643, 20);
|
2308 |
+
$s3 += self::mul($s14, 470296, 19);
|
2309 |
+
$s4 += self::mul($s14, 654183, 20);
|
2310 |
+
$s5 -= self::mul($s14, 997805, 20);
|
2311 |
+
$s6 += self::mul($s14, 136657, 18);
|
2312 |
+
$s7 -= self::mul($s14, 683901, 20);
|
2313 |
+
|
2314 |
+
$s1 += self::mul($s13, 666643, 20);
|
2315 |
+
$s2 += self::mul($s13, 470296, 19);
|
2316 |
+
$s3 += self::mul($s13, 654183, 20);
|
2317 |
+
$s4 -= self::mul($s13, 997805, 20);
|
2318 |
+
$s5 += self::mul($s13, 136657, 18);
|
2319 |
+
$s6 -= self::mul($s13, 683901, 20);
|
2320 |
+
|
2321 |
+
$s0 += self::mul($s12, 666643, 20);
|
2322 |
+
$s1 += self::mul($s12, 470296, 19);
|
2323 |
+
$s2 += self::mul($s12, 654183, 20);
|
2324 |
+
$s3 -= self::mul($s12, 997805, 20);
|
2325 |
+
$s4 += self::mul($s12, 136657, 18);
|
2326 |
+
$s5 -= self::mul($s12, 683901, 20);
|
2327 |
+
$s12 = 0;
|
2328 |
+
|
2329 |
+
/** @var int $carry0 */
|
2330 |
+
$carry0 = ($s0 + (1 << 20)) >> 21;
|
2331 |
+
$s1 += $carry0;
|
2332 |
+
$s0 -= $carry0 << 21;
|
2333 |
+
/** @var int $carry2 */
|
2334 |
+
$carry2 = ($s2 + (1 << 20)) >> 21;
|
2335 |
+
$s3 += $carry2;
|
2336 |
+
$s2 -= $carry2 << 21;
|
2337 |
+
/** @var int $carry4 */
|
2338 |
+
$carry4 = ($s4 + (1 << 20)) >> 21;
|
2339 |
+
$s5 += $carry4;
|
2340 |
+
$s4 -= $carry4 << 21;
|
2341 |
+
/** @var int $carry6 */
|
2342 |
+
$carry6 = ($s6 + (1 << 20)) >> 21;
|
2343 |
+
$s7 += $carry6;
|
2344 |
+
$s6 -= $carry6 << 21;
|
2345 |
+
/** @var int $carry8 */
|
2346 |
+
$carry8 = ($s8 + (1 << 20)) >> 21;
|
2347 |
+
$s9 += $carry8;
|
2348 |
+
$s8 -= $carry8 << 21;
|
2349 |
+
/** @var int $carry10 */
|
2350 |
+
$carry10 = ($s10 + (1 << 20)) >> 21;
|
2351 |
+
$s11 += $carry10;
|
2352 |
+
$s10 -= $carry10 << 21;
|
2353 |
+
|
2354 |
+
/** @var int $carry1 */
|
2355 |
+
$carry1 = ($s1 + (1 << 20)) >> 21;
|
2356 |
+
$s2 += $carry1;
|
2357 |
+
$s1 -= $carry1 << 21;
|
2358 |
+
/** @var int $carry3 */
|
2359 |
+
$carry3 = ($s3 + (1 << 20)) >> 21;
|
2360 |
+
$s4 += $carry3;
|
2361 |
+
$s3 -= $carry3 << 21;
|
2362 |
+
/** @var int $carry5 */
|
2363 |
+
$carry5 = ($s5 + (1 << 20)) >> 21;
|
2364 |
+
$s6 += $carry5;
|
2365 |
+
$s5 -= $carry5 << 21;
|
2366 |
+
/** @var int $carry7 */
|
2367 |
+
$carry7 = ($s7 + (1 << 20)) >> 21;
|
2368 |
+
$s8 += $carry7;
|
2369 |
+
$s7 -= $carry7 << 21;
|
2370 |
+
/** @var int $carry9 */
|
2371 |
+
$carry9 = ($s9 + (1 << 20)) >> 21;
|
2372 |
+
$s10 += $carry9;
|
2373 |
+
$s9 -= $carry9 << 21;
|
2374 |
+
/** @var int $carry11 */
|
2375 |
+
$carry11 = ($s11 + (1 << 20)) >> 21;
|
2376 |
+
$s12 += $carry11;
|
2377 |
+
$s11 -= $carry11 << 21;
|
2378 |
+
|
2379 |
+
$s0 += self::mul($s12, 666643, 20);
|
2380 |
+
$s1 += self::mul($s12, 470296, 19);
|
2381 |
+
$s2 += self::mul($s12, 654183, 20);
|
2382 |
+
$s3 -= self::mul($s12, 997805, 20);
|
2383 |
+
$s4 += self::mul($s12, 136657, 18);
|
2384 |
+
$s5 -= self::mul($s12, 683901, 20);
|
2385 |
+
$s12 = 0;
|
2386 |
+
|
2387 |
+
/** @var int $carry0 */
|
2388 |
+
$carry0 = $s0 >> 21;
|
2389 |
+
$s1 += $carry0;
|
2390 |
+
$s0 -= $carry0 << 21;
|
2391 |
+
/** @var int $carry1 */
|
2392 |
+
$carry1 = $s1 >> 21;
|
2393 |
+
$s2 += $carry1;
|
2394 |
+
$s1 -= $carry1 << 21;
|
2395 |
+
/** @var int $carry2 */
|
2396 |
+
$carry2 = $s2 >> 21;
|
2397 |
+
$s3 += $carry2;
|
2398 |
+
$s2 -= $carry2 << 21;
|
2399 |
+
/** @var int $carry3 */
|
2400 |
+
$carry3 = $s3 >> 21;
|
2401 |
+
$s4 += $carry3;
|
2402 |
+
$s3 -= $carry3 << 21;
|
2403 |
+
/** @var int $carry4 */
|
2404 |
+
$carry4 = $s4 >> 21;
|
2405 |
+
$s5 += $carry4;
|
2406 |
+
$s4 -= $carry4 << 21;
|
2407 |
+
/** @var int $carry5 */
|
2408 |
+
$carry5 = $s5 >> 21;
|
2409 |
+
$s6 += $carry5;
|
2410 |
+
$s5 -= $carry5 << 21;
|
2411 |
+
/** @var int $carry6 */
|
2412 |
+
$carry6 = $s6 >> 21;
|
2413 |
+
$s7 += $carry6;
|
2414 |
+
$s6 -= $carry6 << 21;
|
2415 |
+
/** @var int $carry7 */
|
2416 |
+
$carry7 = $s7 >> 21;
|
2417 |
+
$s8 += $carry7;
|
2418 |
+
$s7 -= $carry7 << 21;
|
2419 |
+
/** @var int $carry8 */
|
2420 |
+
$carry8 = $s8 >> 21;
|
2421 |
+
$s9 += $carry8;
|
2422 |
+
$s8 -= $carry8 << 21;
|
2423 |
+
/** @var int $carry9 */
|
2424 |
+
$carry9 = $s9 >> 21;
|
2425 |
+
$s10 += $carry9;
|
2426 |
+
$s9 -= $carry9 << 21;
|
2427 |
+
/** @var int $carry10 */
|
2428 |
+
$carry10 = $s10 >> 21;
|
2429 |
+
$s11 += $carry10;
|
2430 |
+
$s10 -= $carry10 << 21;
|
2431 |
+
/** @var int $carry11 */
|
2432 |
+
$carry11 = $s11 >> 21;
|
2433 |
+
$s12 += $carry11;
|
2434 |
+
$s11 -= $carry11 << 21;
|
2435 |
+
|
2436 |
+
$s0 += self::mul($s12, 666643, 20);
|
2437 |
+
$s1 += self::mul($s12, 470296, 19);
|
2438 |
+
$s2 += self::mul($s12, 654183, 20);
|
2439 |
+
$s3 -= self::mul($s12, 997805, 20);
|
2440 |
+
$s4 += self::mul($s12, 136657, 18);
|
2441 |
+
$s5 -= self::mul($s12, 683901, 20);
|
2442 |
+
|
2443 |
+
/** @var int $carry0 */
|
2444 |
+
$carry0 = $s0 >> 21;
|
2445 |
+
$s1 += $carry0;
|
2446 |
+
$s0 -= $carry0 << 21;
|
2447 |
+
/** @var int $carry1 */
|
2448 |
+
$carry1 = $s1 >> 21;
|
2449 |
+
$s2 += $carry1;
|
2450 |
+
$s1 -= $carry1 << 21;
|
2451 |
+
/** @var int $carry2 */
|
2452 |
+
$carry2 = $s2 >> 21;
|
2453 |
+
$s3 += $carry2;
|
2454 |
+
$s2 -= $carry2 << 21;
|
2455 |
+
/** @var int $carry3 */
|
2456 |
+
$carry3 = $s3 >> 21;
|
2457 |
+
$s4 += $carry3;
|
2458 |
+
$s3 -= $carry3 << 21;
|
2459 |
+
/** @var int $carry4 */
|
2460 |
+
$carry4 = $s4 >> 21;
|
2461 |
+
$s5 += $carry4;
|
2462 |
+
$s4 -= $carry4 << 21;
|
2463 |
+
/** @var int $carry5 */
|
2464 |
+
$carry5 = $s5 >> 21;
|
2465 |
+
$s6 += $carry5;
|
2466 |
+
$s5 -= $carry5 << 21;
|
2467 |
+
/** @var int $carry6 */
|
2468 |
+
$carry6 = $s6 >> 21;
|
2469 |
+
$s7 += $carry6;
|
2470 |
+
$s6 -= $carry6 << 21;
|
2471 |
+
/** @var int $carry7 */
|
2472 |
+
$carry7 = $s7 >> 21;
|
2473 |
+
$s8 += $carry7;
|
2474 |
+
$s7 -= $carry7 << 21;
|
2475 |
+
/** @var int $carry8 */
|
2476 |
+
$carry8 = $s8 >> 21;
|
2477 |
+
$s9 += $carry8;
|
2478 |
+
$s8 -= $carry8 << 21;
|
2479 |
+
/** @var int $carry9 */
|
2480 |
+
$carry9 = $s9 >> 21;
|
2481 |
+
$s10 += $carry9;
|
2482 |
+
$s9 -= $carry9 << 21;
|
2483 |
+
/** @var int $carry10 */
|
2484 |
+
$carry10 = $s10 >> 21;
|
2485 |
+
$s11 += $carry10;
|
2486 |
+
$s10 -= $carry10 << 21;
|
2487 |
+
|
2488 |
+
/**
|
2489 |
+
* @var array<int, int>
|
2490 |
+
*/
|
2491 |
+
$arr = array(
|
2492 |
+
(int) (0xff & ($s0 >> 0)),
|
2493 |
+
(int) (0xff & ($s0 >> 8)),
|
2494 |
+
(int) (0xff & (($s0 >> 16) | $s1 << 5)),
|
2495 |
+
(int) (0xff & ($s1 >> 3)),
|
2496 |
+
(int) (0xff & ($s1 >> 11)),
|
2497 |
+
(int) (0xff & (($s1 >> 19) | $s2 << 2)),
|
2498 |
+
(int) (0xff & ($s2 >> 6)),
|
2499 |
+
(int) (0xff & (($s2 >> 14) | $s3 << 7)),
|
2500 |
+
(int) (0xff & ($s3 >> 1)),
|
2501 |
+
(int) (0xff & ($s3 >> 9)),
|
2502 |
+
(int) (0xff & (($s3 >> 17) | $s4 << 4)),
|
2503 |
+
(int) (0xff & ($s4 >> 4)),
|
2504 |
+
(int) (0xff & ($s4 >> 12)),
|
2505 |
+
(int) (0xff & (($s4 >> 20) | $s5 << 1)),
|
2506 |
+
(int) (0xff & ($s5 >> 7)),
|
2507 |
+
(int) (0xff & (($s5 >> 15) | $s6 << 6)),
|
2508 |
+
(int) (0xff & ($s6 >> 2)),
|
2509 |
+
(int) (0xff & ($s6 >> 10)),
|
2510 |
+
(int) (0xff & (($s6 >> 18) | $s7 << 3)),
|
2511 |
+
(int) (0xff & ($s7 >> 5)),
|
2512 |
+
(int) (0xff & ($s7 >> 13)),
|
2513 |
+
(int) (0xff & ($s8 >> 0)),
|
2514 |
+
(int) (0xff & ($s8 >> 8)),
|
2515 |
+
(int) (0xff & (($s8 >> 16) | $s9 << 5)),
|
2516 |
+
(int) (0xff & ($s9 >> 3)),
|
2517 |
+
(int) (0xff & ($s9 >> 11)),
|
2518 |
+
(int) (0xff & (($s9 >> 19) | $s10 << 2)),
|
2519 |
+
(int) (0xff & ($s10 >> 6)),
|
2520 |
+
(int) (0xff & (($s10 >> 14) | $s11 << 7)),
|
2521 |
+
(int) (0xff & ($s11 >> 1)),
|
2522 |
+
(int) (0xff & ($s11 >> 9)),
|
2523 |
+
0xff & ($s11 >> 17)
|
2524 |
+
);
|
2525 |
+
return self::intArrayToString($arr);
|
2526 |
+
}
|
2527 |
+
|
2528 |
+
/**
|
2529 |
+
* @internal You should not use this directly from another application
|
2530 |
+
*
|
2531 |
+
* @param string $s
|
2532 |
+
* @return string
|
2533 |
+
* @throws TypeError
|
2534 |
+
*/
|
2535 |
+
public static function sc_reduce($s)
|
2536 |
+
{
|
2537 |
+
/** @var int $s0 */
|
2538 |
+
$s0 = 2097151 & self::load_3(self::substr($s, 0, 3));
|
2539 |
+
/** @var int $s1 */
|
2540 |
+
$s1 = 2097151 & (self::load_4(self::substr($s, 2, 4)) >> 5);
|
2541 |
+
/** @var int $s2 */
|
2542 |
+
$s2 = 2097151 & (self::load_3(self::substr($s, 5, 3)) >> 2);
|
2543 |
+
/** @var int $s3 */
|
2544 |
+
$s3 = 2097151 & (self::load_4(self::substr($s, 7, 4)) >> 7);
|
2545 |
+
/** @var int $s4 */
|
2546 |
+
$s4 = 2097151 & (self::load_4(self::substr($s, 10, 4)) >> 4);
|
2547 |
+
/** @var int $s5 */
|
2548 |
+
$s5 = 2097151 & (self::load_3(self::substr($s, 13, 3)) >> 1);
|
2549 |
+
/** @var int $s6 */
|
2550 |
+
$s6 = 2097151 & (self::load_4(self::substr($s, 15, 4)) >> 6);
|
2551 |
+
/** @var int $s7 */
|
2552 |
+
$s7 = 2097151 & (self::load_3(self::substr($s, 18, 4)) >> 3);
|
2553 |
+
/** @var int $s8 */
|
2554 |
+
$s8 = 2097151 & self::load_3(self::substr($s, 21, 3));
|
2555 |
+
/** @var int $s9 */
|
2556 |
+
$s9 = 2097151 & (self::load_4(self::substr($s, 23, 4)) >> 5);
|
2557 |
+
/** @var int $s10 */
|
2558 |
+
$s10 = 2097151 & (self::load_3(self::substr($s, 26, 3)) >> 2);
|
2559 |
+
/** @var int $s11 */
|
2560 |
+
$s11 = 2097151 & (self::load_4(self::substr($s, 28, 4)) >> 7);
|
2561 |
+
/** @var int $s12 */
|
2562 |
+
$s12 = 2097151 & (self::load_4(self::substr($s, 31, 4)) >> 4);
|
2563 |
+
/** @var int $s13 */
|
2564 |
+
$s13 = 2097151 & (self::load_3(self::substr($s, 34, 3)) >> 1);
|
2565 |
+
/** @var int $s14 */
|
2566 |
+
$s14 = 2097151 & (self::load_4(self::substr($s, 36, 4)) >> 6);
|
2567 |
+
/** @var int $s15 */
|
2568 |
+
$s15 = 2097151 & (self::load_3(self::substr($s, 39, 4)) >> 3);
|
2569 |
+
/** @var int $s16 */
|
2570 |
+
$s16 = 2097151 & self::load_3(self::substr($s, 42, 3));
|
2571 |
+
/** @var int $s17 */
|
2572 |
+
$s17 = 2097151 & (self::load_4(self::substr($s, 44, 4)) >> 5);
|
2573 |
+
/** @var int $s18 */
|
2574 |
+
$s18 = 2097151 & (self::load_3(self::substr($s, 47, 3)) >> 2);
|
2575 |
+
/** @var int $s19 */
|
2576 |
+
$s19 = 2097151 & (self::load_4(self::substr($s, 49, 4)) >> 7);
|
2577 |
+
/** @var int $s20 */
|
2578 |
+
$s20 = 2097151 & (self::load_4(self::substr($s, 52, 4)) >> 4);
|
2579 |
+
/** @var int $s21 */
|
2580 |
+
$s21 = 2097151 & (self::load_3(self::substr($s, 55, 3)) >> 1);
|
2581 |
+
/** @var int $s22 */
|
2582 |
+
$s22 = 2097151 & (self::load_4(self::substr($s, 57, 4)) >> 6);
|
2583 |
+
/** @var int $s23 */
|
2584 |
+
$s23 = (self::load_4(self::substr($s, 60, 4)) >> 3);
|
2585 |
+
|
2586 |
+
$s11 += self::mul($s23, 666643, 20);
|
2587 |
+
$s12 += self::mul($s23, 470296, 19);
|
2588 |
+
$s13 += self::mul($s23, 654183, 20);
|
2589 |
+
$s14 -= self::mul($s23, 997805, 20);
|
2590 |
+
$s15 += self::mul($s23, 136657, 18);
|
2591 |
+
$s16 -= self::mul($s23, 683901, 20);
|
2592 |
+
|
2593 |
+
$s10 += self::mul($s22, 666643, 20);
|
2594 |
+
$s11 += self::mul($s22, 470296, 19);
|
2595 |
+
$s12 += self::mul($s22, 654183, 20);
|
2596 |
+
$s13 -= self::mul($s22, 997805, 20);
|
2597 |
+
$s14 += self::mul($s22, 136657, 18);
|
2598 |
+
$s15 -= self::mul($s22, 683901, 20);
|
2599 |
+
|
2600 |
+
$s9 += self::mul($s21, 666643, 20);
|
2601 |
+
$s10 += self::mul($s21, 470296, 19);
|
2602 |
+
$s11 += self::mul($s21, 654183, 20);
|
2603 |
+
$s12 -= self::mul($s21, 997805, 20);
|
2604 |
+
$s13 += self::mul($s21, 136657, 18);
|
2605 |
+
$s14 -= self::mul($s21, 683901, 20);
|
2606 |
+
|
2607 |
+
$s8 += self::mul($s20, 666643, 20);
|
2608 |
+
$s9 += self::mul($s20, 470296, 19);
|
2609 |
+
$s10 += self::mul($s20, 654183, 20);
|
2610 |
+
$s11 -= self::mul($s20, 997805, 20);
|
2611 |
+
$s12 += self::mul($s20, 136657, 18);
|
2612 |
+
$s13 -= self::mul($s20, 683901, 20);
|
2613 |
+
|
2614 |
+
$s7 += self::mul($s19, 666643, 20);
|
2615 |
+
$s8 += self::mul($s19, 470296, 19);
|
2616 |
+
$s9 += self::mul($s19, 654183, 20);
|
2617 |
+
$s10 -= self::mul($s19, 997805, 20);
|
2618 |
+
$s11 += self::mul($s19, 136657, 18);
|
2619 |
+
$s12 -= self::mul($s19, 683901, 20);
|
2620 |
+
|
2621 |
+
$s6 += self::mul($s18, 666643, 20);
|
2622 |
+
$s7 += self::mul($s18, 470296, 19);
|
2623 |
+
$s8 += self::mul($s18, 654183, 20);
|
2624 |
+
$s9 -= self::mul($s18, 997805, 20);
|
2625 |
+
$s10 += self::mul($s18, 136657, 18);
|
2626 |
+
$s11 -= self::mul($s18, 683901, 20);
|
2627 |
+
|
2628 |
+
/** @var int $carry6 */
|
2629 |
+
$carry6 = ($s6 + (1 << 20)) >> 21;
|
2630 |
+
$s7 += $carry6;
|
2631 |
+
$s6 -= $carry6 << 21;
|
2632 |
+
/** @var int $carry8 */
|
2633 |
+
$carry8 = ($s8 + (1 << 20)) >> 21;
|
2634 |
+
$s9 += $carry8;
|
2635 |
+
$s8 -= $carry8 << 21;
|
2636 |
+
/** @var int $carry10 */
|
2637 |
+
$carry10 = ($s10 + (1 << 20)) >> 21;
|
2638 |
+
$s11 += $carry10;
|
2639 |
+
$s10 -= $carry10 << 21;
|
2640 |
+
/** @var int $carry12 */
|
2641 |
+
$carry12 = ($s12 + (1 << 20)) >> 21;
|
2642 |
+
$s13 += $carry12;
|
2643 |
+
$s12 -= $carry12 << 21;
|
2644 |
+
/** @var int $carry14 */
|
2645 |
+
$carry14 = ($s14 + (1 << 20)) >> 21;
|
2646 |
+
$s15 += $carry14;
|
2647 |
+
$s14 -= $carry14 << 21;
|
2648 |
+
/** @var int $carry16 */
|
2649 |
+
$carry16 = ($s16 + (1 << 20)) >> 21;
|
2650 |
+
$s17 += $carry16;
|
2651 |
+
$s16 -= $carry16 << 21;
|
2652 |
+
|
2653 |
+
/** @var int $carry7 */
|
2654 |
+
$carry7 = ($s7 + (1 << 20)) >> 21;
|
2655 |
+
$s8 += $carry7;
|
2656 |
+
$s7 -= $carry7 << 21;
|
2657 |
+
/** @var int $carry9 */
|
2658 |
+
$carry9 = ($s9 + (1 << 20)) >> 21;
|
2659 |
+
$s10 += $carry9;
|
2660 |
+
$s9 -= $carry9 << 21;
|
2661 |
+
/** @var int $carry11 */
|
2662 |
+
$carry11 = ($s11 + (1 << 20)) >> 21;
|
2663 |
+
$s12 += $carry11;
|
2664 |
+
$s11 -= $carry11 << 21;
|
2665 |
+
/** @var int $carry13 */
|
2666 |
+
$carry13 = ($s13 + (1 << 20)) >> 21;
|
2667 |
+
$s14 += $carry13;
|
2668 |
+
$s13 -= $carry13 << 21;
|
2669 |
+
/** @var int $carry15 */
|
2670 |
+
$carry15 = ($s15 + (1 << 20)) >> 21;
|
2671 |
+
$s16 += $carry15;
|
2672 |
+
$s15 -= $carry15 << 21;
|
2673 |
+
|
2674 |
+
$s5 += self::mul($s17, 666643, 20);
|
2675 |
+
$s6 += self::mul($s17, 470296, 19);
|
2676 |
+
$s7 += self::mul($s17, 654183, 20);
|
2677 |
+
$s8 -= self::mul($s17, 997805, 20);
|
2678 |
+
$s9 += self::mul($s17, 136657, 18);
|
2679 |
+
$s10 -= self::mul($s17, 683901, 20);
|
2680 |
+
|
2681 |
+
$s4 += self::mul($s16, 666643, 20);
|
2682 |
+
$s5 += self::mul($s16, 470296, 19);
|
2683 |
+
$s6 += self::mul($s16, 654183, 20);
|
2684 |
+
$s7 -= self::mul($s16, 997805, 20);
|
2685 |
+
|