updated plugin WP Mail SMTP version 2.5.0

This commit is contained in:
KawaiiPunk 2020-10-23 01:19:42 +00:00 committed by Gitium
parent 1047e0b29f
commit 51360a4729
205 changed files with 36345 additions and 921 deletions

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
<svg viewBox="0 0 37 28" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path d="M12.29 26.462c.328.375.75.562 1.266.562s.937-.187 1.266-.562L35.563 5.79c.329-.328.493-.75.493-1.265 0-.516-.164-.938-.493-1.266L32.962.728a1.567 1.567 0 00-1.23-.563c-.493 0-.926.188-1.301.563L13.556 17.603 5.681 9.728c-.375-.375-.808-.563-1.301-.563-.492 0-.902.188-1.23.563L.548 12.259c-.328.328-.492.75-.492 1.265 0 .516.164.938.492 1.266L12.29 26.462z" fill="#6ab255" fill-rule="nonzero"/></svg>
<svg viewBox="0 0 37 28" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.41"><path d="M12.29 26.46c.33.38.75.56 1.27.56s.93-.18 1.26-.56L35.56 5.8c.33-.33.5-.75.5-1.27 0-.51-.17-.93-.5-1.26L32.96.73a1.57 1.57 0 00-1.23-.57c-.5 0-.92.2-1.3.57L13.56 17.6 5.68 9.73c-.37-.38-.8-.57-1.3-.57s-.9.2-1.23.57l-2.6 2.53c-.33.33-.5.75-.5 1.26 0 .52.17.94.5 1.27l11.74 11.67z" fill="#6ab255" fill-rule="nonzero"/></svg>

Before

Width:  |  Height:  |  Size: 559 B

After

Width:  |  Height:  |  Size: 480 B

View File

@ -1 +1 @@
<svg viewBox="0 0 33 33" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path d="M27.592 32.359a1.928 1.928 0 01-1.417.583 1.928 1.928 0 01-1.416-.583l-8.084-8.084-8.083 8.084a1.928 1.928 0 01-1.417.583 1.93 1.93 0 01-1.417-.583l-4.5-4.5a1.932 1.932 0 01-.583-1.417c0-.555.195-1.028.583-1.417l8.084-8.083-8.084-8.084a1.931 1.931 0 01-.583-1.416c0-.556.195-1.028.583-1.417l4.5-4.5A1.93 1.93 0 017.175.942c.556 0 1.028.194 1.417.583l8.083 8.083 8.084-8.083a1.928 1.928 0 011.416-.583c.556 0 1.028.194 1.417.583l4.5 4.5c.389.389.583.861.583 1.417 0 .555-.194 1.027-.583 1.416l-8.083 8.084 8.083 8.083c.389.389.583.862.583 1.417 0 .556-.194 1.028-.583 1.417l-4.5 4.5z" fill="#d83638" fill-rule="nonzero"/></svg>
<svg viewBox="0 0 33 33" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.41"><path d="M27.6 32.36a1.93 1.93 0 01-1.43.58 1.93 1.93 0 01-1.41-.58l-8.09-8.08-8.08 8.08a1.93 1.93 0 01-1.42.58 1.93 1.93 0 01-1.41-.58l-4.5-4.5a1.93 1.93 0 01-.59-1.42c0-.55.2-1.03.59-1.42l8.08-8.08-8.08-8.08a1.93 1.93 0 01-.59-1.42c0-.55.2-1.03.59-1.42l4.5-4.5A1.93 1.93 0 017.18.95c.55 0 1.02.2 1.41.58l8.09 8.09 8.08-8.08a1.93 1.93 0 011.41-.59c.56 0 1.03.2 1.42.59l4.5 4.5c.4.38.58.86.58 1.41 0 .56-.19 1.03-.58 1.42l-8.08 8.08 8.08 8.08c.4.4.58.87.58 1.42 0 .56-.19 1.03-.58 1.42l-4.5 4.5z" fill="#d83638" fill-rule="nonzero"/></svg>

Before

Width:  |  Height:  |  Size: 785 B

After

Width:  |  Height:  |  Size: 688 B

View File

@ -1 +1 @@
<svg viewBox="0 0 53 53" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-miterlimit="10"><path d="M37.592 42.359a1.928 1.928 0 01-1.417.583 1.928 1.928 0 01-1.416-.583l-8.084-8.084-8.083 8.084a1.928 1.928 0 01-1.417.583 1.93 1.93 0 01-1.417-.583l-4.5-4.5a1.932 1.932 0 01-.583-1.417c0-.556.195-1.028.583-1.417l8.084-8.083-8.084-8.084a1.93 1.93 0 01-.583-1.416c0-.556.195-1.028.583-1.417l4.5-4.5a1.93 1.93 0 011.417-.584 1.93 1.93 0 011.417.584l8.083 8.083 8.084-8.083a1.928 1.928 0 011.416-.584 1.93 1.93 0 011.417.584l4.5 4.5c.389.389.583.861.583 1.417 0 .555-.194 1.028-.583 1.416l-8.083 8.084 8.083 8.083c.389.389.583.861.583 1.417s-.194 1.028-.583 1.417l-4.5 4.5z" fill="none" stroke="#d83638" stroke-width="2" stroke-dasharray="4,2"/></svg>
<svg viewBox="0 0 53 53" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-miterlimit="10"><path d="M37.6 42.36a1.93 1.93 0 01-1.43.58 1.93 1.93 0 01-1.41-.58l-8.08-8.08-8.09 8.08a1.93 1.93 0 01-1.42.58 1.93 1.93 0 01-1.41-.58l-4.5-4.5a1.93 1.93 0 01-.59-1.42c0-.55.2-1.03.59-1.41l8.08-8.09-8.08-8.08a1.93 1.93 0 01-.59-1.42c0-.55.2-1.03.59-1.41l4.5-4.5a1.93 1.93 0 011.41-.59 1.93 1.93 0 011.42.59l8.09 8.08 8.08-8.08a1.93 1.93 0 011.42-.59 1.93 1.93 0 011.41.59l4.5 4.5c.4.38.58.86.58 1.41 0 .56-.19 1.03-.58 1.42l-8.08 8.08 8.08 8.09c.4.38.58.86.58 1.41s-.19 1.03-.58 1.42l-4.5 4.5z" fill="none" stroke="#d83638" stroke-width="2" stroke-dasharray="4,2"/></svg>

Before

Width:  |  Height:  |  Size: 779 B

After

Width:  |  Height:  |  Size: 695 B

View File

@ -1 +1 @@
<svg aria-hidden="true" data-prefix="fas" data-icon="check-circle" class="svg-inline--fa fa-check-circle fa-w-16" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="#2ecc71" d="M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"/></svg>
<svg aria-hidden="true" data-prefix="fas" data-icon="check-circle" class="svg-inline--fa fa-check-circle fa-w-16" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="#2ecc71" d="M504 256a248 248 0 11-496 0 248 248 0 01496 0zM227 387l184-184c7-6 7-16 0-22l-22-23c-7-6-17-6-23 0L216 308l-70-70c-6-6-16-6-23 0l-22 23c-7 6-7 16 0 22l104 104c6 7 16 7 22 0z"/></svg>

Before

Width:  |  Height:  |  Size: 560 B

After

Width:  |  Height:  |  Size: 377 B

View File

@ -1 +1 @@
<svg aria-hidden="true" data-prefix="far" data-icon="exclamation-circle" class="svg-inline--fa fa-exclamation-circle fa-w-16" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="#e74c3c" d="M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 448c-110.532 0-200-89.431-200-200 0-110.495 89.472-200 200-200 110.491 0 200 89.471 200 200 0 110.53-89.431 200-200 200zm42-104c0 23.159-18.841 42-42 42s-42-18.841-42-42 18.841-42 42-42 42 18.841 42 42zm-81.37-211.401l6.8 136c.319 6.387 5.591 11.401 11.985 11.401h41.17c6.394 0 11.666-5.014 11.985-11.401l6.8-136c.343-6.854-5.122-12.599-11.985-12.599h-54.77c-6.863 0-12.328 5.745-11.985 12.599z"/></svg>
<svg aria-hidden="true" data-prefix="far" data-icon="exclamation-circle" class="svg-inline--fa fa-exclamation-circle fa-w-16" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="#e74c3c" d="M256 8a248 248 0 100 496 248 248 0 000-496zm0 448a200 200 0 11-.1-400.1A200 200 0 01256 456zm42-104a42 42 0 11-84 0 42 42 0 0184 0zm-81.4-211.4l6.8 136a12 12 0 0012 11.4h41.2a12 12 0 0012-11.4l6.8-136a12 12 0 00-12-12.6h-54.8a12 12 0 00-12 12.6z"/></svg>

Before

Width:  |  Height:  |  Size: 724 B

After

Width:  |  Height:  |  Size: 461 B

View File

@ -1 +1 @@
<svg aria-hidden="true" data-prefix="fas" data-icon="exclamation-circle" class="svg-inline--fa fa-exclamation-circle fa-w-16" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="#f1c40f" d="M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"/></svg>
<svg aria-hidden="true" data-prefix="fas" data-icon="exclamation-circle" class="svg-inline--fa fa-exclamation-circle fa-w-16" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="#f1c40f" d="M504 256a248 248 0 11-496 0 248 248 0 01496 0zm-248 50a46 46 0 100 92 46 46 0 000-92zm-43.7-165.3l7.4 136a12 12 0 0012 11.3h48.6a12 12 0 0012-11.3l7.4-136a12 12 0 00-12-12.7h-63.4a12 12 0 00-12 12.7z"/></svg>

Before

Width:  |  Height:  |  Size: 598 B

After

Width:  |  Height:  |  Size: 415 B

View File

@ -0,0 +1 @@
<svg aria-hidden="true" data-prefix="fas" data-icon="exclamation-circle" class="svg-inline--fa fa-exclamation-circle fa-w-16" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="#DC3232" d="M504 256a248 248 0 11-496 0 248 248 0 01496 0zm-248 50a46 46 0 100 92 46 46 0 000-92zm-43.7-165.3l7.4 136a12 12 0 0012 11.3h48.6a12 12 0 0012-11.3l7.4-136a12 12 0 00-12-12.7h-63.4a12 12 0 00-12 12.7z"/></svg>

After

Width:  |  Height:  |  Size: 415 B

View File

@ -0,0 +1 @@
<svg width="40" height="17" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M31.5 0h-23a8.5 8.5 0 000 17h23a8.5 8.5 0 000-17z" fill="#999"/><path d="M7.51 5.36v7H9.3V10.4h1.26c1.8 0 2.82-.95 2.82-2.59 0-1.56-1.03-2.44-2.82-2.44H7.51zm1.79 1.4h1.17c.79 0 1.23.37 1.23 1.1 0 .74-.44 1.13-1.22 1.13H9.29V6.76zm9.23 5.6h2.02l-1.47-2.3c.82-.42 1.27-1.19 1.27-2.26 0-1.56-1.06-2.44-2.9-2.44H14.3v7h1.78V10.4h1.42l1.04 1.97zM16.1 9V6.76h1.35c.77 0 1.22.37 1.22 1.1 0 .74-.45 1.13-1.22 1.13H16.1zm8.78-3.69c-2.16 0-3.78 1.51-3.78 3.55 0 2.05 1.62 3.6 3.78 3.6 2.17 0 3.79-1.56 3.79-3.6 0-2.03-1.62-3.55-3.8-3.55zm.02 1.5c1.08 0 1.94.88 1.94 2.06 0 1.18-.86 2.1-1.94 2.1a2.04 2.04 0 01-1.98-2.1c0-1.18.9-2.07 1.98-2.07zm8.78 2.84v-1.1H32V6.87h-1.1v1.68h-1.66v1.1h1.67v1.67H32V9.64h1.68z" fill="#fff"/></svg>

After

Width:  |  Height:  |  Size: 806 B

View File

@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 300 180"><path d="M84.4 65.4c0 3.7.4 6.7 1.1 8.9.8 2.2 1.8 4.6 3.2 7.2.5.8.7 1.6.7 2.3 0 1-.6 2-1.9 3L81.2 91c-.9.6-1.8.9-2.6.9-1 0-2-.5-3-1.4-1.4-1.5-2.6-3.1-3.6-4.7-1-1.7-2-3.6-3.1-5.9-7.8 9.2-17.6 13.8-29.4 13.8-8.4 0-15.1-2.4-20-7.2-4.9-4.8-7.4-11.2-7.4-19.2 0-8.5 3-15.4 9.1-20.6s14.2-7.8 24.5-7.8c3.4 0 6.9.3 10.6.8s7.5 1.3 11.5 2.2v-7.3c0-7.6-1.6-12.9-4.7-16-3.2-3.1-8.6-4.6-16.3-4.6-3.5 0-7.1.4-10.8 1.3-3.7.9-7.3 2-10.8 3.4-1.6.7-2.8 1.1-3.5 1.3-.7.2-1.2.3-1.6.3-1.4 0-2.1-1-2.1-3.1v-4.9c0-1.6.2-2.8.7-3.5s1.4-1.4 2.8-2.1c3.5-1.8 7.7-3.3 12.6-4.5C39 .9 44.2.3 49.7.3 61.6.3 70.3 3 75.9 8.4c5.5 5.4 8.3 13.6 8.3 24.6v32.4h.2zM43.8 80.6c3.3 0 6.7-.6 10.3-1.8 3.6-1.2 6.8-3.4 9.5-6.4 1.6-1.9 2.8-4 3.4-6.4.6-2.4 1-5.3 1-8.7v-4.2c-2.9-.7-6-1.3-9.2-1.7-3.2-.4-6.3-.6-9.4-.6-6.7 0-11.6 1.3-14.9 4-3.3 2.7-4.9 6.5-4.9 11.5 0 4.7 1.2 8.2 3.7 10.6 2.4 2.5 5.9 3.7 10.5 3.7zm80.3 10.8c-1.8 0-3-.3-3.8-1-.8-.6-1.5-2-2.1-3.9L94.7 9.2c-.6-2-.9-3.3-.9-4 0-1.6.8-2.5 2.4-2.5h9.8c1.9 0 3.2.3 3.9 1 .8.6 1.4 2 2 3.9l16.8 66.2 15.6-66.2c.5-2 1.1-3.3 1.9-3.9.8-.6 2.2-1 4-1h8c1.9 0 3.2.3 4 1 .8.6 1.5 2 1.9 3.9l15.8 67 17.3-67c.6-2 1.3-3.3 2-3.9.8-.6 2.1-1 3.9-1h9.3c1.6 0 2.5.8 2.5 2.5 0 .5-.1 1-.2 1.6-.1.6-.3 1.4-.7 2.5l-24.1 77.3c-.6 2-1.3 3.3-2.1 3.9s-2.1 1-3.8 1h-8.6c-1.9 0-3.2-.3-4-1-.8-.7-1.5-2-1.9-4L154 22l-15.4 64.4c-.5 2-1.1 3.3-1.9 4-.8.7-2.2 1-4 1h-8.6zm128.5 2.7c-5.2 0-10.4-.6-15.4-1.8-5-1.2-8.9-2.5-11.5-4-1.6-.9-2.7-1.9-3.1-2.8-.4-.9-.6-1.9-.6-2.8v-5.1c0-2.1.8-3.1 2.3-3.1.6 0 1.2.1 1.8.3.6.2 1.5.6 2.5 1 3.4 1.5 7.1 2.7 11 3.5 4 .8 7.9 1.2 11.9 1.2 6.3 0 11.2-1.1 14.6-3.3 3.4-2.2 5.2-5.4 5.2-9.5 0-2.8-.9-5.1-2.7-7-1.8-1.9-5.2-3.6-10.1-5.2L244 51c-7.3-2.3-12.7-5.7-16-10.2-3.3-4.4-5-9.3-5-14.5 0-4.2.9-7.9 2.7-11.1 1.8-3.2 4.2-6 7.2-8.2 3-2.3 6.4-4 10.4-5.2S251.5.1 255.9.1c2.2 0 4.5.1 6.7.4 2.3.3 4.4.7 6.5 1.1 2 .5 3.9 1 5.7 1.6 1.8.6 3.2 1.2 4.2 1.8 1.4.8 2.4 1.6 3 2.5.6.8.9 1.9.9 3.3v4.7c0 2.1-.8 3.2-2.3 3.2-.8 0-2.1-.4-3.8-1.2-5.7-2.6-12.1-3.9-19.2-3.9-5.7 0-10.2.9-13.3 2.8-3.1 1.9-4.7 4.8-4.7 8.9 0 2.8 1 5.2 3 7.1 2 1.9 5.7 3.8 11 5.5l14.2 4.5c7.2 2.3 12.4 5.5 15.5 9.6s4.6 8.8 4.6 14c0 4.3-.9 8.2-2.6 11.6-1.8 3.4-4.2 6.4-7.3 8.8-3.1 2.5-6.8 4.3-11.1 5.6-4.5 1.4-9.2 2.1-14.3 2.1z" fill="#262f3e"/><path d="M271.5 142.7c-32.9 24.3-80.7 37.2-121.8 37.2-57.6 0-109.5-21.3-148.7-56.7-3.1-2.8-.3-6.6 3.4-4.4 42.4 24.6 94.7 39.5 148.8 39.5 36.5 0 76.6-7.6 113.5-23.2 5.5-2.5 10.2 3.6 4.8 7.6zm13.7-15.6c-4.2-5.4-27.8-2.6-38.5-1.3-3.2.4-3.7-2.4-.8-4.5 18.8-13.2 49.7-9.4 53.3-5 3.6 4.5-1 35.4-18.6 50.2-2.7 2.3-5.3 1.1-4.1-1.9 4-9.9 12.9-32.2 8.7-37.5z" fill="#f59931"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 300 180"><path d="M84.4 65.4c0 3.7.4 6.7 1.1 8.9.8 2.2 1.8 4.6 3.2 7.2.5.8.7 1.6.7 2.3 0 1-.6 2-1.9 3L81.2 91c-.9.6-1.8.9-2.6.9-1 0-2-.5-3-1.4a31 31 0 01-3.6-4.7l-3.1-5.9a37 37 0 01-29.4 13.8c-8.4 0-15.1-2.4-20-7.2a25.7 25.7 0 01-7.4-19.2c0-8.5 3-15.4 9.1-20.6s14.2-7.8 24.5-7.8c3.4 0 6.9.3 10.6.8s7.5 1.3 11.5 2.2v-7.3c0-7.6-1.6-12.9-4.7-16-3.2-3.1-8.6-4.6-16.3-4.6-3.5 0-7.1.4-10.8 1.3A79.7 79.7 0 0021.7 20l-1.6.3c-1.4 0-2.1-1-2.1-3.1v-4.9c0-1.6.2-2.8.7-3.5s1.4-1.4 2.8-2.1A60.6 60.6 0 0149.7.3C61.6.3 70.3 3 75.9 8.4c5.5 5.4 8.3 13.6 8.3 24.6v32.4h.2zM43.8 80.6c3.3 0 6.7-.6 10.3-1.8 3.6-1.2 6.8-3.4 9.5-6.4 1.6-1.9 2.8-4 3.4-6.4.6-2.4 1-5.3 1-8.7v-4.2a83.5 83.5 0 00-18.6-2.3c-6.7 0-11.6 1.3-14.9 4-3.3 2.7-4.9 6.5-4.9 11.5 0 4.7 1.2 8.2 3.7 10.6 2.4 2.5 5.9 3.7 10.5 3.7zm80.3 10.8c-1.8 0-3-.3-3.8-1-.8-.6-1.5-2-2.1-3.9L94.7 9.2c-.6-2-.9-3.3-.9-4 0-1.6.8-2.5 2.4-2.5h9.8c1.9 0 3.2.3 3.9 1 .8.6 1.4 2 2 3.9l16.8 66.2 15.6-66.2c.5-2 1.1-3.3 1.9-3.9.8-.6 2.2-1 4-1h8c1.9 0 3.2.3 4 1 .8.6 1.5 2 1.9 3.9l15.8 67 17.3-67c.6-2 1.3-3.3 2-3.9.8-.6 2.1-1 3.9-1h9.3c1.6 0 2.5.8 2.5 2.5l-.2 1.6-.7 2.5-24.1 77.3c-.6 2-1.3 3.3-2.1 3.9s-2.1 1-3.8 1h-8.6c-1.9 0-3.2-.3-4-1-.8-.7-1.5-2-1.9-4L154 22l-15.4 64.4c-.5 2-1.1 3.3-1.9 4-.8.7-2.2 1-4 1h-8.6zm128.5 2.7a66.2 66.2 0 01-26.9-5.8c-1.6-.9-2.7-1.9-3.1-2.8a7 7 0 01-.6-2.8v-5.1c0-2.1.8-3.1 2.3-3.1l1.8.3 2.5 1a54.4 54.4 0 0022.9 4.7 27 27 0 0014.6-3.3c3.4-2.2 5.2-5.4 5.2-9.5 0-2.8-.9-5.1-2.7-7a25 25 0 00-10.1-5.2L244 51a30.5 30.5 0 01-16-10.2A23.8 23.8 0 01232.9 7c3-2.3 6.4-4 10.4-5.2A43.6 43.6 0 01262.6.5l6.5 1.1 5.7 1.6c1.8.6 3.2 1.2 4.2 1.8 1.4.8 2.4 1.6 3 2.5.6.8.9 1.9.9 3.3v4.7c0 2.1-.8 3.2-2.3 3.2-.8 0-2.1-.4-3.8-1.2a45.7 45.7 0 00-19.2-3.9c-5.7 0-10.2.9-13.3 2.8-3.1 1.9-4.7 4.8-4.7 8.9 0 2.8 1 5.2 3 7.1 2 1.9 5.7 3.8 11 5.5l14.2 4.5c7.2 2.3 12.4 5.5 15.5 9.6s4.6 8.8 4.6 14c0 4.3-.9 8.2-2.6 11.6a26.9 26.9 0 01-7.3 8.8 32.2 32.2 0 01-11.1 5.6 47.6 47.6 0 01-14.3 2.1z" fill="#262f3e"/><path d="M271.5 142.7c-32.9 24.3-80.7 37.2-121.8 37.2A220.3 220.3 0 011 123.2c-3.1-2.8-.3-6.6 3.4-4.4a299.9 299.9 0 00148.8 39.5 297 297 0 00113.5-23.2c5.5-2.5 10.2 3.6 4.8 7.6zm13.7-15.6c-4.2-5.4-27.8-2.6-38.5-1.3-3.2.4-3.7-2.4-.8-4.5 18.8-13.2 49.7-9.4 53.3-5 3.6 4.5-1 35.4-18.6 50.2-2.7 2.3-5.3 1.1-4.1-1.9 4-9.9 12.9-32.2 8.7-37.5z" fill="#f59931"/></svg>

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -1 +1 @@
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" x="0" y="0" viewBox="0 0 254.79 80.25" xml:space="preserve"><style>.st0{fill:#4285f4}.st1{fill:#ea4335}</style><g id="XMLID_11_"><path id="XMLID_10_" class="st0" d="M31.87 28.59v8.59H52.4C51.77 42 50.17 45.52 47.72 48c-3 3-7.68 6.28-15.85 6.28-12.64 0-22.52-10.19-22.52-22.83S19.23 8.62 31.87 8.62c6.81 0 11.8 2.69 15.46 6.14l6.04-6.04C48.28 3.77 41.43 0 31.87 0 14.56 0 0 14.1 0 31.42s14.56 31.42 31.87 31.42c9.36 0 16.41-3.07 21.92-8.8 5.65-5.65 7.44-13.65 7.44-20.07 0-1.99-.14-3.84-.45-5.38H31.87z"/><path id="XMLID_24_" class="st1" d="M86.88 21.61c-11.21 0-20.35 8.52-20.35 20.28 0 11.66 9.15 20.28 20.35 20.28s20.35-8.59 20.35-20.28c0-11.77-9.14-20.28-20.35-20.28zm0 32.57c-6.14 0-11.45-5.06-11.45-12.29 0-7.3 5.31-12.29 11.45-12.29s11.45 4.99 11.45 12.29c0 7.22-5.3 12.29-11.45 12.29z"/><path id="XMLID_21_" class="st0" d="M186.65 26.15h-.31c-1.99-2.37-5.83-4.54-10.68-4.54-10.12 0-18.95 8.83-18.95 20.28 0 11.38 8.83 20.28 18.95 20.28 4.85 0 8.69-2.16 10.68-4.61h.31v2.83c0 7.75-4.15 11.9-10.82 11.9-5.45 0-8.83-3.91-10.23-7.23l-7.75 3.21c2.23 5.38 8.13 11.97 17.98 11.97 10.44 0 19.27-6.14 19.27-21.12V22.65h-8.45v3.5zm-10.23 28.03c-6.14 0-10.82-5.24-10.82-12.29 0-7.16 4.68-12.29 10.82-12.29 6.07 0 10.82 5.24 10.82 12.36.04 7.08-4.75 12.22-10.82 12.22z"/><path id="XMLID_18_" d="M132.26 21.61c-11.21 0-20.35 8.52-20.35 20.28 0 11.66 9.15 20.28 20.35 20.28s20.35-8.59 20.35-20.28c0-11.77-9.14-20.28-20.35-20.28zm0 32.57c-6.14 0-11.45-5.06-11.45-12.29 0-7.3 5.31-12.29 11.45-12.29s11.45 4.99 11.45 12.29c0 7.22-5.3 12.29-11.45 12.29z" fill="#fbbc05"/><path id="XMLID_3_" d="M202.08.84h8.76v61.33h-8.76V.84z" fill="#34a853"/><path id="XMLID_14_" class="st1" d="M237.89 54.18c-4.54 0-7.75-2.06-9.84-6.14l27.12-11.21-.91-2.3c-1.68-4.54-6.84-12.92-17.35-12.92-10.44 0-19.13 8.2-19.13 20.28 0 11.38 8.59 20.28 20.11 20.28 9.29 0 14.66-5.69 16.9-8.97l-6.91-4.61c-2.31 3.35-5.45 5.59-9.99 5.59zm-.63-24.96c3.6 0 6.67 1.85 7.68 4.47l-18.33 7.57c.01-8.52 6.05-12.04 10.65-12.04z"/></g></svg>
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" x="0" y="0" viewBox="0 0 254.8 80.3" xml:space="preserve"><style>.st0{fill:#4285f4}.st1{fill:#ea4335}</style><g id="XMLID_11_"><path id="XMLID_10_" class="st0" d="M31.9 28.6v8.6h20.5c-.6 4.8-2.2 8.3-4.7 10.8A21 21 0 0132 54.3C19.2 54.3 9.3 44 9.3 31.5a22.6 22.6 0 0138-16.7l6-6C48.4 3.7 41.5 0 32 0 14.6 0 0 14.1 0 31.4s14.6 31.4 31.9 31.4c9.3 0 16.4-3 21.9-8.8a28.4 28.4 0 007.4-20c0-2-.1-3.9-.4-5.4h-29z"/><path id="XMLID_24_" class="st1" d="M86.9 21.6A20 20 0 0066.5 42c0 11.7 9.2 20.3 20.4 20.3s20.3-8.6 20.3-20.3A20 20 0 0087 21.6zm0 32.6c-6.2 0-11.5-5-11.5-12.3 0-7.3 5.3-12.3 11.5-12.3s11.4 5 11.4 12.3C98.3 49 93 54.2 87 54.2z"/><path id="XMLID_21_" class="st0" d="M186.7 26.1h-.4a14 14 0 00-10.6-4.5c-10.2 0-19 8.8-19 20.3 0 11.4 8.8 20.3 19 20.3 4.8 0 8.7-2.2 10.6-4.6h.3v2.8c0 7.7-4.1 11.9-10.8 11.9-5.4 0-8.8-4-10.2-7.2l-7.7 3.2c2.2 5.3 8 12 18 12C186.2 80.2 195 74 195 59V22.6h-8.4v3.5zm-10.3 28c-6.1 0-10.8-5.2-10.8-12.2 0-7.2 4.7-12.3 10.8-12.3 6 0 10.8 5.2 10.8 12.4 0 7-4.7 12.2-10.8 12.2z"/><path id="XMLID_18_" d="M132.3 21.6A20 20 0 00111.9 42c0 11.7 9.2 20.3 20.4 20.3s20.3-8.6 20.3-20.3a20 20 0 00-20.3-20.3zm0 32.6c-6.2 0-11.5-5-11.5-12.3 0-7.3 5.3-12.3 11.5-12.3s11.4 5 11.4 12.3c0 7.2-5.3 12.3-11.4 12.3z" fill="#fbbc05"/><path id="XMLID_3_" d="M202 .8h8.8v61.4h-8.7V.8z" fill="#34a853"/><path id="XMLID_14_" class="st1" d="M237.9 54.2c-4.6 0-7.8-2-9.9-6.2l27.2-11.2-1-2.3c-1.6-4.5-6.8-12.9-17.3-12.9-10.4 0-19.1 8.2-19.1 20.3 0 11.4 8.6 20.3 20 20.3 9.4 0 14.7-5.7 17-9l-7-4.6a11.6 11.6 0 01-10 5.6zm-.6-25c3.6 0 6.6 1.9 7.6 4.5l-18.3 7.6c0-8.6 6-12 10.7-12z"/></g></svg>

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

View File

@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 604 129"><path d="M213.2 74.3l-3.6 10.2h-.3c-.6-2.3-1.7-5.8-3.5-10L186.5 26h-18.9v77.3h12.5V55.6c0-3 0-6.4-.1-10.6-.1-2.1-.3-3.7-.4-4.9h.3c.6 3 1.3 5.2 1.8 6.6l23.2 56.4h8.8l23-56.9c.5-1.3 1-3.9 1.5-6.1h.3c-.3 5.7-.5 10.8-.6 13.9v49h13.3V25.8H233l-19.8 48.5zm50.6-26.7h13V103h-13zm6.6-23.4c-2.2 0-4 .8-5.5 2.2-1.5 1.4-2.3 3.2-2.3 5.4 0 2.1.8 3.9 2.3 5.3 1.5 1.4 3.3 2.1 5.5 2.1s4.1-.8 5.5-2.1c1.5-1.4 2.3-3.2 2.3-5.3s-.8-3.9-2.3-5.4c-1.3-1.4-3.2-2.2-5.5-2.2m52.5 22.9c-2.4-.5-4.9-.8-7.3-.8-5.9 0-11.3 1.3-15.8 3.9-4.5 2.6-8.1 6.2-10.4 10.7-2.4 4.6-3.6 9.9-3.6 16 0 5.3 1.2 10 3.5 14.3 2.3 4.2 5.5 7.6 9.8 9.9 4.1 2.3 8.9 3.5 14.3 3.5 6.2 0 11.5-1.3 15.7-3.7l.1-.1v-12l-.5.4c-1.9 1.4-4.1 2.6-6.3 3.3-2.3.8-4.4 1.2-6.2 1.2-5.2 0-9.3-1.5-12.2-4.8-3-3.2-4.5-7.6-4.5-13.1 0-5.7 1.5-10.2 4.6-13.5 3.1-3.3 7.2-5 12.2-5 4.2 0 8.5 1.4 12.4 4.2l.5.4V49.2l-.1-.1c-1.7-.7-3.6-1.5-6.2-2m42.9-.4c-3.2 0-6.2 1-8.8 3.1-2.2 1.8-3.7 4.4-5 7.5h-.1v-9.7h-13V103h13V74.7c0-4.8 1-8.8 3.2-11.7 2.2-3 5-4.5 8.4-4.5 1.2 0 2.4.3 3.9.5 1.4.4 2.4.8 3.1 1.3l.5.4v-13l-.3-.1c-.9-.6-2.7-.9-4.9-.9m35.4-.3c-9.1 0-16.4 2.7-21.5 8-5.2 5.3-7.7 12.6-7.7 21.8 0 8.6 2.6 15.6 7.6 20.7 5 5 11.8 7.6 20.3 7.6 8.9 0 16-2.7 21.1-8.1 5.2-5.4 7.7-12.6 7.7-21.5 0-8.8-2.4-15.8-7.3-20.9-4.7-5.1-11.6-7.6-20.2-7.6M411.6 89c-2.4 3.1-6.2 4.6-10.9 4.6s-8.5-1.5-11.2-4.8c-2.7-3.1-4-7.6-4-13.3 0-5.9 1.4-10.4 4-13.6 2.7-3.2 6.4-4.8 11.1-4.8 4.6 0 8.2 1.5 10.8 4.6 2.6 3.1 4 7.6 4 13.5-.2 6-1.3 10.7-3.8 13.8m46.1-18.4c-4.1-1.7-6.7-3-7.9-4.1-1-1-1.5-2.4-1.5-4.2 0-1.5.6-3 2.1-4s3.2-1.5 5.7-1.5c2.2 0 4.5.4 6.7 1s4.2 1.5 5.8 2.7l.5.4V48.7l-.3-.1c-1.5-.6-3.5-1.2-5.9-1.7-2.4-.4-4.6-.6-6.4-.6-6.2 0-11.3 1.5-15.3 4.8-4 3.1-5.9 7.3-5.9 12.2 0 2.6.4 4.9 1.3 6.8.9 1.9 2.2 3.7 4 5.2 1.8 1.4 4.4 3 8 4.5 3 1.3 5.3 2.3 6.7 3.1 1.4.8 2.3 1.7 3 2.4.5.8.8 1.8.8 3.1 0 3.7-2.8 5.5-8.5 5.5-2.2 0-4.5-.4-7.2-1.3s-5.2-2.2-7.3-3.7l-.5-.4v12.7l.3.1c1.9.9 4.2 1.5 7 2.2 2.8.5 5.3.9 7.5.9 6.7 0 12.2-1.5 16.1-4.8 4-3.2 6.1-7.3 6.1-12.6 0-3.7-1-7-3.2-9.5-2.9-2.4-6.5-4.9-11.7-6.9m49.2-24.2c-9.1 0-16.4 2.7-21.5 8s-7.7 12.6-7.7 21.8c0 8.6 2.6 15.6 7.6 20.7 5 5 11.8 7.6 20.3 7.6 8.9 0 16-2.7 21.1-8.1 5.2-5.4 7.7-12.6 7.7-21.5 0-8.8-2.4-15.8-7.3-20.9-4.7-5.1-11.6-7.6-20.2-7.6M517.2 89c-2.4 3.1-6.2 4.6-10.9 4.6-4.8 0-8.5-1.5-11.2-4.8-2.7-3.1-4-7.6-4-13.3 0-5.9 1.4-10.4 4-13.6 2.7-3.2 6.4-4.8 11.1-4.8 4.5 0 8.2 1.5 10.8 4.6 2.6 3.1 4 7.6 4 13.5 0 6-1.3 10.7-3.8 13.8m86.7-30.7V47.6h-13.1V31.2l-.4.1L578 35l-.3.1v12.5h-19.6v-7c0-3.2.8-5.7 2.2-7.3s3.5-2.4 6.1-2.4c1.8 0 3.7.4 5.8 1.3l.5.3V21.2l-.3-.1c-1.8-.6-4.2-1-7.3-1-3.9 0-7.3.9-10.4 2.4-3.1 1.7-5.4 4-7.1 7.1-1.7 3-2.6 6.4-2.6 10.3v7.7h-9.1v10.6h9.1V103h13.1V58.3h19.6v28.5c0 11.7 5.5 17.6 16.5 17.6 1.8 0 3.7-.3 5.5-.6 1.9-.4 3.3-.9 4.1-1.3l.1-.1V91.7l-.5.4c-.8.5-1.5.9-2.7 1.2-1 .3-1.9.4-2.6.4-2.6 0-4.4-.6-5.7-2.1-1.2-1.4-1.8-3.7-1.8-7.1V58.3h13.3z" fill="#737373"/><path fill="#F25022" d="M0 0h61.3v61.3H0z"/><path fill="#7FBA00" d="M67.7 0H129v61.3H67.7z"/><path fill="#00A4EF" d="M0 67.7h61.3V129H0z"/><path fill="#FFB900" d="M67.7 67.7H129V129H67.7z"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 604 129"><path d="M213.2 74.3l-3.6 10.2h-.3c-.6-2.3-1.7-5.8-3.5-10L186.5 26h-18.9v77.3h12.5V55.6L180 45l-.4-4.9h.3c.6 3 1.3 5.2 1.8 6.6l23.2 56.4h8.8l23-56.9c.5-1.3 1-3.9 1.5-6.1h.3l-.6 13.9v49h13.3V25.8H233l-19.8 48.5zm50.6-26.7h13V103h-13zm6.6-23.4c-2.2 0-4 .8-5.5 2.2a7.1 7.1 0 00-2.3 5.4 7 7 0 002.3 5.3c1.5 1.4 3.3 2.1 5.5 2.1s4.1-.8 5.5-2.1a7.4 7.4 0 000-10.7 7.3 7.3 0 00-5.5-2.2m52.5 22.9c-2.4-.5-4.9-.8-7.3-.8-5.9 0-11.3 1.3-15.8 3.9a26.1 26.1 0 00-10.4 10.7 34 34 0 00-.1 30.3 24 24 0 009.8 9.9c4.1 2.3 8.9 3.5 14.3 3.5 6.2 0 11.5-1.3 15.7-3.7l.1-.1v-12l-.5.4a22.3 22.3 0 01-12.5 4.5c-5.2 0-9.3-1.5-12.2-4.8-3-3.2-4.5-7.6-4.5-13.1 0-5.7 1.5-10.2 4.6-13.5a16 16 0 0112.2-5c4.2 0 8.5 1.4 12.4 4.2l.5.4V49.2l-.1-.1c-1.7-.7-3.6-1.5-6.2-2m42.9-.4c-3.2 0-6.2 1-8.8 3.1a18.7 18.7 0 00-5 7.5h-.1v-9.7h-13V103h13V74.7c0-4.8 1-8.8 3.2-11.7 2.2-3 5-4.5 8.4-4.5 1.2 0 2.4.3 3.9.5 1.4.4 2.4.8 3.1 1.3l.5.4v-13l-.3-.1c-.9-.6-2.7-.9-4.9-.9m35.4-.3c-9.1 0-16.4 2.7-21.5 8a29.8 29.8 0 00-7.7 21.8c0 8.6 2.6 15.6 7.6 20.7 5 5 11.8 7.6 20.3 7.6 8.9 0 16-2.7 21.1-8.1a29.7 29.7 0 007.7-21.5 29 29 0 00-7.3-20.9c-4.7-5.1-11.6-7.6-20.2-7.6M411.6 89c-2.4 3.1-6.2 4.6-10.9 4.6s-8.5-1.5-11.2-4.8c-2.7-3.1-4-7.6-4-13.3a21 21 0 014-13.6c2.7-3.2 6.4-4.8 11.1-4.8 4.6 0 8.2 1.5 10.8 4.6 2.6 3.1 4 7.6 4 13.5-.2 6-1.3 10.7-3.8 13.8m46.1-18.4c-4.1-1.7-6.7-3-7.9-4.1-1-1-1.5-2.4-1.5-4.2 0-1.5.6-3 2.1-4s3.2-1.5 5.7-1.5c2.2 0 4.5.4 6.7 1s4.2 1.5 5.8 2.7l.5.4V48.7l-.3-.1a36 36 0 00-12.3-2.3c-6.2 0-11.3 1.5-15.3 4.8-4 3.1-5.9 7.3-5.9 12.2 0 2.6.4 4.9 1.3 6.8.9 1.9 2.2 3.7 4 5.2 1.8 1.4 4.4 3 8 4.5a81 81 0 016.7 3.1c1.4.8 2.3 1.7 3 2.4.5.8.8 1.8.8 3.1 0 3.7-2.8 5.5-8.5 5.5a27.8 27.8 0 01-14.5-5l-.5-.4v12.7l.3.1a38.8 38.8 0 0014.5 3.1c6.7 0 12.2-1.5 16.1-4.8 4-3.2 6.1-7.3 6.1-12.6 0-3.7-1-7-3.2-9.5a40.5 40.5 0 00-11.7-6.9m49.2-24.2c-9.1 0-16.4 2.7-21.5 8s-7.7 12.6-7.7 21.8c0 8.6 2.6 15.6 7.6 20.7 5 5 11.8 7.6 20.3 7.6 8.9 0 16-2.7 21.1-8.1a29.7 29.7 0 007.7-21.5 29 29 0 00-7.3-20.9c-4.7-5.1-11.6-7.6-20.2-7.6M517.2 89c-2.4 3.1-6.2 4.6-10.9 4.6-4.8 0-8.5-1.5-11.2-4.8-2.7-3.1-4-7.6-4-13.3a21 21 0 014-13.6c2.7-3.2 6.4-4.8 11.1-4.8 4.5 0 8.2 1.5 10.8 4.6 2.6 3.1 4 7.6 4 13.5 0 6-1.3 10.7-3.8 13.8m86.7-30.7V47.6h-13.1V31.2l-.4.1L578 35l-.3.1v12.5h-19.6v-7c0-3.2.8-5.7 2.2-7.3s3.5-2.4 6.1-2.4c1.8 0 3.7.4 5.8 1.3l.5.3V21.2l-.3-.1c-1.8-.6-4.2-1-7.3-1-3.9 0-7.3.9-10.4 2.4-3.1 1.7-5.4 4-7.1 7.1-1.7 3-2.6 6.4-2.6 10.3v7.7h-9.1v10.6h9.1V103h13.1V58.3h19.6v28.5c0 11.7 5.5 17.6 16.5 17.6 1.8 0 3.7-.3 5.5-.6a18 18 0 004.1-1.3l.1-.1V91.7l-.5.4c-.8.5-1.5.9-2.7 1.2-1 .3-1.9.4-2.6.4-2.6 0-4.4-.6-5.7-2.1-1.2-1.4-1.8-3.7-1.8-7.1V58.3h13.3z" fill="#737373"/><path fill="#F25022" d="M0 0h61.3v61.3H0z"/><path fill="#7FBA00" d="M67.7 0H129v61.3H67.7z"/><path fill="#00A4EF" d="M0 67.7h61.3V129H0z"/><path fill="#FFB900" d="M67.7 67.7H129V129H67.7z"/></svg>

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="152" height="80"><path d="M77.5 0C118.645 0 152 17.909 152 40s-33.355 40-74.5 40S0 62.091 0 40 36.355 0 77.5 0z" fill-rule="evenodd" fill="#777bb3"/><path d="M32.331 21.353h15.952q7.023.059 10.178 4.044t2.083 10.884a20.864 20.864 0 01-1.844 6.186 18.385 18.385 0 01-3.809 5.472 13.3 13.3 0 01-6.369 3.925 29.343 29.343 0 01-7.022.836h-7.145L32.093 64H23.82l8.511-42.643m6.964 6.78l-3.571 17.839a4.38 4.38 0 00.714.059h.833a31.319 31.319 0 009.523-1.13q3.809-1.249 5.119-8.683 1.071-6.245-2.143-7.2a26.728 26.728 0 00-7.916-.892q-.714.059-1.369.059h-1.25l.06-.059M69.968 9.994h8.214l-2.321 11.36h7.38q6.071.12 9.047 2.5 3.036 2.378 1.786 9.04L90.086 52.7h-8.333l3.809-18.913q.595-2.974-.357-4.223T81.1 28.312l-6.607-.059L69.611 52.7H61.4L69.971 10M102.9 21.353h15.951q7.023.059 10.178 4.044t2.083 10.884a20.861 20.861 0 01-1.845 6.185 18.389 18.389 0 01-3.809 5.472 13.3 13.3 0 01-6.369 3.925 29.341 29.341 0 01-7.023.833h-7.143L102.656 64h-8.273l8.517-42.647m6.963 6.78l-3.571 17.842a4.376 4.376 0 00.714.059h.834a31.317 31.317 0 009.523-1.13q3.809-1.249 5.119-8.683 1.071-6.245-2.143-7.2a26.724 26.724 0 00-7.916-.892q-.714.059-1.369.059H109.8l.059-.059" fill="#fff" fill-rule="evenodd"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" width="152" height="80"><path d="M77.5 0C118.64 0 152 17.9 152 40s-33.35 40-74.5 40S0 62.1 0 40 36.35 0 77.5 0z" fill-rule="evenodd" fill="#777bb3"/><path d="M32.33 21.35h15.95q7.03.06 10.18 4.05t2.08 10.88a20.86 20.86 0 01-1.84 6.19 18.39 18.39 0 01-3.8 5.47 13.3 13.3 0 01-6.38 3.92 29.34 29.34 0 01-7.02.84h-7.14L32.09 64h-8.27l8.51-42.64m6.97 6.78l-3.58 17.84a4.38 4.38 0 00.72.06h.83a31.32 31.32 0 009.52-1.14q3.81-1.24 5.12-8.68 1.07-6.24-2.14-7.2a26.73 26.73 0 00-7.92-.89q-.71.06-1.37.06h-1.24l.05-.06M69.97 9.99h8.21l-2.32 11.36h7.38q6.07.12 9.05 2.5 3.03 2.38 1.78 9.04L90.1 52.7h-8.34l3.81-18.91q.6-2.98-.36-4.23t-4.1-1.25l-6.6-.06L69.6 52.7h-8.2L69.97 10m32.93 11.35h15.95q7.02.06 10.18 4.05t2.08 10.88a20.86 20.86 0 01-1.84 6.19 18.39 18.39 0 01-3.81 5.47 13.3 13.3 0 01-6.37 3.92 29.34 29.34 0 01-7.02.84h-7.15L102.66 64h-8.28l8.52-42.65m6.96 6.78l-3.57 17.85a4.38 4.38 0 00.72.05h.83a31.32 31.32 0 009.52-1.13q3.81-1.25 5.12-8.68 1.07-6.24-2.14-7.2a26.72 26.72 0 00-7.92-.9q-.71.07-1.37.07h-1.25l.06-.06" fill="#fff" fill-rule="evenodd"/></svg>

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 713 103"><path d="M150.3 32.9c-7.2 0-11.9 2.4-11.9 6.6s4.9 6.1 12.1 6.9c10.3.9 23.7 2.6 23.7 16.6 0 9.9-9.4 17-23.8 17-9.1 0-17.8-2-25.5-9.9l6.1-7.9c5.1 5.1 12 8 19.2 7.9 6.2 0 12.3-1.9 12.3-6.9s-4.8-6.7-13-7.4c-10.4-.9-22.8-4-22.8-15.9s12.8-16.4 23.2-16.4c7.8-.2 15.3 2.3 21.5 7.1l-6.1 7.1c-4.2-3.3-9.5-5-15-4.8zm62.5 36.6c5.9 0 12.7-2 16.2-5.8l7.6 7.1c-5.8 6.2-15.4 9.2-24 9.2-18.3 0-30.1-11-30.1-28.2 0-16.4 12.2-28.2 29.9-28.2 16.4 0 27.7 9.3 27.7 27.8 0 1.5-.1 3.2-.2 4.8h-45.2c.9 8.3 7.8 13.3 18.1 13.3zm-.4-36c-8.5 0-15.8 4.5-17.6 13.2h33.9c-.8-8.6-6.6-13.2-16.3-13.2zm81.7 15c0-9.3-5.4-14.6-15.1-14.6-4.2 0-8.3 1.7-11.3 4.8-3 3.1-4.5 7.3-4.4 11.6v28.5h-11.7v-54h10.7l.7 7.5c4.7-5.6 11.5-8.9 18.8-8.8 13.5 0 24 8.1 24 24.9v30.3H294l.1-30.2zM377 78.7h-11l-.7-8.5c-4.4 6.4-11.7 10.1-19.3 9.8-16.2 0-28.5-10.4-28.5-28.2 0-18.3 12.1-28.2 28.3-28.2 6.8 0 16 3.2 19.6 9.6V2.5h11.7l-.1 76.2zm-47.9-27c0 10.9 7.7 17.8 17.6 17.8 9.6 0 17.5-7.9 17.5-17.7s-7.8-17.7-17.5-17.7c-9.9 0-17.6 6.7-17.6 17.6zM398.7 1c1.9-.2 3.7.5 5.1 1.8S406 6 406 7.9c-.3 3.9-3.4 6.8-7.2 6.8s-7-3-7.2-6.8c0-1.9.7-3.8 2.1-5.1s3.2-1.9 5-1.8zm5.8 77.7h-11.7V24.8h11.7v53.9zm58.2-30.2c0-9.3-5.4-14.6-15.1-14.6-4.2 0-8.3 1.7-11.3 4.8-3 3.1-4.5 7.3-4.4 11.6v28.5h-11.7v-54h10.6l.7 7.5c4.7-5.6 11.6-8.9 18.8-8.8 13.5 0 24 8.1 24 24.9v30.3h-11.7l.1-30.2zm38.4-14.9c3.6-6.4 12.8-10.1 19.6-10.1 16.1 0 28.3 9.9 28.3 28.2 0 17.9-13.1 28.2-28.4 28.2-7 0-15.1-2.9-19.5-9.8l-.7 8.5h-11V2.5h11.7v31.1zm.7 18.1c-.1 4.8 1.8 9.4 5.2 12.8 3.4 3.4 8 5.2 12.7 5 10.2 0 17.6-6.9 17.6-17.8S529.8 34 519.7 34c-4.7-.2-9.3 1.6-12.7 5-3.4 3.4-5.3 8-5.2 12.7zm71.7 27h-11.7V2.5h11.7v76.2zm27.1-24.6c0 9.2 5.3 15.5 15.2 15.5 4.2 0 8.3-1.7 11.2-4.7 2.9-3.1 4.5-7.2 4.3-11.5V24.8H643v53.9h-10.5l-.7-7.4c-4.8 5.8-11.9 9-19.2 8.7-13.7 0-23.5-9.5-23.5-25.7V24.8h11.7l-.2 29.3zm85.1 15.4c5.9 0 12.7-2 16.2-5.8l7.6 7.1c-5.8 6.2-15.4 9.2-24 9.2-18.3 0-30.1-11-30.1-28.2 0-16.4 12.2-28.2 29.9-28.2 16.4 0 27.7 9.3 27.7 27.8 0 1.5-.1 3.2-.2 4.8h-45.3c1 8.3 7.9 13.3 18.2 13.3zm-.4-36c-8.5 0-15.9 4.5-17.6 13.2h33.8c-.7-8.6-6.6-13.2-16.2-13.2z" fill="#091e3f"/><path d="M90.8 26.3c-3.6-6.4-9.6-11-16.7-12.9-1.5-.4-3-.6-4.5-.8C64.6 5.3 56.2.9 47.2.9S29.9 5.3 24.9 12.7C16 13.5 8 18.6 3.6 26.3c-4.4 7.8-4.8 17.2-1.1 25.4C-1.2 59.8-.8 69.2 3.6 77c3.6 6.4 9.6 11 16.7 12.9 1.5.4 3 .7 4.6.8 5 7.4 13.4 11.8 22.4 11.8S64.6 98 69.7 90.6c8.9-.8 16.8-5.9 21.2-13.6 4.5-7.8 4.9-17.2 1.1-25.4 3.7-8.1 3.2-17.5-1.2-25.3zm-6.8 4c2.2 3.8 3 8.1 2.3 12.4-1.5-1.3-3.1-2.5-4.8-3.5-6.3-3.7-13.9-4.7-21-2.8-4.3 1.1-8.3 3.3-11.6 6.3-1.2-7.7 2.4-15.3 9.2-19.3 4.3-2.5 9.4-3.2 14.2-2 5.1 1.3 9.3 4.5 11.7 8.9zM47.2 9.9c4.2 0 8.3 1.5 11.5 4.2-1.9.6-3.7 1.4-5.4 2.4-10.1 6-15.3 17.8-12.7 29.3-7.1-2.9-11.7-9.7-11.7-17.3C28.8 18.3 37 10 47.2 9.9zM10.6 30.8c2.1-3.6 5.5-6.4 9.5-8-.4 1.9-.7 3.9-.7 5.8 0 11.7 7.8 22.2 19.4 25.8-2.1 1.7-4.5 2.9-7.1 3.6-4.8 1.2-9.9.6-14.2-1.9-9.1-5.1-12.2-16.4-7-25.3h.1zM10.5 73c-2.2-3.8-3-8.1-2.3-12.4 1.5 1.3 3.1 2.5 4.8 3.5 4.2 2.4 9 3.7 13.9 3.7 2.4 0 4.8-.3 7.1-.9 4.3-1.1 8.3-3.3 11.6-6.3 1.2 7.7-2.4 15.3-9.2 19.3-4.3 2.5-9.4 3.2-14.2 2-5-1.3-9.2-4.5-11.7-8.9zm36.9 20.4c-4.2 0-8.3-1.5-11.5-4.2 1.9-.6 3.7-1.4 5.4-2.4 10.1-6 15.3-17.8 12.8-29.2 8.2 3.3 13 11.9 11.4 20.6-1.7 8.7-9.3 15.1-18.1 15.2zm34.7-20.8c-2.1 3.6-5.3 6.4-9.2 8 .4-1.9.7-3.9.7-5.9 0-11.8-7.6-22.2-18.8-25.8 2-1.7 4.4-2.9 6.9-3.6 4.7-1.2 9.6-.5 13.8 2 8.7 5.2 11.7 16.4 6.6 25.3z" fill="#0092ff"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 713 103"><path d="M150.3 32.9c-7.2 0-11.9 2.4-11.9 6.6s4.9 6.1 12.1 6.9c10.3.9 23.7 2.6 23.7 16.6 0 9.9-9.4 17-23.8 17-9.1 0-17.8-2-25.5-9.9l6.1-7.9c5.1 5.1 12 8 19.2 7.9 6.2 0 12.3-1.9 12.3-6.9s-4.8-6.7-13-7.4c-10.4-.9-22.8-4-22.8-15.9s12.8-16.4 23.2-16.4c7.8-.2 15.3 2.3 21.5 7.1l-6.1 7.1c-4.2-3.3-9.5-5-15-4.8zm62.5 36.6c5.9 0 12.7-2 16.2-5.8l7.6 7.1a33.7 33.7 0 01-24 9.2c-18.3 0-30.1-11-30.1-28.2 0-16.4 12.2-28.2 29.9-28.2 16.4 0 27.7 9.3 27.7 27.8l-.2 4.8h-45.2c.9 8.3 7.8 13.3 18.1 13.3zm-.4-36c-8.5 0-15.8 4.5-17.6 13.2h33.9c-.8-8.6-6.6-13.2-16.3-13.2zm81.7 15c0-9.3-5.4-14.6-15.1-14.6a15.7 15.7 0 00-15.7 16.4v28.5h-11.7v-54h10.7l.7 7.5a24.1 24.1 0 0118.8-8.8c13.5 0 24 8.1 24 24.9v30.3H294l.1-30.2zM377 78.7h-11l-.7-8.5A22.4 22.4 0 01346 80c-16.2 0-28.5-10.4-28.5-28.2 0-18.3 12.1-28.2 28.3-28.2 6.8 0 16 3.2 19.6 9.6V2.5h11.7l-.1 76.2zm-47.9-27a17 17 0 0017.6 17.8c9.6 0 17.5-7.9 17.5-17.7s-7.8-17.7-17.5-17.7c-9.9 0-17.6 6.7-17.6 17.6zM398.7 1c1.9-.2 3.7.5 5.1 1.8S406 6 406 7.9a7.2 7.2 0 01-14.4 0c0-1.9.7-3.8 2.1-5.1s3.2-1.9 5-1.8zm5.8 77.7h-11.7V24.8h11.7v53.9zm58.2-30.2c0-9.3-5.4-14.6-15.1-14.6a15.7 15.7 0 00-15.7 16.4v28.5h-11.7v-54h10.6l.7 7.5a24.2 24.2 0 0118.8-8.8c13.5 0 24 8.1 24 24.9v30.3h-11.7l.1-30.2zm38.4-14.9c3.6-6.4 12.8-10.1 19.6-10.1 16.1 0 28.3 9.9 28.3 28.2 0 17.9-13.1 28.2-28.4 28.2a23 23 0 01-19.5-9.8l-.7 8.5h-11V2.5h11.7v31.1zm.7 18.1c-.1 4.8 1.8 9.4 5.2 12.8a17 17 0 0012.7 5c10.2 0 17.6-6.9 17.6-17.8S529.8 34 519.7 34a17.5 17.5 0 00-17.9 17.7zm71.7 27h-11.7V2.5h11.7v76.2zm27.1-24.6c0 9.2 5.3 15.5 15.2 15.5 4.2 0 8.3-1.7 11.2-4.7 2.9-3.1 4.5-7.2 4.3-11.5V24.8H643v53.9h-10.5l-.7-7.4c-4.8 5.8-11.9 9-19.2 8.7-13.7 0-23.5-9.5-23.5-25.7V24.8h11.7l-.2 29.3zm85.1 15.4c5.9 0 12.7-2 16.2-5.8l7.6 7.1a33.7 33.7 0 01-24 9.2c-18.3 0-30.1-11-30.1-28.2 0-16.4 12.2-28.2 29.9-28.2 16.4 0 27.7 9.3 27.7 27.8l-.2 4.8h-45.3c1 8.3 7.9 13.3 18.2 13.3zm-.4-36c-8.5 0-15.9 4.5-17.6 13.2h33.8c-.7-8.6-6.6-13.2-16.2-13.2z" fill="#091e3f"/><path d="M90.8 26.3c-3.6-6.4-9.6-11-16.7-12.9-1.5-.4-3-.6-4.5-.8a27.1 27.1 0 00-44.7.1 27.4 27.4 0 00-22.4 39A27.9 27.9 0 003.6 77a27.1 27.1 0 0021.3 13.7 27 27 0 0044.8-.1 27.5 27.5 0 0022.3-39 27.9 27.9 0 00-1.2-25.3zm-6.8 4c2.2 3.8 3 8.1 2.3 12.4a27.5 27.5 0 00-37.4 0A19 19 0 0184 30.3zM47.2 9.9c4.2 0 8.3 1.5 11.5 4.2a27.2 27.2 0 00-18.1 31.7 18.7 18.7 0 016.6-35.9zM10.6 30.8c2.1-3.6 5.5-6.4 9.5-8a27.2 27.2 0 0018.7 31.6 19 19 0 01-21.3 1.7 18.3 18.3 0 01-7-25.3h.1zM10.5 73c-2.2-3.8-3-8.1-2.3-12.4a28 28 0 0037.4 0A19 19 0 0110.5 73zm36.9 20.4c-4.2 0-8.3-1.5-11.5-4.2a27.3 27.3 0 0018.2-31.6c8.2 3.3 13 11.9 11.4 20.6a18.8 18.8 0 01-18.1 15.2zm34.7-20.8a19 19 0 01-9.2 8 27 27 0 00-18.1-31.7 18 18 0 0120.7-1.6 18.6 18.6 0 016.6 25.3z" fill="#0092ff"/></svg>

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 403.52 76.84"><g data-name="Layer 2"><g data-name="Layer 1"><path d="M0 0h105.69v76.64a16.45 16.45 0 01-1.87.2H1.49c-.5 0-1-.07-1.49-.11zm102.57 73.68V4.57l-96 69a11.22 11.22 0 001.25.22h35.2a5.15 5.15 0 002.67-1c4.22-2.94 8.37-6 12.55-9l18.5-13.24L78.52 53 49.81 73.68zM3.19 4.5v67.8l47.39-34.09zM7.5 3.22a6 6 0 00.71.78Q30.1 19.59 52 35.17c1.39 1 2.2.44 3.23-.31L96.8 4.6c.48-.35.89-.77 1.59-1.38zm198.33 22.6v49.81h-15V1.82c.83-.05 1.7-.14 2.57-.14 4.66 0 9.32.09 14-.05a3.6 3.6 0 013.94 2.42c5.66 12.09 11.46 24.12 17.24 36.17.38.78.81 1.53 1.45 2.74.7-1.32 1.18-2.16 1.6-3 5.87-12 11.76-24 17.55-36a3.32 3.32 0 013.55-2.27c5.55.13 11.11.05 16.82.05v74h-15V26.11l-.66-.22c-.4.71-.84 1.4-1.22 2.13-5.43 10.29-10.89 20.56-16.24 30.89a3.14 3.14 0 01-3.44 2c-2.64-.17-5.84.75-7.81-.43s-2.71-4.35-3.94-6.68q-6.87-13-13.7-26.07c-.37-.71-.8-1.39-1.2-2.09zM361.6 75.7h-15.27V1.92a6.68 6.68 0 011.24-.23c10.73.08 21.47.05 32.19.33a28 28 0 018.24 1.7c10.57 3.63 16.21 12.49 15.43 23.84-.69 10.1-7.94 18.11-18.73 20.38a55.82 55.82 0 01-9.4 1c-4.48.17-9 0-13.72 0zm.06-38.19h13.52a22.85 22.85 0 004.2-.44c5.13-1 8.41-5 8.82-10.55.43-5.82-2.39-11-7.36-12.4-6.3-1.83-12.78-.58-19.18-.85zM175.1 5.57c-1.28 4.34-2.5 8.43-3.78 12.76-1.7-.78-3.23-1.5-4.78-2.19a37.39 37.39 0 00-19.67-3.25c-5.5.6-8.76 4-8.57 8.78a7.46 7.46 0 004.56 6.62c3.95 1.87 8.15 3.22 12.19 4.9 5 2.06 10.18 3.73 14.72 6.49 7.78 4.74 10.75 13.14 8.51 21.69a17.84 17.84 0 01-8.47 10.86 30.75 30.75 0 01-13.91 4.34c-11.79.89-23.22-.65-34-5.74-.3-.14-.57-.32-1-.59 1-4.21 2-8.43 3.06-12.94a42.71 42.71 0 0018.7 6.76 77.58 77.58 0 0012.66.24c3.62-.22 6.87-1.67 8-5.61s-.36-7.63-4.31-9.91c-3-1.76-6.48-2.87-9.76-4.23-5.27-2.19-10.74-4-15.78-6.62s-8.92-6.92-10-12.86c-1.5-7.95 1.27-14.28 7.84-18.94a30.51 30.51 0 0116-5.33 59.25 59.25 0 0127.79 4.77zm125.25 7.69h-21.48c0-3.62-.07-7 .09-10.47 0-.4 1.28-1 2-1.06 3.9-.11 7.82-.05 11.73-.05h44.48v11.51h-21.5v62.42h-15.32z"/><path d="M7.5 3.22h90.89c-.7.61-1.11 1-1.59 1.38L55.19 34.86c-1 .75-1.84 1.31-3.23.31Q30.13 19.54 8.21 4a6 6 0 01-.71-.78z" fill="#21b193"/><path d="M361.66 37.51V13.25c6.4.27 12.88-1 19.18.85 5 1.44 7.79 6.58 7.36 12.4-.41 5.54-3.69 9.51-8.82 10.55a22.85 22.85 0 01-4.2.44c-4.47.05-8.93.02-13.52.02z" fill="#fff"/></g></g></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 403.5 76.8"><g data-name="Layer 2"><g data-name="Layer 1"><path d="M0 0h105.7v76.6a16.4 16.4 0 01-1.9.2H0zm102.6 73.7V4.6l-96 69a11.2 11.2 0 001.2.2H43a5.2 5.2 0 002.7-1l12.5-9 18.5-13.3 1.8 2.5-28.7 20.7zM3.2 4.5v67.8l47.4-34zm4.3-1.3a6 6 0 00.7.8L52 35.2c1.4 1 2.2.4 3.2-.3L96.8 4.6c.5-.3.9-.8 1.6-1.4zm198.3 22.6v49.8h-15V1.8l2.6-.1h14a3.6 3.6 0 014 2.3c5.6 12.1 11.4 24.2 17.2 36.2L230 43l1.6-3 17.6-36a3.3 3.3 0 013.5-2.3h16.9v74h-15V26.1l-.7-.2-1.2 2.1c-5.5 10.3-11 20.6-16.3 31a3.1 3.1 0 01-3.4 2c-2.6-.3-5.8.7-7.8-.5s-2.7-4.4-4-6.7l-13.7-26c-.3-.8-.8-1.5-1.2-2.2zm155.8 49.9h-15.3V1.9a6.7 6.7 0 011.3-.2c10.7 0 21.4 0 32.2.3a28 28 0 018.2 1.7 22.2 22.2 0 0115.4 23.9c-.7 10-8 18-18.7 20.3a55.8 55.8 0 01-9.4 1c-4.5.2-9 0-13.7 0zm0-38.2h13.6a22.9 22.9 0 004.2-.4c5.1-1 8.4-5 8.8-10.6.4-5.8-2.4-11-7.4-12.4-6.3-1.8-12.7-.6-19.1-.8zm-186.5-32l-3.8 12.8-4.8-2.2A37.4 37.4 0 00147 13c-5.5.6-8.8 4-8.6 8.8a7.5 7.5 0 004.6 6.6c4 1.9 8.1 3.2 12.2 4.9 5 2 10.1 3.7 14.7 6.5a18.9 18.9 0 018.5 21.7 17.8 17.8 0 01-8.5 10.8 30.8 30.8 0 01-13.9 4.4c-11.8.9-23.2-.7-34-5.8l-1-.6 3-12.9a42.7 42.7 0 0018.8 6.8 77.6 77.6 0 0012.6.2c3.6-.2 6.9-1.7 8-5.6s-.3-7.6-4.3-10c-3-1.7-6.5-2.8-9.8-4.1-5.2-2.2-10.7-4-15.7-6.7s-9-6.9-10-12.8c-1.5-8 1.2-14.3 7.8-19a30.5 30.5 0 0116-5.3 59.3 59.3 0 0127.8 4.8zm125.3 7.8h-21.5V2.8c0-.4 1.3-1 2-1 4-.2 7.9-.1 11.8-.1h44.5v11.5h-21.5v62.4h-15.3z"/><path d="M7.5 3.2h90.9l-1.6 1.4-41.6 30.3c-1 .7-1.9 1.3-3.2.3L8.2 4a6 6 0 01-.7-.8z" fill="#21b193"/><path d="M361.7 37.5V13.2c6.4.3 12.8-1 19.1.9 5 1.4 7.8 6.6 7.4 12.4-.4 5.5-3.7 9.5-8.8 10.6a22.9 22.9 0 01-4.2.4h-13.5z" fill="#fff"/></g></g></svg>

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="181" height="60"><defs><style>.cls-1{fill:#ccc;fill-rule:evenodd}</style></defs><path id="Rounded_Rectangle_1" data-name="Rounded Rectangle 1" class="cls-1" d="M47.124 46.084h34.292a4.277 4.277 0 110 8.555H47.124a4.277 4.277 0 110-8.555z"/><path id="Rounded_Rectangle_1-2" data-name="Rounded Rectangle 1" class="cls-1" d="M25.707 26.777h55.7a4.284 4.284 0 014.284 4.284v.016a4.284 4.284 0 01-4.284 4.284h-55.7a4.284 4.284 0 01-4.284-4.284v-.016a4.284 4.284 0 014.284-4.284z"/><path id="Rounded_Rectangle_1-3" data-name="Rounded Rectangle 1" class="cls-1" d="M4.284 6.416H81.41a4.284 4.284 0 014.284 4.284v.016A4.284 4.284 0 0181.41 15H4.284A4.284 4.284 0 010 10.716V10.7a4.284 4.284 0 014.284-4.284z"/><path id="_" data-name="" d="M178.878 57.783a6.911 6.911 0 01-5.186 2.2h-68.954a6.9 6.9 0 01-5.186-2.2 7.317 7.317 0 01-2.113-5.261V8.516a7.327 7.327 0 012.113-5.261 6.914 6.914 0 015.186-2.2h68.954a6.922 6.922 0 015.186 2.2 7.338 7.338 0 012.113 5.261v44.005a7.328 7.328 0 01-2.113 5.262zm-8.835-49.458l-30.732 24.681L108.58 8.325q-2.693-2.3-4.8-.383a2.672 2.672 0 00-.768 2.2 3.334 3.334 0 00.96 1.818l19.976 18.367-19.208 19.9a1.743 1.743 0 00-.192 2.487 1.392 1.392 0 001.249.574 2.532 2.532 0 001.44-.383l21.512-18.176 10.562 9.371 10.372-9.375L171.2 52.9a2.536 2.536 0 001.441.383 1.958 1.958 0 001.44-.574q.96-1.148-.384-2.487l-19.207-19.9 19.971-18.362a4.023 4.023 0 001.056-1.818 2.274 2.274 0 00-.864-2.2q-1.923-1.91-4.61.383z" fill="#819eaf" fill-rule="evenodd"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" width="181" height="60"><defs><style>.cls-1{fill:#ccc;fill-rule:evenodd}</style></defs><path id="Rounded_Rectangle_1" data-name="Rounded Rectangle 1" class="cls-1" d="M47.12 46.08h34.3a4.28 4.28 0 110 8.56h-34.3a4.28 4.28 0 110-8.56z"/><path id="Rounded_Rectangle_1-2" data-name="Rounded Rectangle 1" class="cls-1" d="M25.7 26.78h55.7a4.28 4.28 0 014.3 4.28v.02a4.28 4.28 0 01-4.3 4.28H25.7a4.28 4.28 0 01-4.28-4.28v-.02a4.28 4.28 0 014.29-4.28z"/><path id="Rounded_Rectangle_1-3" data-name="Rounded Rectangle 1" class="cls-1" d="M4.28 6.42h77.13a4.28 4.28 0 014.28 4.28v.02A4.28 4.28 0 0181.41 15H4.28A4.28 4.28 0 010 10.72v-.02a4.28 4.28 0 014.28-4.28z"/><path id="_" data-name="" d="M178.88 57.78a6.91 6.91 0 01-5.19 2.2h-68.95a6.9 6.9 0 01-5.19-2.2 7.32 7.32 0 01-2.11-5.26v-44a7.33 7.33 0 012.11-5.27 6.91 6.91 0 015.19-2.2h68.95a6.92 6.92 0 015.19 2.2 7.34 7.34 0 012.11 5.27v44a7.33 7.33 0 01-2.11 5.26zm-8.84-49.45L139.31 33 108.58 8.33q-2.7-2.3-4.8-.39a2.67 2.67 0 00-.77 2.2 3.33 3.33 0 00.96 1.82l19.98 18.37-19.21 19.9a1.74 1.74 0 00-.2 2.48 1.4 1.4 0 001.26.58 2.53 2.53 0 001.44-.39l21.5-18.17 10.57 9.37 10.37-9.38L171.2 52.9a2.54 2.54 0 001.44.38 1.96 1.96 0 001.44-.57q.96-1.15-.38-2.49l-19.21-19.9 19.97-18.36a4.02 4.02 0 001.06-1.82 2.27 2.27 0 00-.87-2.2q-1.92-1.9-4.6.39z" fill="#819eaf" fill-rule="evenodd"/></svg>

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 562.3 193.9"><path fill="#dc7e28" d="M562.3 41.4v133.4l-18.1 18.1V62.3z"/><linearGradient id="a" gradientUnits="userSpaceOnUse" x1="421.008" y1="59.066" x2="541.982" y2="192.343"><stop offset=".006" stop-color="#f8c51b"/><stop offset="1" stop-color="#e78f24"/></linearGradient><path fill="url(#a)" d="M422.3 62.3h122v130.6h-122z"/><path fill="#fdd600" d="M441.4 41.5l-19.1 20.8h121.9l18.1-20.9z"/><path fill="#90c7ea" d="M290.3 47.2l120-16.7-10.1 28.8-118.3 16.1z"/><linearGradient id="b" gradientUnits="userSpaceOnUse" x1="286.163" y1="75.325" x2="410.923" y2="175.512"><stop offset=".006" stop-color="#1f8aca"/><stop offset="1" stop-color="#01659e"/></linearGradient><path fill="url(#b)" d="M400.2 59.3l16.7 117-118.3 16.6-16.7-117.5z"/><path fill="#0b98d5" d="M400.2 59.3l16.7 117 9-25.3-15.5-119.8-.1-.7"/><linearGradient id="c" gradientUnits="userSpaceOnUse" x1="218.128" y1="80.759" x2="218.128" y2="190.084"><stop offset="0" stop-color="#269f49"/><stop offset="1" stop-color="#008a54"/></linearGradient><path fill="url(#c)" d="M189 37.2l106.2 48-47.9 108.7L141.1 146z"/><path fill="#95cea0" d="M178 0l11 37.2 106.2 48-8.9-35.6z"/><path fill="#69bf6d" d="M178 0l-42.8 101.4 5.9 44.6L189 37.2z"/><linearGradient id="d" gradientUnits="userSpaceOnUse" x1="59.535" y1="70.064" x2="78.336" y2="183.568"><stop offset="0" stop-color="#d81f32"/><stop offset="1" stop-color="#bb2637"/></linearGradient><path fill="url(#d)" d="M118.7 59.1l17.5 115.2-117.3 18.4L0 77.3z"/><path fill="#761216" d="M126.7 17.2l17.4 116.2-7.9 40.9-17.5-115.2z"/><path d="M525.6 109.3c-2.4-6.1-6-11.5-10.7-16.3-4.5-4.6-9.6-8.1-15.2-10.4-5.6-2.3-11.7-3.5-18.2-3.5-6.6 0-12.7 1.2-18.4 3.5-5.7 2.3-10.7 5.8-15.2 10.4-4.7 4.7-8.3 10.2-10.6 16.2-2.4 6.1-3.5 12.7-3.5 19.8 0 7.1 1.2 13.7 3.6 19.8 2.4 6.1 5.9 11.6 10.6 16.4 4.4 4.5 9.4 8 15 10.3 5.6 2.3 11.8 3.5 18.5 3.5 6.5 0 12.5-1.2 18.2-3.5 5.6-2.3 10.7-5.7 15.3-10.3 4.7-4.8 8.3-10.3 10.7-16.4 2.4-6.1 3.6-12.7 3.6-19.8-.1-7-1.3-13.6-3.7-19.7zm-25.1 43c-4.7 5.6-11 8.4-19.1 8.5-8.2 0-14.5-2.8-19.2-8.4-4.7-5.6-7.1-13.4-7.1-23.3 0-10.1 2.4-18 7-23.6 4.7-5.7 11-8.5 19.2-8.5 8.1 0 14.4 2.8 19.1 8.5 4.7 5.7 7 13.5 7 23.6.2 9.9-2.2 17.6-6.9 23.2zM78.6 125.9zm27.5 30c-.9-1.1-2.2-1.9-3.7-2.5-1.6-.5-3.4-.8-5.7-.8-2.1 0-4.5.2-7.2.7l-31 5.3c.3-2.4 1.5-5.5 3.6-9.3 2.3-4.3 5.8-9.4 10.3-15.4 1.6-2.1 2.8-3.7 3.6-4.8.6-.7 1.4-1.8 2.5-3.2 7.1-9.3 11.5-16.9 13.2-22.8 1-3.4 1.5-6.8 1.8-10.2.1-.9.1-1.9.1-2.8 0-2.4-.2-4.9-.6-7.2-.4-2.2-.9-4-1.6-5.4-.7-1.4-1.6-2.5-2.7-3.2-1.3-.8-3-1.1-5.4-1.1-1.9 0-4.2.2-6.9.7L40.5 80c-4.3.7-7.5 2-9.6 3.9-1.6 1.5-2.5 3.5-2.5 5.8 0 .6.1 1.2.2 1.8.5 3 2.1 5.3 4.6 6.4 1.5.7 3.3 1 5.5 1 1.4 0 3-.2 4.8-.4l30-5.1c.1.5.1 1.1.1 1.6 0 1.9-.3 3.7-1 5.5-.9 2.5-3.1 6-6.7 10.5-1 1.2-2.5 3.1-4.6 5.7-8.1 9.8-13.9 18.1-17.4 25.1-2.5 4.8-4.2 9.5-5.2 14.1-.6 2.7-.8 5.3-.8 7.8 0 1.8.1 3.5.4 5.2.4 2.4 1 4.4 1.8 5.9.8 1.6 1.8 2.7 3.1 3.4 1.2.6 2.9.9 5.2.9 3 0 7-.4 12.1-1.3l32.5-5.6c5.8-1 9.8-2.4 12.1-4.3 1.9-1.5 2.8-3.6 2.8-6.1 0-.6-.1-1.3-.2-1.9-.1-1.5-.7-2.9-1.6-4zm147.3-77.8c-4.2-4.4-9.2-7.9-15.2-10.4-5.9-2.5-11.9-3.8-17.9-3.8h-.3c-6 .1-12 1.5-18 4.1-6.2 2.7-11.6 6.5-16.3 11.4-4.6 4.9-8.4 10.7-11.2 17.5-2.9 6.7-4.4 13.5-4.7 20.2 0 .8-.1 1.5-.1 2.3 0 6 1 11.8 3.1 17.5 2.2 6 5.4 11.2 9.6 15.6 4.2 4.4 9.4 7.9 15.5 10.5 5.9 2.5 11.8 3.7 17.8 3.7h.2c6.1 0 12.1-1.3 18-3.9 6.3-2.8 11.7-6.6 16.4-11.5 4.7-4.9 8.4-10.7 11.3-17.5 2.9-6.8 4.4-13.5 4.7-20.2v-1.9c0-6-1.1-12-3.2-17.7-2.3-6.2-5.5-11.5-9.7-15.9zm-11.6 47.4c-4 9.4-9.3 15.9-15.8 19.5-3.5 1.9-7.1 2.9-10.8 2.9-3.2 0-6.6-.7-10-2.2-7.4-3.2-12.1-8.3-14.1-15.4-.7-2.4-1-4.9-1-7.6 0-5.3 1.3-11.1 4-17.3 4.1-9.6 9.4-16.2 16-19.8 3.5-1.9 7.1-2.9 10.8-2.9 3.3 0 6.6.7 10.1 2.2 7.4 3.1 12 8.2 13.9 15.5.6 2.4 1 4.8 1 7.5 0 5.2-1.4 11.1-4.1 17.6zm138.3-43.8c-.5-3.6-1.8-6.4-3.8-8.2-1.6-1.5-3.6-2.2-5.9-2.2-.6 0-1.2 0-1.8.1-3.1.4-5.4 1.9-6.9 4.2-1 1.7-1.6 3.7-1.6 6.1 0 .9.1 1.9.2 2.8l4.3 30.4-34 5-4.3-30.4c-.5-3.5-1.7-6.3-3.7-8.1-1.6-1.5-3.6-2.3-5.9-2.3-.5 0-1.1 0-1.6.1-3.2.5-5.6 1.9-7.1 4.2-1.1 1.7-1.6 3.7-1.6 6.1 0 .9.1 1.9.2 2.9l11.6 79.2c.5 3.6 1.8 6.4 3.9 8.2 1.6 1.4 3.7 2.1 6 2.1.6 0 1.3-.1 2-.2 2.9-.4 5.2-1.8 6.6-4.2 1-1.7 1.5-3.7 1.5-6 0-.9-.1-1.9-.2-2.9l-4.8-31.3 34-5 4.8 31.3c.5 3.6 1.8 6.3 3.8 8.2 1.6 1.4 3.7 2.2 6 2.2.6 0 1.2 0 1.8-.1 3.1-.4 5.4-1.8 6.8-4.2 1-1.7 1.5-3.7 1.5-6 0-.9-.1-1.9-.2-2.9l-11.6-79.1z" fill="#fff"/><path fill="#ec473f" d="M0 77.3l2.3-11.6 5.9-29.5 118.5-19-8 41.9z"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 562.3 193.9"><path fill="#dc7e28" d="M562.3 41.4v133.4l-18.1 18.1V62.3z"/><linearGradient id="a" gradientUnits="userSpaceOnUse" x1="421" y1="59.1" x2="542" y2="192.3"><stop offset="0" stop-color="#f8c51b"/><stop offset="1" stop-color="#e78f24"/></linearGradient><path fill="url(#a)" d="M422.3 62.3h122v130.6h-122z"/><path fill="#fdd600" d="M441.4 41.5l-19.1 20.8h121.9l18.1-20.9z"/><path fill="#90c7ea" d="M290.3 47.2l120-16.7-10.1 28.8-118.3 16.1z"/><linearGradient id="b" gradientUnits="userSpaceOnUse" x1="286.2" y1="75.3" x2="410.9" y2="175.5"><stop offset="0" stop-color="#1f8aca"/><stop offset="1" stop-color="#01659e"/></linearGradient><path fill="url(#b)" d="M400.2 59.3l16.7 117-118.3 16.6-16.7-117.5z"/><path fill="#0b98d5" d="M400.2 59.3l16.7 117 9-25.3-15.5-119.8-.1-.7"/><linearGradient id="c" gradientUnits="userSpaceOnUse" x1="218.1" y1="80.8" x2="218.1" y2="190.1"><stop offset="0" stop-color="#269f49"/><stop offset="1" stop-color="#008a54"/></linearGradient><path fill="url(#c)" d="M189 37.2l106.2 48-47.9 108.7L141.1 146z"/><path fill="#95cea0" d="M178 0l11 37.2 106.2 48-8.9-35.6z"/><path fill="#69bf6d" d="M178 0l-42.8 101.4 5.9 44.6L189 37.2z"/><linearGradient id="d" gradientUnits="userSpaceOnUse" x1="59.5" y1="70.1" x2="78.3" y2="183.6"><stop offset="0" stop-color="#d81f32"/><stop offset="1" stop-color="#bb2637"/></linearGradient><path fill="url(#d)" d="M118.7 59.1l17.5 115.2-117.3 18.4L0 77.3z"/><path fill="#761216" d="M126.7 17.2l17.4 116.2-7.9 40.9-17.5-115.2z"/><path d="M525.6 109.3a48.6 48.6 0 00-25.9-26.7 48.6 48.6 0 00-36.6 0A44.4 44.4 0 00447.9 93a46.4 46.4 0 00-10.6 16.2 53.6 53.6 0 00-3.5 19.8c0 7.1 1.2 13.7 3.6 19.8a48.7 48.7 0 0025.6 26.7 48.4 48.4 0 0062.7-26.7 53.6 53.6 0 00-.1-39.5zm-25.1 43a24 24 0 01-19.1 8.5c-8.2 0-14.5-2.8-19.2-8.4a35.2 35.2 0 01-7.1-23.3c0-10.1 2.4-18 7-23.6 4.7-5.7 11-8.5 19.2-8.5 8.1 0 14.4 2.8 19.1 8.5a36 36 0 017 23.6c.2 9.9-2.2 17.6-6.9 23.2zM78.6 125.9zm27.5 30a9 9 0 00-3.7-2.5c-1.6-.5-3.4-.8-5.7-.8-2.1 0-4.5.2-7.2.7l-31 5.3c.3-2.4 1.5-5.5 3.6-9.3 2.3-4.3 5.8-9.4 10.3-15.4l3.6-4.8 2.5-3.2a76.5 76.5 0 0013.2-22.8 52 52 0 001.8-10.2l.1-2.8c0-2.4-.2-4.9-.6-7.2-.4-2.2-.9-4-1.6-5.4a7.8 7.8 0 00-2.7-3.2c-1.3-.8-3-1.1-5.4-1.1-1.9 0-4.2.2-6.9.7L40.5 80c-4.3.7-7.5 2-9.6 3.9a7.8 7.8 0 00-2.5 5.8l.2 1.8a8 8 0 004.6 6.4c1.5.7 3.3 1 5.5 1 1.4 0 3-.2 4.8-.4l30-5.1.1 1.6c0 1.9-.3 3.7-1 5.5-.9 2.5-3.1 6-6.7 10.5l-4.6 5.7a140.6 140.6 0 00-17.4 25.1 56.4 56.4 0 00-5.2 14.1 35.6 35.6 0 00-.4 13c.4 2.4 1 4.4 1.8 5.9a7.4 7.4 0 003.1 3.4c1.2.6 2.9.9 5.2.9 3 0 7-.4 12.1-1.3l32.5-5.6c5.8-1 9.8-2.4 12.1-4.3a7.4 7.4 0 002.8-6.1l-.2-1.9a7.1 7.1 0 00-1.6-4zm147.3-77.8a44.2 44.2 0 00-15.2-10.4 45.7 45.7 0 00-17.9-3.8h-.3a50 50 0 00-34.3 15.5 57 57 0 00-11.2 17.5 57 57 0 00-4.7 20.2l-.1 2.3a50 50 0 0012.7 33.1 46.2 46.2 0 0033.3 14.2h.2c6.1 0 12.1-1.3 18-3.9a51.2 51.2 0 0016.4-11.5 57.3 57.3 0 0011.3-17.5 57.6 57.6 0 004.7-20.2v-1.9a51.3 51.3 0 00-12.9-33.6zm-11.6 47.4c-4 9.4-9.3 15.9-15.8 19.5a22.4 22.4 0 01-20.8.7 23.2 23.2 0 01-14.1-15.4c-.7-2.4-1-4.9-1-7.6 0-5.3 1.3-11.1 4-17.3a38.6 38.6 0 0116-19.8 22.4 22.4 0 0120.9-.7c7.4 3.1 12 8.2 13.9 15.5.6 2.4 1 4.8 1 7.5 0 5.2-1.4 11.1-4.1 17.6zm138.3-43.8c-.5-3.6-1.8-6.4-3.8-8.2a8.3 8.3 0 00-5.9-2.2l-1.8.1a9.3 9.3 0 00-6.9 4.2c-1 1.7-1.6 3.7-1.6 6.1l.2 2.8 4.3 30.4-34 5-4.3-30.4a13 13 0 00-3.7-8.1 8.4 8.4 0 00-5.9-2.3l-1.6.1a9.8 9.8 0 00-7.1 4.2 10.9 10.9 0 00-1.6 6.1l.2 2.9 11.6 79.2c.5 3.6 1.8 6.4 3.9 8.2a9 9 0 006 2.1l2-.2a8.6 8.6 0 006.6-4.2c1-1.7 1.5-3.7 1.5-6l-.2-2.9-4.8-31.3 34-5 4.8 31.3c.5 3.6 1.8 6.3 3.8 8.2a9 9 0 006 2.2l1.8-.1a8.7 8.7 0 006.8-4.2c1-1.7 1.5-3.7 1.5-6l-.2-2.9-11.6-79.1z" fill="#fff"/><path fill="#ec473f" d="M0 77.3l2.3-11.6 5.9-29.5 118.5-19-8 41.9z"/></svg>

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

@ -1 +1 @@
<svg id="recommended_-_orange_overlay" data-name="recommended - orange overlay" xmlns="http://www.w3.org/2000/svg" width="159" height="22"><defs><style>.cls-2{fill:#fff;fill-rule:evenodd}</style></defs><path id="reocmmended_bg" data-name="reocmmended bg" d="M0 0h155a4 4 0 014 4v18H4a4 4 0 01-4-4V0z" fill="#fb963c"/><path id="recommended" class="cls-2" d="M1524.28 1519.89a3.713 3.713 0 012.55.8 2.721 2.721 0 01.92 2.19 3.405 3.405 0 01-.47 1.82 2.434 2.434 0 01-1.51 1.08v.03a1.994 1.994 0 01.81.32 1.891 1.891 0 01.49.53 2.042 2.042 0 01.27.7 6.668 6.668 0 01.14.8c.02.28.04.56.05.85a7.893 7.893 0 00.08.85 5.045 5.045 0 00.18.79 1.922 1.922 0 00.36.66h-1.69a.973.973 0 01-.22-.48 4.45 4.45 0 01-.07-.68q-.015-.375-.03-.81a5.839 5.839 0 00-.1-.84c-.04-.28-.1-.55-.16-.8a1.693 1.693 0 00-.3-.65 1.437 1.437 0 00-.55-.45 2.013 2.013 0 00-.89-.17h-3.72v4.88h-1.52v-11.42h5.38zm.32 5.18a2.22 2.22 0 00.84-.31 1.732 1.732 0 00.58-.62 2.176 2.176 0 00.21-1.02 2.043 2.043 0 00-.48-1.41 1.968 1.968 0 00-1.55-.54h-3.78v3.98h3.17a5.512 5.512 0 001.01-.08zm13.55-5.18v1.28h-6.37v3.63h5.94v1.28h-5.94v3.95h6.42v1.28h-7.94v-11.42h7.89zm9.19 1.61a3.555 3.555 0 00-2.07-.6 3.676 3.676 0 00-1.75.38 3.618 3.618 0 00-1.2 1.03 4.6 4.6 0 00-.7 1.48 7.07 7.07 0 00-.22 1.73 7.879 7.879 0 00.22 1.85 4.521 4.521 0 00.7 1.52 3.557 3.557 0 001.21 1.03 3.717 3.717 0 001.76.38 3.431 3.431 0 001.33-.24 3.08 3.08 0 001.68-1.74 4.308 4.308 0 00.28-1.31h1.52a5.151 5.151 0 01-1.48 3.36 4.839 4.839 0 01-3.46 1.2 5.428 5.428 0 01-2.32-.46 4.576 4.576 0 01-1.65-1.25 5.658 5.658 0 01-.98-1.89 8.07 8.07 0 01-.33-2.34 7.745 7.745 0 01.35-2.34 5.756 5.756 0 011.03-1.91 4.743 4.743 0 011.7-1.29 5.389 5.389 0 012.33-.47 5.8 5.8 0 011.69.24 4.54 4.54 0 011.43.7 4.145 4.145 0 011.04 1.16 4.09 4.09 0 01.54 1.61h-1.52a2.819 2.819 0 00-1.13-1.83zm6.16 5.8a4.694 4.694 0 00.7 1.52 3.781 3.781 0 001.23 1.08 4.228 4.228 0 003.59 0 3.781 3.781 0 001.23-1.08 4.694 4.694 0 00.7-1.52 6.4 6.4 0 000-3.4 4.694 4.694 0 00-.7-1.52 3.781 3.781 0 00-1.23-1.08 4.228 4.228 0 00-3.59 0 3.781 3.781 0 00-1.23 1.08 4.694 4.694 0 00-.7 1.52 6.4 6.4 0 000 3.4zm-1.4-3.95a5.6 5.6 0 011.03-1.91 5.124 5.124 0 011.71-1.33 6.049 6.049 0 014.77 0 5.124 5.124 0 011.71 1.33 5.6 5.6 0 011.03 1.91 7.407 7.407 0 010 4.5 5.6 5.6 0 01-1.03 1.91 5.1 5.1 0 01-1.71 1.32 6.049 6.049 0 01-4.77 0 5.1 5.1 0 01-1.71-1.32 5.6 5.6 0 01-1.03-1.91 7.407 7.407 0 010-4.5zm14.96-3.46l3.6 9.6 3.62-9.6h2.08v11.42h-1.44v-9.5h-.03l-3.57 9.5h-1.3l-3.56-9.5h-.04v9.5h-1.44v-11.42h2.08zm14.34 0l3.6 9.6 3.62-9.6h2.08v11.42h-1.44v-9.5h-.04l-3.56 9.5h-1.3l-3.57-9.5h-.03v9.5h-1.44v-11.42h2.08zm20.11 0v1.28h-6.37v3.63h5.94v1.28h-5.94v3.95h6.42v1.28h-7.94v-11.42h7.89zm3.89 0l6.02 9.26h.03v-9.26h1.44v11.42h-1.67l-5.96-9.17h-.04v9.17h-1.44v-11.42h1.62zm14.4 10.14a5.574 5.574 0 00.64-.04 3.326 3.326 0 00.82-.19 3.832 3.832 0 00.85-.44 2.832 2.832 0 00.76-.78 4.181 4.181 0 00.55-1.24 6.328 6.328 0 00.22-1.8 7.855 7.855 0 00-.2-1.84 3.432 3.432 0 00-.66-1.37 2.86 2.86 0 00-1.17-.87 4.839 4.839 0 00-1.78-.29h-2.56v8.86h2.53zm-.13-10.14a5.738 5.738 0 014.07 1.34 5.385 5.385 0 011.42 4.1 9.354 9.354 0 01-.32 2.55 4.655 4.655 0 01-.99 1.87 4.228 4.228 0 01-1.71 1.16 6.842 6.842 0 01-2.47.4h-3.92v-11.42h3.92zm15.63 0v1.28h-6.36v3.63h5.93v1.28h-5.93v3.95h6.41v1.28h-7.93v-11.42h7.88zm6.34 10.14a5.574 5.574 0 00.64-.04 3.326 3.326 0 00.82-.19 3.832 3.832 0 00.85-.44 2.832 2.832 0 00.76-.78 4.181 4.181 0 00.55-1.24 6.328 6.328 0 00.22-1.8 7.855 7.855 0 00-.2-1.84 3.432 3.432 0 00-.66-1.37 2.86 2.86 0 00-1.17-.87 4.839 4.839 0 00-1.78-.29h-2.56v8.86h2.53zm-.13-10.14a5.738 5.738 0 014.07 1.34 5.385 5.385 0 011.42 4.1 9.354 9.354 0 01-.32 2.55 4.655 4.655 0 01-.99 1.87 4.228 4.228 0 01-1.71 1.16 6.842 6.842 0 01-2.47.4h-3.92v-11.42h3.92z" transform="translate(-1493 -1514)"/><path id="star" class="cls-2" d="M1504.56 1518.67l-1.78 3.62-4 .58a.872.872 0 00-.48 1.49l2.89 2.82-.69 3.98a.875.875 0 001.27.92l3.58-1.88 3.57 1.88a.877.877 0 001.27-.92l-.69-3.98 2.89-2.82a.872.872 0 00-.48-1.49l-3.99-.58-1.79-3.62a.876.876 0 00-1.57 0z" transform="translate(-1493 -1514)"/></svg>
<svg id="recommended_-_orange_overlay" data-name="recommended - orange overlay" xmlns="http://www.w3.org/2000/svg" width="159" height="22"><defs><style>.cls-2{fill:#fff;fill-rule:evenodd}</style></defs><path id="reocmmended_bg" data-name="reocmmended bg" d="M0 0h155a4 4 0 014 4v18H4a4 4 0 01-4-4V0z" fill="#fb963c"/><path id="recommended" class="cls-2" d="M1524.3 1519.9a3.7 3.7 0 012.5.8 2.7 2.7 0 011 2.2 3.4 3.4 0 01-.5 1.8 2.4 2.4 0 01-1.5 1v.1a2 2 0 01.8.3 1.9 1.9 0 01.5.6 2 2 0 01.2.7 6.7 6.7 0 01.2.8v.8a7.9 7.9 0 00.1.9 5 5 0 00.2.7 2 2 0 00.4.7h-1.7a1 1 0 01-.3-.5 4.5 4.5 0 010-.7v-.8a5.8 5.8 0 00-.2-.8l-.1-.8a1.7 1.7 0 00-.3-.7 1.4 1.4 0 00-.6-.4 2 2 0 00-.9-.2h-3.7v5h-1.5v-11.5h5.4zm.3 5.2a2.2 2.2 0 00.8-.3 1.7 1.7 0 00.6-.7 2.2 2.2 0 00.2-1 2 2 0 00-.5-1.4 2 2 0 00-1.5-.5h-3.8v4h3.2a5.5 5.5 0 001-.1zm13.6-5.2v1.3h-6.4v3.6h6v1.3h-6v4h6.4v1.2h-8V1520h8zm9.1 1.6a3.6 3.6 0 00-2-.6 3.7 3.7 0 00-1.8.4 3.6 3.6 0 00-1.2 1 4.6 4.6 0 00-.7 1.5 7 7 0 00-.2 1.7 7.9 7.9 0 00.2 1.9 4.5 4.5 0 00.7 1.5 3.6 3.6 0 001.2 1 3.7 3.7 0 001.8.4 3.4 3.4 0 001.3-.2 3 3 0 001.7-1.8 4.3 4.3 0 00.3-1.3h1.5a5.2 5.2 0 01-1.5 3.4 4.8 4.8 0 01-3.4 1.2 5.4 5.4 0 01-2.4-.5 4.6 4.6 0 01-1.6-1.2 5.7 5.7 0 01-1-2 8 8 0 01-.3-2.3 7.7 7.7 0 01.3-2.3 5.8 5.8 0 011-2 4.7 4.7 0 011.8-1.2 5.4 5.4 0 012.3-.5 5.8 5.8 0 011.7.3 4.5 4.5 0 011.4.7 4.1 4.1 0 011 1.1 4 4 0 01.6 1.6h-1.5a2.8 2.8 0 00-1.2-1.8zm6.2 5.8a4.7 4.7 0 00.7 1.5 3.8 3.8 0 001.2 1.1 4.2 4.2 0 003.6 0 3.8 3.8 0 001.2-1 4.7 4.7 0 00.7-1.6 6.4 6.4 0 000-3.4 4.7 4.7 0 00-.7-1.5 3.8 3.8 0 00-1.2-1.1 4.2 4.2 0 00-3.6 0 3.8 3.8 0 00-1.2 1 4.7 4.7 0 00-.7 1.6 6.4 6.4 0 000 3.4zm-1.4-4a5.6 5.6 0 011-1.9 5.1 5.1 0 011.7-1.3 6 6 0 014.8 0 5.1 5.1 0 011.7 1.3 5.6 5.6 0 011 2 7.4 7.4 0 010 4.4 5.6 5.6 0 01-1 2 5.1 5.1 0 01-1.7 1.3 6 6 0 01-4.8 0 5.1 5.1 0 01-1.7-1.3 5.6 5.6 0 01-1-2 7.4 7.4 0 010-4.5zm15-3.4l3.6 9.6 3.6-9.6h2v11.4h-1.4v-9.5l-3.6 9.5h-1.3l-3.5-9.5v9.5h-1.5V1520h2zm14.3 0l3.6 9.6 3.6-9.6h2.1v11.4h-1.4v-9.5l-3.6 9.5h-1.3l-3.6-9.5v9.5h-1.5V1520h2.1zm20.1 0v1.3h-6.4v3.6h6v1.3h-6v4h6.5v1.2h-8V1520h8zm3.9 0l6 9.2v-9.2h1.5v11.4h-1.7l-6-9.2v9.2h-1.4V1520h1.6zm14.4 10.1a5.6 5.6 0 00.6 0 3.3 3.3 0 00.9-.2 3.8 3.8 0 00.8-.4 2.8 2.8 0 00.8-.8 4.2 4.2 0 00.5-1.3 6.3 6.3 0 00.2-1.8 7.9 7.9 0 00-.2-1.8 3.4 3.4 0 00-.6-1.4 2.9 2.9 0 00-1.2-.8 4.8 4.8 0 00-1.8-.3h-2.5v8.8h2.5zm-.1-10.1a5.7 5.7 0 014 1.3 5.4 5.4 0 011.5 4.1 9.4 9.4 0 01-.4 2.6 4.7 4.7 0 01-1 1.8 4.2 4.2 0 01-1.7 1.2 6.8 6.8 0 01-2.4.4h-4V1520h4zm15.6 0v1.3h-6.4v3.6h6v1.3h-6v4h6.4v1.2h-7.9V1520h7.9zm6.3 10.1a5.6 5.6 0 00.7 0 3.3 3.3 0 00.8-.2 3.8 3.8 0 00.8-.4 2.8 2.8 0 00.8-.8 4.2 4.2 0 00.6-1.3 6.3 6.3 0 00.2-1.8 7.9 7.9 0 00-.2-1.8 3.4 3.4 0 00-.7-1.4 2.9 2.9 0 00-1.2-.8 4.8 4.8 0 00-1.7-.3h-2.6v8.8h2.5zm0-10.1a5.7 5.7 0 014 1.3 5.4 5.4 0 011.4 4.1 9.4 9.4 0 01-.3 2.6 4.7 4.7 0 01-1 1.8 4.2 4.2 0 01-1.7 1.2 6.8 6.8 0 01-2.5.4h-4V1520h4z" transform="translate(-1493 -1514)"/><path id="star" class="cls-2" d="M1504.6 1518.7l-1.8 3.6-4 .6a.9.9 0 00-.5 1.5l2.9 2.8-.7 4a.9.9 0 001.3.9l3.6-1.9 3.5 1.9a.9.9 0 001.3-1l-.7-4 2.9-2.7a.9.9 0 00-.5-1.5l-4-.6-1.8-3.6a.9.9 0 00-1.5 0z" transform="translate(-1493 -1514)"/></svg>

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View File

@ -1,13 +1,13 @@
msgid ""
msgstr ""
"Project-Id-Version: WP Mail SMTP 2.4.0\n"
"Project-Id-Version: WP Mail SMTP 2.5.0\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/wp-mail-smtp\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2020-09-17T12:40:51+03:00\n"
"POT-Creation-Date: 2020-10-22T11:59:56+03:00\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"X-Generator: WP-CLI 2.4.0\n"
"X-Domain: wp-mail-smtp\n"
@ -33,157 +33,195 @@ msgid "https://wpforms.com/"
msgstr ""
#. translators: %s - error code, returned by Google API.
#: src/Admin/Area.php:126
#: src/Admin/Area.php:129
msgid "There was an error while processing the authentication request: %s. Please try again."
msgstr ""
#: src/Admin/Area.php:133
#: src/Admin/Area.php:136
msgid "There was an error while processing the authentication request. Please try again."
msgstr ""
#: src/Admin/Area.php:140
#: src/Admin/Area.php:143
msgid "There was an error while processing the authentication request. Please make sure that you have Client ID and Client Secret both valid and saved."
msgstr ""
#: src/Admin/Area.php:149
#: src/Admin/Area.php:152
msgid "You have successfully linked the current site with your Google API project. Now you can start sending emails through Gmail."
msgstr ""
#. translators: %s - Mailer anchor link.
#: src/Admin/Area.php:180
#: src/Admin/Area.php:183
msgid "Thanks for using WP Mail SMTP! To complete the plugin setup and start sending emails, <strong>please select and configure your <a href=\"%s\">Mailer</a></strong>."
msgstr ""
#: src/Admin/Area.php:203
#: src/Admin/Area.php:204
#: src/Admin/Area.php:206
#: src/Admin/Area.php:207
#: src/Admin/Area.php:252
#: src/Admin/Area.php:253
#: src/SiteHealth.php:40
msgid "WP Mail SMTP"
msgstr ""
#: src/Admin/Area.php:214
#: src/Admin/Area.php:215
#: src/Admin/Area.php:862
#: src/Admin/Area.php:217
#: src/Admin/Area.php:218
#: src/Admin/Area.php:956
msgid "Settings"
msgstr ""
#: src/Admin/Area.php:222
#: src/Admin/Area.php:223
#: src/Admin/Area.php:225
#: src/Admin/Area.php:226
#: src/Admin/Pages/About.php:653
#: src/Admin/Pages/Logs.php:48
#: src/Admin/Pages/LogsTab.php:30
msgid "Email Log"
msgstr ""
#: src/Admin/Area.php:232
#: src/Admin/Area.php:233
#: src/Admin/Area.php:235
#: src/Admin/Area.php:236
#: src/Admin/Pages/About.php:106
msgid "About Us"
msgstr ""
#: src/Admin/Area.php:296
#: src/Admin/Area.php:280
#: src/Admin/Area.php:286
#: src/Admin/Pages/SettingsTab.php:37
msgid "General"
msgstr ""
#: src/Admin/Area.php:294
msgid "Multisite"
msgstr ""
#: src/Admin/Area.php:295
msgid "Pro+ badge icon"
msgstr ""
#: src/Admin/Area.php:305
msgid "Settings control"
msgstr ""
#: src/Admin/Area.php:311
msgid "Make the plugin settings global network-wide"
msgstr ""
#: src/Admin/Area.php:315
msgid "If disabled, each subsite of this multisite will have its own WP Mail SMTP settings page that has to be configured separately."
msgstr ""
#: src/Admin/Area.php:317
msgid "If enabled, these global settings will manage email sending for all subsites of this multisite."
msgstr ""
#: src/Admin/Area.php:324
#: src/Admin/Pages/ControlTab.php:119
#: src/Admin/Pages/LogsTab.php:68
msgid "Upgrade to WP Mail SMTP Pro"
msgstr ""
#: src/Admin/Area.php:390
msgid "Are you sure you want to reset the current provider connection? You will need to immediately create a new one to be able to send emails."
msgstr ""
#: src/Admin/Area.php:297
#: src/Admin/Area.php:391
msgid "Changes that you made to the settings are not saved!"
msgstr ""
#: src/Admin/Area.php:299
#: src/Admin/Area.php:393
msgid "Heads up!"
msgstr ""
#: src/Admin/Area.php:301
#: src/Admin/Area.php:395
msgid "<p>The Default (PHP) mailer is currently selected, but is not recommended because in most cases it does not resolve email delivery issues.</p><p>Please consider selecting and configuring one of the other mailers.</p>"
msgstr ""
#: src/Admin/Area.php:304
#: src/Admin/Area.php:398
#: src/Admin/PageAbstract.php:83
msgid "Save Settings"
msgstr ""
#: src/Admin/Area.php:305
#: src/Admin/Area.php:399
msgid "Cancel"
msgstr ""
#: src/Admin/Area.php:306
#: src/Admin/Area.php:400
msgid "Warning icon"
msgstr ""
#: src/Admin/Area.php:311
#: src/Admin/Area.php:405
msgid "%name% is a PRO Feature"
msgstr ""
#: src/Admin/Area.php:312
#: src/Admin/Area.php:406
msgid "Upgrade to Pro"
msgstr ""
#: src/Admin/Area.php:316
#: src/Admin/Area.php:410
msgid "<strong>Bonus:</strong> WP Mail SMTP users get <span>$50 off</span> regular price,<br>applied at checkout."
msgstr ""
#: src/Admin/Area.php:325
#: src/Admin/Area.php:419
msgid "Already purchased?"
msgstr ""
#: src/Admin/Area.php:394
#: src/Admin/Area.php:401
#: src/Admin/Area.php:488
#: src/Admin/Area.php:495
#: src/Admin/Pages/About.php:334
msgid "Activate"
msgstr ""
#: src/Admin/Area.php:395
#: src/Admin/Area.php:489
#: src/Admin/Pages/About.php:326
msgid "Activated"
msgstr ""
#: src/Admin/Area.php:396
#: src/Admin/Area.php:490
#: src/Admin/Pages/About.php:323
msgid "Active"
msgstr ""
#: src/Admin/Area.php:397
#: src/Admin/Area.php:491
#: src/Admin/Pages/About.php:331
msgid "Inactive"
msgstr ""
#: src/Admin/Area.php:398
#: src/Admin/Area.php:492
msgid "Processing..."
msgstr ""
#: src/Admin/Area.php:399
#: src/Admin/Area.php:493
msgid "Could not install a plugin. Please download from WordPress.org and install manually."
msgstr ""
#: src/Admin/Area.php:400
#: src/Admin/Area.php:494
msgid "Install and Activate"
msgstr ""
#: src/Admin/Area.php:402
#: src/Admin/Area.php:496
msgid "Download"
msgstr ""
#. translators: %1$s - WP.org link; %2$s - same WP.org link.
#: src/Admin/Area.php:464
#: src/Admin/Area.php:558
msgid "Please rate <strong>WP Mail SMTP</strong> <a href=\"%1$s\" target=\"_blank\" rel=\"noopener noreferrer\">&#9733;&#9733;&#9733;&#9733;&#9733;</a> on <a href=\"%2$s\" target=\"_blank\" rel=\"noopener noreferrer\">WordPress.org</a> to help us spread the word. Thank you from the WP Mail SMTP team!"
msgstr ""
#: src/Admin/Area.php:803
#: src/Admin/Area.php:897
msgid "WP Mail SMTP Pro related message was successfully dismissed."
msgstr ""
#: src/Admin/Area.php:822
#: src/Admin/Area.php:916
msgid "Educational notice for this mailer was successfully dismissed."
msgstr ""
#: src/Admin/Area.php:861
#: src/Admin/Area.php:955
msgid "Go to WP Mail SMTP Settings page"
msgstr ""
#: src/Admin/Area.php:868
#: src/Admin/Area.php:962
msgid "Go to WP Mail SMTP Lite vs Pro comparison page"
msgstr ""
#: src/Admin/Area.php:869
#: src/Admin/Area.php:963
msgid "Premium Support"
msgstr ""
@ -472,11 +510,6 @@ msgstr ""
msgid "Email Controls allows you to granularly manage emails sent by WordPress."
msgstr ""
#: src/Admin/Pages/ControlTab.php:119
#: src/Admin/Pages/LogsTab.php:68
msgid "Upgrade to WP Mail SMTP Pro"
msgstr ""
#: src/Admin/Pages/LogsTab.php:53
msgid "Unlock Email Logging"
msgstr ""
@ -573,15 +606,11 @@ msgstr ""
msgid "By allowing us to track usage data we can better help you because we know with which WordPress configurations, themes and plugins we should test."
msgstr ""
#: src/Admin/Pages/MiscTab.php:257
#: src/Admin/Pages/SettingsTab.php:597
#: src/Admin/Pages/MiscTab.php:255
#: src/Admin/Pages/SettingsTab.php:604
msgid "Settings were successfully saved."
msgstr ""
#: src/Admin/Pages/SettingsTab.php:37
msgid "General"
msgstr ""
#: src/Admin/Pages/SettingsTab.php:73
msgid "License"
msgstr ""
@ -1000,7 +1029,7 @@ msgid "Could not connect to the SMTP host."
msgstr ""
#: src/Admin/Pages/TestTab.php:662
#: src/Admin/Pages/TestTab.php:1048
#: src/Admin/Pages/TestTab.php:1050
msgid "Typically this error is returned for one of the following reasons:"
msgstr ""
@ -1009,7 +1038,7 @@ msgid "SMTP settings are incorrect (wrong port, security setting, incorrect host
msgstr ""
#: src/Admin/Pages/TestTab.php:664
#: src/Admin/Pages/TestTab.php:1050
#: src/Admin/Pages/TestTab.php:1052
msgid "Your web server is blocking the connection."
msgstr ""
@ -1084,10 +1113,10 @@ msgstr ""
#: src/Admin/Pages/TestTab.php:756
#: src/Admin/Pages/TestTab.php:805
#: src/Admin/Pages/TestTab.php:825
#: src/Admin/Pages/TestTab.php:851
#: src/Admin/Pages/TestTab.php:867
#: src/Admin/Pages/TestTab.php:919
#: src/Admin/Pages/TestTab.php:945
#: src/Admin/Pages/TestTab.php:853
#: src/Admin/Pages/TestTab.php:869
#: src/Admin/Pages/TestTab.php:921
#: src/Admin/Pages/TestTab.php:947
msgid "Google API Error."
msgstr ""
@ -1143,195 +1172,205 @@ msgid "Unfortunately, this error can be due to many different reasons."
msgstr ""
#. translators: %s - Blog article URL.
#: src/Admin/Pages/TestTab.php:831
msgid "Please <a href=\"%s\" target=\"_blank\" rel=\"noopener noreferrer\">read this article</a> to learn more about what can cause this error and how it can be resolved."
#: src/Admin/Pages/TestTab.php:829
msgid "Please <a href=\"%s\" target=\"_blank\" rel=\"noopener noreferrer\">read this article</a> to learn more about what can cause this error and follow the steps below."
msgstr ""
#: src/Admin/Pages/TestTab.php:852
#: src/Admin/Pages/TestTab.php:842
#: src/Providers/Gmail/Mailer.php:270
msgid "Go to WP Mail SMTP plugin settings page. Click the “Remove Connection” button."
msgstr ""
#: src/Admin/Pages/TestTab.php:843
#: src/Providers/Gmail/Mailer.php:271
msgid "Then click the “Allow plugin to send emails using your Google account” button and re-enable access."
msgstr ""
#: src/Admin/Pages/TestTab.php:854
msgid "Authentication code that Google returned to you has already been used on your previous auth attempt."
msgstr ""
#: src/Admin/Pages/TestTab.php:855
#: src/Admin/Pages/TestTab.php:857
msgid "Make sure that you are not trying to manually clean up the plugin options to retry the \"Allow...\" step."
msgstr ""
#: src/Admin/Pages/TestTab.php:856
#: src/Admin/Pages/TestTab.php:858
msgid "Reinstall the plugin with clean plugin data turned on on Misc page. This will remove all the plugin options and you will be safe to retry."
msgstr ""
#: src/Admin/Pages/TestTab.php:857
#: src/Admin/Pages/TestTab.php:859
msgid "Make sure there is no aggressive caching on site admin area pages or try to clean cache between attempts."
msgstr ""
#: src/Admin/Pages/TestTab.php:868
#: src/Admin/Pages/TestTab.php:870
msgid "There are various reasons for that, please review the steps below."
msgstr ""
#. translators: %s - Google G Suite Admin area URL.
#: src/Admin/Pages/TestTab.php:873
#: src/Admin/Pages/TestTab.php:875
msgid "Make sure that your G Suite trial period has not expired. You can check the status <a href=\"%s\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>."
msgstr ""
#. translators: %s - Google G Suite Admin area URL.
#: src/Admin/Pages/TestTab.php:886
#: src/Admin/Pages/TestTab.php:888
msgid "Make sure that Gmail app in your G Suite is actually enabled. You can check that in Apps list in <a href=\"%s\" target=\"_blank\" rel=\"noopener noreferrer\">G Suite Admin</a> area."
msgstr ""
#. translators: %s - Google Developers Console URL.
#: src/Admin/Pages/TestTab.php:899
#: src/Admin/Pages/TestTab.php:901
msgid "Make sure that you have Gmail API enabled, and you can do that <a href=\"%s\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>."
msgstr ""
#: src/Admin/Pages/TestTab.php:922
#: src/Admin/Pages/TestTab.php:949
#: src/Admin/Pages/TestTab.php:924
#: src/Admin/Pages/TestTab.php:951
msgid "Make sure that the used Client ID/Secret correspond to a proper project that has Gmail API enabled."
msgstr ""
#. translators: %s - Gmail documentation URL.
#: src/Admin/Pages/TestTab.php:925
#: src/Admin/Pages/TestTab.php:927
msgid "Please follow our <a href=\"%s\" target=\"_blank\" rel=\"noopener noreferrer\">Gmail tutorial</a> to be sure that all the correct project and data is applied."
msgstr ""
#: src/Admin/Pages/TestTab.php:946
#: src/Admin/Pages/TestTab.php:948
msgid "You may have added a new API to a project"
msgstr ""
#: src/Admin/Pages/TestTab.php:950
#: src/Admin/Pages/TestTab.php:952
msgid "Try to use a separate project for your emails, so the project has only 1 Gmail API in it enabled. You will need to remove the old project and create a new one from scratch."
msgstr ""
#: src/Admin/Pages/TestTab.php:960
#: src/Admin/Pages/TestTab.php:962
msgid "SMTP.com API Error."
msgstr ""
#: src/Admin/Pages/TestTab.php:961
#: src/Admin/Pages/TestTab.php:963
msgid "Your Sender Name option is incorrect."
msgstr ""
#: src/Admin/Pages/TestTab.php:964
#: src/Admin/Pages/TestTab.php:966
msgid "Please make sure you entered an accurate Sender Name in WP Mail SMTP plugin settings."
msgstr ""
#: src/Admin/Pages/TestTab.php:974
#: src/Admin/Pages/TestTab.php:976
msgid "GuzzleHttp requirements."
msgstr ""
#: src/Admin/Pages/TestTab.php:975
#: src/Admin/Pages/TestTab.php:977
msgid "GuzzleHttp requires cURL, the allow_url_fopen ini setting, or a custom HTTP handler."
msgstr ""
#: src/Admin/Pages/TestTab.php:978
#: src/Admin/Pages/TestTab.php:980
msgid "Edit your php.ini file on your hosting server."
msgstr ""
#: src/Admin/Pages/TestTab.php:979
#: src/Admin/Pages/TestTab.php:981
msgid "(Recommended) Enable PHP extension: cURL, by adding \"extension=curl\" to the php.ini file (without the quotation marks) OR"
msgstr ""
#: src/Admin/Pages/TestTab.php:980
#: src/Admin/Pages/TestTab.php:982
msgid "(If cURL can't be enabled on your hosting server) Enable PHP setting: allow_url_fopen, by adding \"allow_url_fopen = On\" to the php.ini file (without the quotation marks)"
msgstr ""
#: src/Admin/Pages/TestTab.php:981
#: src/Admin/Pages/TestTab.php:983
msgid "If you don't know how to do the above we strongly suggest contacting your hosting support and provide them the \"full Error Log for debugging\" below and these steps. They should be able to fix this issue for you."
msgstr ""
#: src/Admin/Pages/TestTab.php:1003
#: src/Admin/Pages/TestTab.php:1005
msgid "PCRE library issue"
msgstr ""
#: src/Admin/Pages/TestTab.php:1004
#: src/Admin/Pages/TestTab.php:1006
msgid "It looks like your server is running PHP version 7.4.x with an outdated PCRE library (libpcre2) that has a known issue with email address validation."
msgstr ""
#: src/Admin/Pages/TestTab.php:1005
#: src/Admin/Pages/TestTab.php:1007
msgid "There is a known issue with PHP version 7.4.x, when using libpcre2 library version lower than 10.33."
msgstr ""
#: src/Admin/Pages/TestTab.php:1008
#: src/Admin/Pages/TestTab.php:1010
msgid "Contact your web hosting provider and inform them you are having issues with libpcre2 library on PHP 7.4."
msgstr ""
#: src/Admin/Pages/TestTab.php:1009
#: src/Admin/Pages/TestTab.php:1011
msgid "They should be able to resolve this issue for you."
msgstr ""
#: src/Admin/Pages/TestTab.php:1010
#: src/Admin/Pages/TestTab.php:1012
msgid "For a quick fix, until your web hosting resolves this, you can downgrade to PHP version 7.3 on your server."
msgstr ""
#: src/Admin/Pages/TestTab.php:1046
#: src/Admin/Pages/TestTab.php:1048
msgid "An issue was detected."
msgstr ""
#: src/Admin/Pages/TestTab.php:1047
#: src/Admin/Pages/TestTab.php:1049
msgid "This means your test email was unable to be sent."
msgstr ""
#: src/Admin/Pages/TestTab.php:1049
#: src/Admin/Pages/TestTab.php:1051
msgid "Plugin settings are incorrect (wrong SMTP settings, invalid Mailer configuration, etc)."
msgstr ""
#: src/Admin/Pages/TestTab.php:1051
#: src/Admin/Pages/TestTab.php:1053
msgid "Your host is rejecting the connection."
msgstr ""
#: src/Admin/Pages/TestTab.php:1054
#: src/Admin/Pages/TestTab.php:1056
msgid "Triple check the plugin settings, consider reconfiguring to make sure everything is correct (eg bad copy and paste)."
msgstr ""
#: src/Admin/Pages/TestTab.php:1056
#: src/Admin/Pages/TestTab.php:1058
msgid "Contact your web hosting provider and ask them to verify your server can make outside connections. Additionally, ask them if a firewall or security policy may be preventing the connection - many shared hosts block certain ports.<br><strong>Note: this is the most common cause of this issue.</strong>"
msgstr ""
#: src/Admin/Pages/TestTab.php:1062
#: src/Admin/Pages/TestTab.php:1064
msgid "Try using a different mailer."
msgstr ""
#: src/Admin/Pages/TestTab.php:1081
#: src/Admin/Pages/TestTab.php:1083
msgid "There was a problem while sending the test email."
msgstr ""
#: src/Admin/Pages/TestTab.php:1091
#: src/Admin/Pages/TestTab.php:1093
msgid "Recommended next steps:"
msgstr ""
#: src/Admin/Pages/TestTab.php:1101
#: src/Admin/Pages/TestTab.php:1103
msgid "Need support?"
msgstr ""
#. translators: %s - WPMailSMTP.com account area link.
#: src/Admin/Pages/TestTab.php:1109
#: src/Admin/Pages/TestTab.php:1111
msgid "As a WP Mail SMTP Pro user you have access to WP Mail SMTP priority support. Please log in to your WPMailSMTP.com account and <a href=\"%s\" target=\"_blank\" rel=\"noopener noreferrer\">submit a support ticket</a>."
msgstr ""
#: src/Admin/Pages/TestTab.php:1126
#: src/Admin/Pages/TestTab.php:1128
msgid "WP Mail SMTP is a free plugin, and the team behind WPForms maintains it to give back to the WordPress community."
msgstr ""
#. translators: %s - WPMailSMTP.com URL.
#: src/Admin/Pages/TestTab.php:1133
#: src/Admin/Pages/TestTab.php:1135
msgid "To access our world class support, please <a href=\"%s\" target=\"_blank\" rel=\"noopener noreferrer\">upgrade to WP Mail SMTP Pro</a>. Along with getting expert support, you will also get Notification controls, Email Logging, and integrations for Amazon SES, Office 365, and Outlook.com."
msgstr ""
#: src/Admin/Pages/TestTab.php:1148
#: src/Admin/Pages/TestTab.php:1150
msgid "Additionally, you can take advantage of our White Glove Setup. Sit back and relax while we handle everything for you! If you simply don't have time or maybe you feel a bit in over your head - we got you covered."
msgstr ""
#: src/Admin/Pages/TestTab.php:1154
#: src/Admin/Pages/TestTab.php:1156
msgid "As a valued WP Mail SMTP user, you will get <span class=\"price-off\">$50 off regular pricing</span>, automatically applied at checkout!"
msgstr ""
#. translators: %1$s - WP Mail SMTP support policy URL, %2$s - WP Mail SMTP support forum URL, %3$s - WPMailSMTP.com URL.
#: src/Admin/Pages/TestTab.php:1168
#: src/Admin/Pages/TestTab.php:1170
msgid "Alternatively, we also offer <a href=\"%1$s\" target=\"_blank\" rel=\"noopener noreferrer\">limited support</a> on the WordPress.org support forums. You can <a href=\"%2$s\" target=\"_blank\" rel=\"noopener noreferrer\">create a support thread</a> there, but please understand that free support is not guaranteed and is limited to simple issues. If you have an urgent or complex issue, then please consider <a href=\"%3$s\" target=\"_blank\" rel=\"noopener noreferrer\">upgrading to WP Mail SMTP Pro</a> to access our priority support ticket system."
msgstr ""
#: src/Admin/Pages/TestTab.php:1189
#: src/Admin/Pages/TestTab.php:1191
msgid "Click here to view the full Error Log for debugging"
msgstr ""
#: src/Admin/Pages/TestTab.php:1198
#: src/Admin/Pages/TestTab.php:1200
msgid "Please copy only the content of the error debug message above, identified with an orange left border, into the support forum topic if you experience any issues."
msgstr ""
@ -1426,6 +1465,10 @@ msgstr ""
msgid "There was an error while upgrading the database. Please contact %1$s support with this information: %2$s."
msgstr ""
#: src/Pro/Emails/Logs/Admin/SinglePage.php:171
msgid "Error icon"
msgstr ""
#: src/Pro/SiteHealth.php:58
msgid "Is wpmailsmtp.com reachable?"
msgstr ""
@ -1438,22 +1481,26 @@ msgstr ""
msgid "We're sorry, the Amazon SES mailer is not available on your plan. Please upgrade to the PRO plan to unlock all these awesome features."
msgstr ""
#: src/Providers/Gmail/Auth.php:184
#: src/Providers/Gmail/Auth.php:124
msgid "Please make sure your Google Client ID and Secret in the plugin settings are valid. Save the settings and try the Authorization again."
msgstr ""
#: src/Providers/Gmail/Auth.php:192
msgid "There was an error while processing the Google authentication request. Please make sure that you have Client ID and Client Secret both valid and saved."
msgstr ""
#: src/Providers/Gmail/Mailer.php:257
#: src/Providers/Gmail/Mailer.php:137
msgid "The response object is invalid (missing getId method)."
msgstr ""
#: src/Providers/Gmail/Mailer.php:142
msgid "The email message ID is missing."
msgstr ""
#: src/Providers/Gmail/Mailer.php:269
msgid "Please re-grant Google app permissions!"
msgstr ""
#: src/Providers/Gmail/Mailer.php:258
msgid "Go to WP Mail SMTP plugin settings page. Click the “Remove Connection” button."
msgstr ""
#: src/Providers/Gmail/Mailer.php:259
msgid "Then click the “Allow plugin to send emails using your Google account” button and re-enable access."
msgstr ""
#: src/Providers/Gmail/Options.php:33
msgid "Gmail"
msgstr ""
@ -1529,15 +1576,15 @@ msgstr ""
msgid "You currently have the native WordPress option selected. Please select any other Mailer option above to continue the setup."
msgstr ""
#: src/Providers/Mailgun/Mailer.php:391
#: src/Providers/Mailgun/Mailer.php:412
msgid "Mailgun API request was successful, but it could not queue the email for delivery."
msgstr ""
#: src/Providers/Mailgun/Mailer.php:392
#: src/Providers/Mailgun/Mailer.php:413
msgid "This could point to an incorrect Domain Name in the plugin settings."
msgstr ""
#: src/Providers/Mailgun/Mailer.php:393
#: src/Providers/Mailgun/Mailer.php:414
msgid "Please check the WP Mail SMTP plugin settings and make sure the Mailgun Domain Name setting is correct."
msgstr ""
@ -1664,7 +1711,7 @@ msgid "All the defined constants will stop working and you will be able to chang
msgstr ""
#: src/Providers/OptionsAbstract.php:359
msgid "The password will be stored in plain text. For improved security, we highly recommend using your site's WordPress configuration file to set your password."
msgid "The password is encrypted in the database, but for improved security we recommend using your site's WordPress configuration file to set your password."
msgstr ""
#: src/Providers/OptionsAbstract.php:362
@ -1701,11 +1748,11 @@ msgstr ""
msgid "Pepipost SMTP"
msgstr ""
#: src/Providers/PepipostAPI/Mailer.php:339
#: src/Providers/PepipostAPI/Mailer.php:341
msgid "General error"
msgstr ""
#: src/Providers/PepipostAPI/Mailer.php:340
#: src/Providers/PepipostAPI/Mailer.php:342
msgid "Error"
msgstr ""
@ -1798,11 +1845,11 @@ msgstr ""
msgid "Use the SMTP details provided by your hosting provider or email service.<br><br>To see recommended settings for the popular services as well as troubleshooting tips, check out our <a href=\"%s\" target=\"_blank\" rel=\"noopener noreferrer\">SMTP documentation</a>."
msgstr ""
#: src/Providers/SMTPcom/Mailer.php:434
#: src/Providers/SMTPcom/Mailer.php:461
msgid "Api Key:"
msgstr ""
#: src/Providers/SMTPcom/Mailer.php:436
#: src/Providers/SMTPcom/Mailer.php:463
msgid "Channel:"
msgstr ""

View File

@ -3,7 +3,7 @@ Contributors: wpforms, jaredatch, smub, slaFFik
Tags: smtp, wp mail smtp, wordpress smtp, gmail smtp, sendgrid smtp, mailgun smtp, mail, mailer, phpmailer, wp_mail, email, mailgun, sengrid, gmail, sendinblue, wp smtp
Requires at least: 4.9
Tested up to: 5.5
Stable tag: 2.4.0
Stable tag: 2.5.0
Requires PHP: 5.5.0
Make email delivery easy for WordPress. Connect with SMTP, Gmail, Outlook, SendGrid, Mailgun, Zoho, SES, and more.
@ -218,14 +218,23 @@ By all means please contact us to discuss features or options you'd like to see
== Screenshots ==
1. WP Mail SMTP Settings page
2. Gmail / G Suite settings
3. Mailgun settings
4. SendGrid settings
5. SMTP settings
6. Send a Test Email
2. List of mailers
3. Other SMTP settings
4. Email Test page
5. Email Log settings page (Pro)
6. Email Controls settings page (Pro)
7. Email Log archive page (Pro)
8. Email Log single page (Pro)
== Changelog ==
= 2.5.0 - 2020-10-22 =
* Added: Other SMTP mailer password encryption/decryption.
* Changed: Gmail mailer suggested steps for `invalid_grant` error on the Settings > Email Test page.
* Changed: Gmail mailer redirect URI was changed to fix issues with `mod_security` or redirect blocking plugins/solutions.
* Fixed: Plugin options re-saving with unescaped magic quote characters.
* Fixed: SMTP.com mailer email delivery for certain SMTP servers if attachment's encoded string is too long.
= 2.4.0 - 2020-09-17 =
* Added: Prefix all 3rd-party libraries to avoid compatibility issues with other plugins using different versions of the same libraries.
* Changed: Sendinblue SDK library version to 6.4.

View File

@ -71,6 +71,9 @@ class Area {
// Add the options page.
add_action( 'admin_menu', [ $this, 'add_admin_options_page' ] );
// Add WPMS network-wide setting page for product education.
add_action( 'network_admin_menu', [ $this, 'add_wpms_network_wide_setting_product_education_page' ] );
// Register on load Email Log admin menu hook.
add_action( 'load-wp-mail-smtp_page_wp-mail-smtp-logs', [ $this, 'maybe_redirect_email_log_menu_to_email_log_settings_tab' ] );
@ -238,6 +241,97 @@ class Area {
}
}
/**
* Add network admin settings page for the WPMS product education.
*
* @since 2.5.0
*/
public function add_wpms_network_wide_setting_product_education_page() {
add_menu_page(
esc_html__( 'WP Mail SMTP', 'wp-mail-smtp' ),
esc_html__( 'WP Mail SMTP', 'wp-mail-smtp' ),
'manage_options',
self::SLUG,
[ $this, 'display_network_product_education_page' ],
'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9IiM5ZWEzYTgiIHdpZHRoPSI2NCIgaGVpZ2h0PSI2NCIgdmlld0JveD0iMCAwIDQzIDM0Ij48cGF0aCBkPSJNMC4wMDcsMy41ODVWMjAuNDIxcTAsMy41ODYsMy43NTEsMy41ODVMMjAsMjRWMTlIMzBWMTQuMDE0bDAuOTkxLTFMMzQsMTNWMy41ODVRMzQsMCwzMC4yNDksMEgzLjc1OFEwLjAwNywwLC4wMDcsMy41ODVoMFpNMy41MjQsNi4xNTdhMS40OSwxLjQ5LDAsMCwxLS41MDgtMC45MzUsMS41ODEsMS41ODEsMCwwLDEsLjI3NC0xLjIwOCwxLjQ0OSwxLjQ0OSwwLDAsMSwxLjA5NC0uNjYzLDEuNzU2LDEuNzU2LDAsMCwxLDEuMjUuMzEybDExLjQwOSw3LjcxNkwyOC4zNzQsMy42NjNhMS45NiwxLjk2LDAsMCwxLDEuMjg5LS4zMTIsMS41NDYsMS41NDYsMCwwLDEsMS4wOTQuNjYzLDEuNCwxLjQsMCwwLDEsLjI3MywxLjIwOCwxLjY3LDEuNjcsMCwwLDEtLjU0Ny45MzVMMTcuMDQzLDE3LjIyNVoiLz48cGF0aCBkPSJNMjIsMjhIMzJsLTAuMDA5LDQuNjI0YTEuMTI2LDEuMTI2LDAsMCwwLDEuOTIyLjhsOC4yNS04LjIzNmExLjEyNiwxLjEyNiwwLDAsMCwwLTEuNTk0bC04LjI1LTguMjQxYTEuMTI2LDEuMTI2LDAsMCwwLTEuOTIyLjh2NC44NjZMMjIsMjF2N1oiLz48L3N2Zz4=',
98
);
}
/**
* HTML output for the network admin settings page (for the WPMS product education).
*
* @since 2.5.0
*/
public function display_network_product_education_page() {
// Skip if not on multisite and not on network admin site.
if ( ! is_multisite() || ! is_network_admin() ) {
return;
}
?>
<div class="wrap" id="wp-mail-smtp">
<div class="wp-mail-smtp-page wp-mail-smtp-page-general wp-mail-smtp-page-nw-product-edu wp-mail-smtp-tab-settings">
<div class="wp-mail-smtp-page-title">
<a href="#" class="tab active">
<?php esc_html_e( 'General', 'wp-mail-smtp' ); ?>
</a>
</div>
<div class="wp-mail-smtp-page-content">
<h1 class="screen-reader-text">
<?php esc_html_e( 'General', 'wp-mail-smtp' ); ?>
</h1>
<?php do_action( 'wp_mail_smtp_admin_pages_before_content' ); ?>
<!-- Multisite Section Title -->
<div class="wp-mail-smtp-setting-row wp-mail-smtp-setting-row-content wp-mail-smtp-clear section-heading no-desc" id="wp-mail-smtp-setting-row-multisite-heading">
<div class="wp-mail-smtp-setting-field">
<h2><?php esc_html_e( 'Multisite', 'wp-mail-smtp' ); ?></h2>
<img src="<?php echo esc_url( wp_mail_smtp()->assets_url . '/images/pro-badge.svg' ); ?>" class="badge" alt="<?php esc_attr_e( 'Pro+ badge icon', 'wp-mail-smtp' ); ?>">
</div>
<p>
<?php esc_html_e( 'Simply enable network-wide settings and every site on your network will inherit the same SMTP settings. Save time and only configure your SMTP provider once.', 'wp-amil-smtp' ); ?>
</p>
</div>
<!-- Network wide setting -->
<div id="wp-mail-smtp-setting-row-multisite" class="wp-mail-smtp-setting-row wp-mail-smtp-setting-row-multisite wp-mail-smtp-clear">
<div class="wp-mail-smtp-setting-label">
<label for="wp-mail-smtp-setting-multisite-settings-control"><?php esc_html_e( 'Settings control', 'wp-mail-smtp' ); ?></label>
</div>
<div class="wp-mail-smtp-setting-field">
<input name="wp-mail-smtp[general][nw_product_edu]" type="checkbox" value="true" id="wp-mail-smtp-setting-nw-product-edu" disabled>
<label for="wp-mail-smtp-setting-nw-product-edu">
<?php esc_html_e( 'Make the plugin settings global network-wide', 'wp-mail-smtp' ); ?>
</label>
<p class="desc">
<?php esc_html_e( 'If disabled, each subsite of this multisite will have its own WP Mail SMTP settings page that has to be configured separately.', 'wp-mail-smtp' ); ?>
<br>
<?php esc_html_e( 'If enabled, these global settings will manage email sending for all subsites of this multisite.', 'wp-mail-smtp' ); ?>
</p>
</div>
</div>
<div class="wp-mail-smtp-setting-row-no-setting">
<a href="<?php echo esc_url( wp_mail_smtp()->get_upgrade_link( [ 'medium' => 'network-settings', 'content' => '' ] ) ); // phpcs:ignore ?>" target="_blank" rel="noopener noreferrer" class="wp-mail-smtp-btn wp-mail-smtp-btn-lg wp-mail-smtp-btn-orange">
<?php esc_html_e( 'Upgrade to WP Mail SMTP Pro', 'wp-mail-smtp' ); ?>
</a>
</div>
</div>
</div>
</div>
<?php
}
/**
* Redirect the "Email Log" WP menu link to the "Email Log" setting tab for lite version of the plugin.
*

View File

@ -248,10 +248,8 @@ class MiscTab extends PageAbstract {
$data['general'][ UsageTracking::SETTINGS_SLUG ] = false;
}
$to_save = Options::array_merge_recursive( $options->get_all(), $data );
// All the sanitization is done there.
$options->set( $to_save );
$options->set( $data, false, false );
WP::add_admin_notice(
esc_html__( 'Settings were successfully saved.', 'wp-mail-smtp' ),

View File

@ -549,13 +549,23 @@ class SettingsTab extends PageAbstract {
$data['smtp']['auth'] = false;
}
// Remove all debug messages when switching mailers.
// When switching mailers.
if (
! empty( $old_opt['mail']['mailer'] ) &&
! empty( $data['mail']['mailer'] ) &&
$old_opt['mail']['mailer'] !== $data['mail']['mailer']
) {
// Remove all debug messages when switching mailers.
Debug::clear();
// Save correct from email address if Zoho or Outlook mailers are already configured.
if (
in_array( $data['mail']['mailer'], [ 'zoho', 'outlook' ], true ) &&
! empty( $old_opt[ $data['mail']['mailer'] ]['user_details']['email'] )
) {
$data['mail']['from_email'] = $old_opt[ $data['mail']['mailer'] ]['user_details']['email'];
}
}
$to_redirect = false;
@ -582,11 +592,8 @@ class SettingsTab extends PageAbstract {
$data = apply_filters( 'wp_mail_smtp_settings_tab_process_post', $data );
// New gmail clients data will be added from new $data.
$to_save = Options::array_merge_recursive( $old_opt, $data );
// All the sanitization is done in Options class.
$options->set( $to_save );
$options->set( $data, false, false );
if ( $to_redirect ) {
wp_redirect( $_POST['_wp_http_referer'] . '#wp-mail-smtp-setting-row-gmail-authorize' );

View File

@ -824,11 +824,9 @@ Lead Developer, WP Mail SMTP';
'description' => [
'<strong>' . esc_html__( 'Google API Error.', 'wp-mail-smtp' ) . '</strong>',
esc_html__( 'Unfortunately, this error can be due to many different reasons.', 'wp-mail-smtp' ),
],
'steps' => [
sprintf(
wp_kses( /* translators: %s - Blog article URL. */
__( 'Please <a href="%s" target="_blank" rel="noopener noreferrer">read this article</a> to learn more about what can cause this error and how it can be resolved.', 'wp-mail-smtp' ),
__( 'Please <a href="%s" target="_blank" rel="noopener noreferrer">read this article</a> to learn more about what can cause this error and follow the steps below.', 'wp-mail-smtp' ),
[
'a' => [
'href' => [],
@ -840,6 +838,10 @@ Lead Developer, WP Mail SMTP';
'https://blog.timekit.io/google-oauth-invalid-grant-nightmare-and-how-to-fix-it-9f4efaf1da35'
),
],
'steps' => [
esc_html__( 'Go to WP Mail SMTP plugin settings page. Click the “Remove Connection” button.', 'wp-mail-smtp' ),
esc_html__( 'Then click the “Allow plugin to send emails using your Google account” button and re-enable access.', 'wp-mail-smtp' ),
],
],
// [gmail] - Code was already redeemed.
[

View File

@ -0,0 +1,162 @@
<?php
namespace WPMailSMTP\Helpers;
// WP 5.2+ already load Sodium Compat polyfill for libsodium-fallback.
// We need to do the same for under 5.2 versions (4.9-5.1).
if ( ! version_compare( get_bloginfo( 'version' ), '5.2', '>=' ) && ! function_exists( 'sodium_crypto_box' ) ) {
require_once dirname( WPMS_PLUGIN_FILE ) . '/vendor/paragonie/sodium_compat/autoload.php';
}
/**
* Class for encryption functionality.
*
* @since 2.5.0
*
* @link https://www.php.net/manual/en/intro.sodium.php
*/
class Crypto {
/**
* Get a secret key for encrypt/decrypt.
*
* @since 2.5.0
*
* @param bool $create Should the key be created, if it does not exist yet.
*
* @return string|bool
*/
public static function get_secret_key( $create = false ) {
if ( defined( 'WPMS_CRYPTO_KEY' ) ) {
return WPMS_CRYPTO_KEY;
}
$secret_key = get_option( 'wp_mail_smtp_mail_key' );
// If we already have the secret, send it back.
if ( false !== $secret_key ) {
return base64_decode( $secret_key ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_decode
}
if ( $create ) {
// We don't have a secret, so let's generate one.
try {
$secret_key = sodium_crypto_secretbox_keygen(); // phpcs:ignore
} catch ( \Exception $e ) {
$secret_key = wp_generate_password( SODIUM_CRYPTO_SECRETBOX_KEYBYTES ); // phpcs:ignore
}
add_option( 'wp_mail_smtp_mail_key', base64_encode( $secret_key ) ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode
return $secret_key;
}
return false;
}
/**
* Encrypt a message.
*
* @since 2.5.0
*
* @param string $message Message to encrypt.
* @param string $key Encryption key.
*
* @return string
* @throws \Exception The exception object.
*/
public static function encrypt( $message, $key = '' ) {
if ( apply_filters( 'wp_mail_smtp_helpers_crypto_stop', false ) ) {
return $message;
}
// Create a nonce for this operation. It will be stored and recovered in the message itself.
$nonce = random_bytes( SODIUM_CRYPTO_SECRETBOX_NONCEBYTES ); // phpcs:ignore
if ( empty( $key ) ) {
$key = self::get_secret_key( true );
}
// Encrypt message and combine with nonce.
$cipher = base64_encode( // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_encode
$nonce .
sodium_crypto_secretbox( // phpcs:ignore
$message,
$nonce,
$key
)
);
try {
sodium_memzero( $message ); // phpcs:ignore
sodium_memzero( $key ); // phpcs:ignore
} catch ( \Exception $e ) {
return $cipher;
}
return $cipher;
}
/**
* Decrypt a message.
* Returns encrypted message on any failure and the decrypted message on success.
*
* @since 2.5.0
*
* @param string $encrypted Encrypted message.
* @param string $key Encryption key.
*
* @return string
* @throws \Exception The exception object.
*/
public static function decrypt( $encrypted, $key = '' ) {
if ( apply_filters( 'wp_mail_smtp_helpers_crypto_stop', false ) ) {
return $encrypted;
}
// Unpack base64 message.
$decoded = base64_decode( $encrypted ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_decode
if ( false === $decoded ) {
return $encrypted;
}
if ( mb_strlen( $decoded, '8bit' ) < ( SODIUM_CRYPTO_SECRETBOX_NONCEBYTES + SODIUM_CRYPTO_SECRETBOX_MACBYTES ) ) { // phpcs:ignore
return $encrypted;
}
// Pull nonce and ciphertext out of unpacked message.
$nonce = mb_substr( $decoded, 0, SODIUM_CRYPTO_SECRETBOX_NONCEBYTES, '8bit' ); // phpcs:ignore
$ciphertext = mb_substr( $decoded, SODIUM_CRYPTO_SECRETBOX_NONCEBYTES, null, '8bit' ); // phpcs:ignore
$key = empty( $key ) ? self::get_secret_key() : $key;
if ( empty( $key ) ) {
return $encrypted;
}
// Decrypt it.
$message = sodium_crypto_secretbox_open( // phpcs:ignore
$ciphertext,
$nonce,
$key
);
// Check for decryption failures.
if ( false === $message ) {
return $encrypted;
}
try {
sodium_memzero( $ciphertext ); // phpcs:ignore
sodium_memzero( $key ); // phpcs:ignore
} catch ( \Exception $e ) {
return $message;
}
return $message;
}
}

View File

@ -315,7 +315,7 @@ class Migration {
$converted['mail']['return_path'] = ( $old_value === 'true' );
break;
case 'mailer':
$converted['mail']['mailer'] = $old_value;
$converted['mail']['mailer'] = ! empty( $old_value ) ? $old_value : 'mail';
break;
case 'wp_mail_smtp_am_notifications_hidden':
$converted['general']['am_notifications_hidden'] = ( isset( $old_value ) && $old_value === 'true' );

View File

@ -2,6 +2,7 @@
namespace WPMailSMTP;
use WPMailSMTP\Helpers\Crypto;
use WPMailSMTP\UsageTracking\UsageTracking;
/**
@ -244,13 +245,15 @@ class Options {
* Options::init()->get( 'smtp', 'host' ) - will return only SMTP 'host' option.
*
* @since 1.0.0
* @since 2.5.0 Added $strip_slashes method parameter.
*
* @param string $group
* @param string $key
* @param string $group The option group.
* @param string $key The option key.
* @param bool $strip_slashes If the slashes should be stripped from string values.
*
* @return mixed|null Null if value doesn't exist anywhere: in constants, in DB, in a map. So it's completely custom or a typo.
*/
public function get( $group, $key ) {
public function get( $group, $key, $strip_slashes = true ) {
// Just to feel safe.
$group = sanitize_key( $group );
@ -266,7 +269,7 @@ class Options {
if ( isset( $this->_options[ $group ] ) ) {
// Get the options key of a group.
if ( isset( $this->_options[ $group ][ $key ] ) ) {
$value = $this->_options[ $group ][ $key ];
$value = $this->get_existing_option_value( $group, $key );
} else {
$value = $this->postprocess_key_defaults( $group, $key );
}
@ -284,14 +287,37 @@ class Options {
}
}
// Strip slashes only from values saved in DB. Constants should be processed as is.
if ( is_string( $value ) && ! $this->is_const_defined( $group, $key ) ) {
// Conditionally strip slashes only from values saved in DB. Constants should be processed as is.
if ( $strip_slashes && is_string( $value ) && ! $this->is_const_defined( $group, $key ) ) {
$value = stripslashes( $value );
}
return apply_filters( 'wp_mail_smtp_options_get', $value, $group, $key );
}
/**
* Get the existing cached option value.
*
* @since 2.5.0
*
* @param string $group The options group.
* @param string $key The options key.
*
* @return mixed
*/
private function get_existing_option_value( $group, $key ) {
if ( $group === 'smtp' && $key === 'pass' ) {
try {
return Crypto::decrypt( $this->_options[ $group ][ $key ] );
} catch ( \Exception $e ) {
return $this->_options[ $group ][ $key ];
}
}
return $this->_options[ $group ][ $key ];
}
/**
* Some options may be non-empty by default,
* so we need to postprocess them to convert.
@ -823,14 +849,47 @@ class Options {
* @since 1.3.0 Added $once argument to save options only if they don't exist already.
* @since 1.4.0 Added Mailgun:region.
* @since 1.5.0 Added Outlook/AmazonSES, Email Log. Stop saving const values into DB.
* @since 2.5.0 Added $overwrite_existing method parameter.
*
* @param array $options Plugin options to save.
* @param bool $once Whether to update existing options or to add these options only once.
* @param bool $overwrite_existing Whether to overwrite existing settings or merge these passed options with existing ones.
*/
public function set( $options, $once = false ) {
/*
* Process generic options.
public function set( $options, $once = false, $overwrite_existing = true ) {
// Merge existing settings with new values.
if ( ! $overwrite_existing ) {
$options = self::array_merge_recursive( $this->get_all_raw(), $options );
}
$options = $this->process_generic_options( $options );
$options = $this->process_mailer_specific_options( $options );
$options = apply_filters( 'wp_mail_smtp_options_set', $options );
// Whether to update existing options or to add these options only once if they don't exist yet.
if ( $once ) {
add_option( self::META_KEY, $options, '', 'no' ); // Do not autoload these options.
} else {
update_option( self::META_KEY, $options, 'no' );
}
// Now we need to re-cache values.
$this->populate_options();
do_action( 'wp_mail_smtp_options_set_after', $options );
}
/**
* Process the generic plugin options.
*
* @since 2.5.0
*
* @param array $options The options array.
*
* @return array
*/
private function process_generic_options( $options ) { // phpcs:ignore
foreach ( (array) $options as $group => $keys ) {
foreach ( $keys as $option_name => $option_value ) {
switch ( $group ) {
@ -871,9 +930,20 @@ class Options {
}
}
/*
* Process mailers-specific options.
return $options;
}
/**
* Process mailers-specific plugin options.
*
* @since 2.5.0
*
* @param array $options The options array.
*
* @return array
*/
private function process_mailer_specific_options( $options ) { // phpcs:ignore
if (
! empty( $options['mail']['mailer'] ) &&
isset( $options[ $options['mail']['mailer'] ] ) &&
@ -902,7 +972,14 @@ class Options {
case 'pass': // smtp.
// Do not process as they may contain certain special characters, but allow to be overwritten using constants.
$options[ $mailer ][ $option_name ] = $this->is_const_defined( $mailer, $option_name ) ? '' : trim( (string) $option_value );
$option_value = trim( (string) $option_value );
$options[ $mailer ][ $option_name ] = $this->is_const_defined( $mailer, $option_name ) ? '' : $option_value;
if ( $mailer === 'smtp' && ! $this->is_const_defined( 'smtp', 'pass' ) ) {
try {
$options[ $mailer ][ $option_name ] = Crypto::encrypt( $option_value );
} catch ( \Exception $e ) {} // phpcs:ignore
}
break;
case 'api_key': // mailgun/sendgrid/sendinblue/pepipostapi/smtpcom.
@ -923,19 +1000,7 @@ class Options {
}
}
$options = apply_filters( 'wp_mail_smtp_options_set', $options );
// Whether to update existing options or to add these options only once if they don't exist yet.
if ( $once ) {
add_option( self::META_KEY, $options, '', 'no' ); // Do not autoload these options.
} else {
update_option( self::META_KEY, $options, 'no' );
}
// Now we need to re-cache values.
$this->populate_options();
do_action( 'wp_mail_smtp_options_set_after', $options );
return $options;
}
/**
@ -1036,4 +1101,24 @@ class Options {
public function is_mailer_smtp() {
return apply_filters( 'wp_mail_smtp_options_is_mailer_smtp', in_array( $this->get( 'mail', 'mailer' ), array( 'pepipost', 'smtp' ), true ) );
}
/**
* Get all the options, but without stripping the slashes.
*
* @since 2.5.0
*
* @return array
*/
public function get_all_raw() {
$options = $this->_options;
foreach ( $options as $group => $g_value ) {
foreach ( $g_value as $key => $value ) {
$options[ $group ][ $key ] = $this->get( $group, $key, false );
}
}
return $options;
}
}

View File

@ -77,15 +77,18 @@ abstract class AuthAbstract implements AuthInterface {
protected function update_auth_code( $code ) {
$options = new PluginOptions();
$all = $options->get_all();
// To save in DB.
$all[ $this->mailer_slug ]['auth_code'] = $code;
$updated_settings = [
$this->mailer_slug => [
'auth_code' => $code,
],
];
// To save in currently retrieved options array.
$this->options['auth_code'] = $code;
$options->set( $all );
$options->set( $updated_settings, false, false );
}
/**
@ -98,15 +101,18 @@ abstract class AuthAbstract implements AuthInterface {
protected function update_access_token( $token ) {
$options = new PluginOptions();
$all = $options->get_all();
// To save in DB.
$all[ $this->mailer_slug ]['access_token'] = $token;
$updated_settings = [
$this->mailer_slug => [
'access_token' => $token,
],
];
// To save in currently retrieved options array.
$this->options['access_token'] = $token;
$options->set( $all );
$options->set( $updated_settings, false, false );
}
/**
@ -119,15 +125,18 @@ abstract class AuthAbstract implements AuthInterface {
protected function update_refresh_token( $token ) {
$options = new PluginOptions();
$all = $options->get_all();
// To save in DB.
$all[ $this->mailer_slug ]['refresh_token'] = $token;
$updated_settings = [
$this->mailer_slug => [
'refresh_token' => $token,
],
];
// To save in currently retrieved options array.
$this->options['refresh_token'] = $token;
$options->set( $all );
$options->set( $updated_settings, false, false );
}
/**

View File

@ -92,7 +92,7 @@ class Auth extends AuthAbstract {
'client_id' => $this->options['client_id'],
'client_secret' => $this->options['client_secret'],
'redirect_uris' => array(
self::get_plugin_auth_url(),
self::get_oauth_redirect_url(),
),
)
);
@ -102,7 +102,8 @@ class Auth extends AuthAbstract {
$client->setIncludeGrantedScopes( true );
// We request only the sending capability, as it's what we only need to do.
$client->setScopes( array( Google_Service_Gmail::MAIL_GOOGLE_COM ) );
$client->setRedirectUri( self::get_plugin_auth_url() );
$client->setRedirectUri( self::get_oauth_redirect_url() );
$client->setState( self::get_plugin_auth_url() );
// Apply custom options to the client.
$client = apply_filters( 'wp_mail_smtp_providers_gmail_auth_get_client_custom_options', $client );
@ -115,15 +116,22 @@ class Auth extends AuthAbstract {
$creds = $client->fetchAccessTokenWithAuthCode( $this->options['auth_code'] );
} catch ( \Exception $e ) {
$creds['error'] = $e->getMessage();
Debug::set(
'Mailer: Gmail' . "\r\n" .
$creds['error']
);
}
// Bail if we have an error.
if ( ! empty( $creds['error'] ) ) {
if ( $creds['error'] === 'invalid_client' ) {
$creds['error'] .= PHP_EOL . esc_html__( 'Please make sure your Google Client ID and Secret in the plugin settings are valid. Save the settings and try the Authorization again.' , 'wp-mail-smtp' );
}
Debug::set(
'Mailer: Gmail' . "\r\n" .
$creds['error']
);
return $client;
} else {
Debug::clear();
}
$this->update_access_token( $client->getAccessToken() );
@ -173,7 +181,7 @@ class Auth extends AuthAbstract {
*/
public function process() {
if ( ! ( isset( $_GET['tab'] ) && $_GET['tab'] === 'auth' ) ) {
if ( ! ( isset( $_GET['tab'] ) && $_GET['tab'] === 'auth' ) ) { // phpcs:ignore
wp_safe_redirect( wp_mail_smtp()->get_admin()->get_admin_page_url() );
exit;
}
@ -199,8 +207,8 @@ class Auth extends AuthAbstract {
$scope = '';
$error = '';
if ( isset( $_GET['error'] ) ) {
$error = sanitize_key( $_GET['error'] );
if ( isset( $_GET['error'] ) ) { // phpcs:ignore
$error = sanitize_key( $_GET['error'] ); // phpcs:ignore
}
// In case of any error: display a message to a user.
@ -215,11 +223,11 @@ class Auth extends AuthAbstract {
exit;
}
if ( isset( $_GET['code'] ) ) {
$code = $_GET['code'];
if ( isset( $_GET['code'] ) ) { // phpcs:ignore
$code = urldecode( $_GET['code'] ); // phpcs:ignore
}
if ( isset( $_GET['scope'] ) ) {
$scope = urldecode( $_GET['scope'] );
if ( isset( $_GET['scope'] ) ) { // phpcs:ignore
$scope = urldecode( base64_decode( $_GET['scope'] ) ); // phpcs:ignore
}
// Let's try to get the access token.
@ -328,4 +336,19 @@ class Auth extends AuthAbstract {
return $this->aliases;
}
/**
* Get the Google oAuth 2.0 redirect URL.
*
* This is the URL that Google will redirect after the access to the Gmail account is granted or rejected.
* The below endpoint will then redirect back to the user's WP site (to self::get_plugin_auth_url() URL).
*
* @since 2.5.0
*
* @return string
*/
public static function get_oauth_redirect_url() {
return 'https://connect.wpmailsmtp.com/google/';
}
}

View File

@ -110,6 +110,8 @@ class Mailer extends MailerAbstract {
$this->process_response( $response );
} catch ( \Exception $e ) {
$this->error_message = $e->getMessage();
Debug::set(
'Mailer: Gmail' . "\r\n" .
$this->process_exception_message( $e->getMessage() )
@ -131,6 +133,16 @@ class Mailer extends MailerAbstract {
$this->response = $response;
if ( ! method_exists( $this->response, 'getId' ) ) {
$this->error_message = esc_html__( 'The response object is invalid (missing getId method).', 'wp-mail-smtp' );
} else {
$message_id = $this->response->getId();
if ( empty( $message_id ) ) {
$this->error_message = esc_html__( 'The email message ID is missing.', 'wp-mail-smtp' );
}
}
do_action( 'wp_mail_smtp_providers_gmail_mailer_process_response', $this->response, $this->phpmailer );
}

View File

@ -118,7 +118,7 @@ class Options extends OptionsAbstract {
</div>
<div class="wp-mail-smtp-setting-field">
<input type="text" readonly="readonly" onfocus="this.select();"
value="<?php echo esc_attr( Auth::get_plugin_auth_url() ); ?>"
value="<?php echo esc_attr( Auth::get_oauth_redirect_url() ); ?>"
id="wp-mail-smtp-setting-<?php echo esc_attr( $this->get_slug() ); ?>-client_redirect"
/>
<button type="button" class="wp-mail-smtp-btn wp-mail-smtp-btn-md wp-mail-smtp-btn-light-grey wp-mail-smtp-setting-copy"
@ -245,7 +245,7 @@ class Options extends OptionsAbstract {
return;
}
$old_opt = $options->get_all();
$old_opt = $options->get_all_raw();
foreach ( $old_opt[ $this->get_slug() ] as $key => $value ) {
// Unset everything except Client ID and Secret.

View File

@ -23,18 +23,21 @@ abstract class MailerAbstract implements MailerInterface {
* @var int
*/
protected $email_sent_code = 200;
/**
* @since 1.0.0
*
* @var Options
*/
protected $options;
/**
* @since 1.0.0
*
* @var MailCatcherInterface
*/
protected $phpmailer;
/**
* @since 1.0.0
*
@ -50,18 +53,21 @@ abstract class MailerAbstract implements MailerInterface {
* @var string
*/
protected $url = '';
/**
* @since 1.0.0
*
* @var array
*/
protected $headers = array();
/**
* @since 1.0.0
*
* @var array
*/
protected $body = array();
/**
* @since 1.0.0
*
@ -69,6 +75,24 @@ abstract class MailerAbstract implements MailerInterface {
*/
protected $response = array();
/**
* The error message recorded when email sending failed and the error can't be processed from the API response.
*
* @since 2.5.0
*
* @var string
*/
protected $error_message = '';
/**
* Should the email sent by this mailer have its "sent status" verified via its API?
*
* @since 2.5.0
*
* @var bool
*/
protected $verify_sent_status = false;
/**
* Mailer constructor.
*
@ -269,7 +293,7 @@ abstract class MailerAbstract implements MailerInterface {
// Save the error text.
$errors = $response->get_error_messages();
foreach ( $errors as $error ) {
Debug::set( $error );
$this->error_message .= $error . PHP_EOL;
}
return;
@ -342,15 +366,17 @@ abstract class MailerAbstract implements MailerInterface {
}
/**
* The error message when email sending failed.
* Should be overwritten when appropriate.
*
* @since 1.2.0
* @since 2.5.0 Return a non-empty error_message attribute.
*
* @return string
*/
protected function get_response_error() {
public function get_response_error() {
return '';
return ! empty( $this->error_message ) ? $this->error_message : '';
}
/**
@ -461,4 +487,45 @@ abstract class MailerAbstract implements MailerInterface {
],
];
}
/**
* Should the email sent by this mailer have its "sent status" verified via its API?
*
* @since 2.5.0
*
* @return bool
*/
public function should_verify_sent_status() {
return $this->verify_sent_status;
}
/**
* Verify the "sent status" of the provided email log ID.
* The actual verification background task is triggered in the below action hook.
*
* @since 2.5.0
*
* @param int $email_log_id The ID of the email log.
*/
public function verify_sent_status( $email_log_id ) {
if ( ! $this->should_verify_sent_status() ) {
return;
}
do_action( 'wp_mail_smtp_providers_mailer_verify_sent_status', $email_log_id, $this );
}
/**
* Get the name/slug of the current mailer.
*
* @since 2.5.0
*
* @return string
*/
public function get_mailer_name() {
return $this->mailer;
}
}

View File

@ -366,6 +366,27 @@ class Mailer extends MailerAbstract {
);
}
/**
* We might need to do something after the email was sent to the API.
* In this method we preprocess the response from the API.
*
* @since 2.5.0
*
* @param mixed $response Response data.
*/
protected function process_response( $response ) {
parent::process_response( $response );
if (
! is_wp_error( $response ) &&
! empty( $this->response['body']->id )
) {
$this->phpmailer->MessageID = $this->response['body']->id;
$this->verify_sent_status = true;
}
}
/**
* Whether the email is sent or not.
* We basically check the response code from a request to provider.
@ -392,6 +413,8 @@ class Mailer extends MailerAbstract {
esc_html__( 'This could point to an incorrect Domain Name in the plugin settings.', 'wp-mail-smtp' ) . PHP_EOL .
esc_html__( 'Please check the WP Mail SMTP plugin settings and make sure the Mailgun Domain Name setting is correct.', 'wp-mail-smtp' );
$this->error_message = $message;
Debug::set( $message );
return false;
@ -407,7 +430,7 @@ class Mailer extends MailerAbstract {
*
* @return string
*/
protected function get_response_error() {
public function get_response_error() {
$body = (array) wp_remote_retrieve_body( $this->response );
@ -419,6 +442,8 @@ class Mailer extends MailerAbstract {
} else {
$error_text[] = \json_encode( $body['message'] );
}
} elseif ( ! empty( $this->error_message ) ) {
$error_text[] = $this->error_message;
} elseif ( ! empty( $body[0] ) ) {
if ( is_string( $body[0] ) ) {
$error_text[] = $body[0];

View File

@ -356,7 +356,7 @@ abstract class OptionsAbstract implements OptionsInterface {
id="wp-mail-smtp-setting-<?php echo esc_attr( $this->get_slug() ); ?>-pass" spellcheck="false" autocomplete="new-password"
/>
<p class="desc">
<?php esc_html_e( 'The password will be stored in plain text. For improved security, we highly recommend using your site\'s WordPress configuration file to set your password.', 'wp-mail-smtp' ); ?>
<?php esc_html_e( 'The password is encrypted in the database, but for improved security we recommend using your site\'s WordPress configuration file to set your password.', 'wp-mail-smtp' ); ?>
<br>
<a href="https://wpmailsmtp.com/docs/how-to-secure-smtp-settings-by-using-constants/" target="_blank" rel="noopener noreferrer">
<strong><?php esc_html_e( 'Learn More', 'wp-mail-smtp' ); ?></strong>

View File

@ -320,7 +320,7 @@ class Mailer extends MailerAbstract {
*
* @return string
*/
protected function get_response_error() {
public function get_response_error() {
$body = (array) wp_remote_retrieve_body( $this->response );
@ -328,7 +328,9 @@ class Mailer extends MailerAbstract {
$info = ! empty( $body['info'] ) ? $body['info'] : '';
$message = '';
if ( is_string( $error ) ) {
if ( ! empty( $this->error_message ) ) {
$message = $this->error_message;
} elseif ( is_string( $error ) ) {
$message = $error . ( ( ! empty( $info ) ) ? ' - ' . $info : '' );
} elseif ( is_array( $error ) ) {
$message = '';

View File

@ -307,7 +307,7 @@ class Mailer extends MailerAbstract {
$filetype = str_replace( ';', '', trim( $attachment[4] ) );
$data[] = array(
'content' => base64_encode( $file ),
'content' => chunk_split( base64_encode( $file ) ), // phpcs:ignore
'type' => $filetype,
'encoding' => 'base64',
'filename' => empty( $attachment[2] ) ? 'file-' . wp_hash( microtime() ) . '.' . $filetype : trim( $attachment[2] ),
@ -388,6 +388,31 @@ class Mailer extends MailerAbstract {
*/
public function set_return_path( $from_email ) {}
/**
* We might need to do something after the email was sent to the API.
* In this method we preprocess the response from the API.
*
* @since 2.5.0
*
* @param mixed $response Response data.
*/
protected function process_response( $response ) {
parent::process_response( $response );
if (
! is_wp_error( $response ) &&
! empty( $this->response['body']->data->message )
) {
preg_match( '/msg_id: (.*)/', $this->response['body']->data->message, $output );
if ( ! empty( $output[1] ) ) {
$this->phpmailer->addCustomHeader( 'X-Msg-ID', $output[1] );
$this->verify_sent_status = true;
}
}
}
/**
* Get a SMTP.com-specific response with a helpful error.
*
@ -405,7 +430,7 @@ class Mailer extends MailerAbstract {
*
* @return string
*/
protected function get_response_error() {
public function get_response_error() {
$body = (array) wp_remote_retrieve_body( $this->response );
@ -415,6 +440,8 @@ class Mailer extends MailerAbstract {
foreach ( (array) $body['data'] as $error_key => $error_message ) {
$error_text[] = $error_key . ' - ' . $error_message;
}
} elseif ( ! empty( $this->error_message ) ) {
$error_text[] = $this->error_message;
}
return implode( PHP_EOL, array_map( 'esc_textarea', $error_text ) );

View File

@ -352,7 +352,7 @@ class Mailer extends MailerAbstract {
*
* @return string
*/
protected function get_response_error() {
public function get_response_error() { // phpcs:ignore
$body = (array) wp_remote_retrieve_body( $this->response );
@ -374,6 +374,8 @@ class Mailer extends MailerAbstract {
$error_text[] = $error->message . ( ! empty( $extra ) ? ' - ' . $extra : '' );
}
}
} elseif ( ! empty( $this->error_message ) ) {
$error_text[] = $this->error_message;
}
return implode( '<br>', array_map( 'esc_textarea', $error_text ) );

View File

@ -318,8 +318,12 @@ class Mailer extends MailerAbstract {
$message = $e->getMessage();
}
$this->error_message = $message;
Debug::set( 'Mailer: Sendinblue' . PHP_EOL . $message );
} catch ( \Exception $e ) {
$this->error_message = $e->getMessage();
Debug::set( 'Mailer: Sendinblue' . PHP_EOL . $e->getMessage() );
return;
@ -338,6 +342,14 @@ class Mailer extends MailerAbstract {
protected function process_response( $response ) {
$this->response = $response;
if (
is_a( $response, 'WPMailSMTP\Vendor\SendinBlue\Client\Model\CreateSmtpEmail' ) &&
method_exists( $response, 'getMessageId' )
) {
$this->phpmailer->MessageID = $response->getMessageId();
$this->verify_sent_status = true;
}
}
/**

View File

@ -61,11 +61,13 @@ class Upgrade {
*/
public function v110_upgrade() {
$values = Options::init()->get_all();
// Enable SMTPAutoTLS option.
$values['smtp']['autotls'] = true;
$values = [
'smtp' => [
'autotls' => true,
],
];
Options::init()->set( $values );
Options::init()->set( $values, false, false );
}
}

View File

@ -22,11 +22,16 @@ class SendUsageTask extends Task {
* Server URL to send requests to.
*
* @since 2.3.0
*
* @var string
*/
const TRACK_URL = 'https://wpmailsmtpusage.com/v1/smtptrack';
/**
* Option name to store the timestamp of the last run.
*
* @since 2.5.0
*/
const LAST_RUN = 'wp_mail_smtp_send_usage_last_run';
/**
* Class constructor.
*
@ -72,6 +77,7 @@ class SendUsageTask extends Task {
private function generate_start_date() {
$tracking = [];
$tracking['days'] = wp_rand( 0, 6 ) * DAY_IN_SECONDS;
$tracking['hours'] = wp_rand( 0, 23 ) * HOUR_IN_SECONDS;
$tracking['minutes'] = wp_rand( 0, 59 ) * MINUTE_IN_SECONDS;
@ -88,6 +94,17 @@ class SendUsageTask extends Task {
*/
public function process() {
$last_run = get_option( self::LAST_RUN );
// Make sure we do not run it more than once a day.
if (
$last_run !== false &&
( time() - $last_run ) < DAY_IN_SECONDS
) {
return;
}
// Send data to the usage tracking API.
$ut = new UsageTracking();
wp_remote_post(
@ -101,5 +118,8 @@ class SendUsageTask extends Task {
'user-agent' => $ut->get_user_agent(),
]
);
// Update the last run option to the current timestamp.
update_option( self::LAST_RUN, time() );
}
}

View File

@ -4,4 +4,4 @@
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit4505233c9771255f4bcd3288908993ad::getLoader();
return ComposerAutoloaderInit982434b9fa67b618e1fee7385b7ec239::getLoader();

View File

@ -153,8 +153,11 @@ return array(
'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\AggregateException' => $baseDir . '/vendor_prefixed/guzzlehttp/promises/src/AggregateException.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\CancellationException' => $baseDir . '/vendor_prefixed/guzzlehttp/promises/src/CancellationException.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\Coroutine' => $baseDir . '/vendor_prefixed/guzzlehttp/promises/src/Coroutine.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\Create' => $baseDir . '/vendor_prefixed/guzzlehttp/promises/src/Create.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\Each' => $baseDir . '/vendor_prefixed/guzzlehttp/promises/src/Each.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\EachPromise' => $baseDir . '/vendor_prefixed/guzzlehttp/promises/src/EachPromise.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\FulfilledPromise' => $baseDir . '/vendor_prefixed/guzzlehttp/promises/src/FulfilledPromise.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\Is' => $baseDir . '/vendor_prefixed/guzzlehttp/promises/src/Is.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\Promise' => $baseDir . '/vendor_prefixed/guzzlehttp/promises/src/Promise.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\PromiseInterface' => $baseDir . '/vendor_prefixed/guzzlehttp/promises/src/PromiseInterface.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\PromisorInterface' => $baseDir . '/vendor_prefixed/guzzlehttp/promises/src/PromisorInterface.php',
@ -162,18 +165,23 @@ return array(
'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\RejectionException' => $baseDir . '/vendor_prefixed/guzzlehttp/promises/src/RejectionException.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\TaskQueue' => $baseDir . '/vendor_prefixed/guzzlehttp/promises/src/TaskQueue.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\TaskQueueInterface' => $baseDir . '/vendor_prefixed/guzzlehttp/promises/src/TaskQueueInterface.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\Utils' => $baseDir . '/vendor_prefixed/guzzlehttp/promises/src/Utils.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\AppendStream' => $baseDir . '/vendor_prefixed/guzzlehttp/psr7/src/AppendStream.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\BufferStream' => $baseDir . '/vendor_prefixed/guzzlehttp/psr7/src/BufferStream.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\CachingStream' => $baseDir . '/vendor_prefixed/guzzlehttp/psr7/src/CachingStream.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\DroppingStream' => $baseDir . '/vendor_prefixed/guzzlehttp/psr7/src/DroppingStream.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\FnStream' => $baseDir . '/vendor_prefixed/guzzlehttp/psr7/src/FnStream.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\Header' => $baseDir . '/vendor_prefixed/guzzlehttp/psr7/src/Header.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\InflateStream' => $baseDir . '/vendor_prefixed/guzzlehttp/psr7/src/InflateStream.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\LazyOpenStream' => $baseDir . '/vendor_prefixed/guzzlehttp/psr7/src/LazyOpenStream.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\LimitStream' => $baseDir . '/vendor_prefixed/guzzlehttp/psr7/src/LimitStream.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\Message' => $baseDir . '/vendor_prefixed/guzzlehttp/psr7/src/Message.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\MessageTrait' => $baseDir . '/vendor_prefixed/guzzlehttp/psr7/src/MessageTrait.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\MimeType' => $baseDir . '/vendor_prefixed/guzzlehttp/psr7/src/MimeType.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\MultipartStream' => $baseDir . '/vendor_prefixed/guzzlehttp/psr7/src/MultipartStream.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\NoSeekStream' => $baseDir . '/vendor_prefixed/guzzlehttp/psr7/src/NoSeekStream.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\PumpStream' => $baseDir . '/vendor_prefixed/guzzlehttp/psr7/src/PumpStream.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\Query' => $baseDir . '/vendor_prefixed/guzzlehttp/psr7/src/Query.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\Request' => $baseDir . '/vendor_prefixed/guzzlehttp/psr7/src/Request.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\Response' => $baseDir . '/vendor_prefixed/guzzlehttp/psr7/src/Response.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\Rfc7230' => $baseDir . '/vendor_prefixed/guzzlehttp/psr7/src/Rfc7230.php',
@ -185,6 +193,7 @@ return array(
'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\Uri' => $baseDir . '/vendor_prefixed/guzzlehttp/psr7/src/Uri.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\UriNormalizer' => $baseDir . '/vendor_prefixed/guzzlehttp/psr7/src/UriNormalizer.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\UriResolver' => $baseDir . '/vendor_prefixed/guzzlehttp/psr7/src/UriResolver.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\Utils' => $baseDir . '/vendor_prefixed/guzzlehttp/psr7/src/Utils.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\RedirectMiddleware' => $baseDir . '/vendor_prefixed/guzzlehttp/guzzle/src/RedirectMiddleware.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\RequestOptions' => $baseDir . '/vendor_prefixed/guzzlehttp/guzzle/src/RequestOptions.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\RetryMiddleware' => $baseDir . '/vendor_prefixed/guzzlehttp/guzzle/src/RetryMiddleware.php',

View File

@ -6,6 +6,8 @@ $vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir);
return array(
'5255c38a0faeba867671b61dfda6d864' => $vendorDir . '/paragonie/random_compat/lib/random.php',
'3109cb1a231dcd04bee1f9f620d46975' => $vendorDir . '/paragonie/sodium_compat/autoload.php',
'7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php',
'840b8504e40a63aaa679ca25c0b2a1cc' => $baseDir . '/vendor_prefixed/guzzlehttp/psr7/src/functions_include.php',
'e3e111437f37e10e6bcab5eacc08fb6f' => $baseDir . '/vendor_prefixed/guzzlehttp/promises/src/functions_include.php',

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit4505233c9771255f4bcd3288908993ad
class ComposerAutoloaderInit982434b9fa67b618e1fee7385b7ec239
{
private static $loader;
@ -22,15 +22,15 @@ class ComposerAutoloaderInit4505233c9771255f4bcd3288908993ad
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInit4505233c9771255f4bcd3288908993ad', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit982434b9fa67b618e1fee7385b7ec239', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInit4505233c9771255f4bcd3288908993ad', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit982434b9fa67b618e1fee7385b7ec239', 'loadClassLoader'));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) {
require_once __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit4505233c9771255f4bcd3288908993ad::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit982434b9fa67b618e1fee7385b7ec239::getInitializer($loader));
} else {
$map = require __DIR__ . '/autoload_namespaces.php';
foreach ($map as $namespace => $path) {
@ -51,19 +51,19 @@ class ComposerAutoloaderInit4505233c9771255f4bcd3288908993ad
$loader->register(true);
if ($useStaticLoader) {
$includeFiles = Composer\Autoload\ComposerStaticInit4505233c9771255f4bcd3288908993ad::$files;
$includeFiles = Composer\Autoload\ComposerStaticInit982434b9fa67b618e1fee7385b7ec239::$files;
} else {
$includeFiles = require __DIR__ . '/autoload_files.php';
}
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequire4505233c9771255f4bcd3288908993ad($fileIdentifier, $file);
composerRequire982434b9fa67b618e1fee7385b7ec239($fileIdentifier, $file);
}
return $loader;
}
}
function composerRequire4505233c9771255f4bcd3288908993ad($fileIdentifier, $file)
function composerRequire982434b9fa67b618e1fee7385b7ec239($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
require $file;

View File

@ -4,9 +4,11 @@
namespace Composer\Autoload;
class ComposerStaticInit4505233c9771255f4bcd3288908993ad
class ComposerStaticInit982434b9fa67b618e1fee7385b7ec239
{
public static $files = array (
'5255c38a0faeba867671b61dfda6d864' => __DIR__ . '/..' . '/paragonie/random_compat/lib/random.php',
'3109cb1a231dcd04bee1f9f620d46975' => __DIR__ . '/..' . '/paragonie/sodium_compat/autoload.php',
'7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
'840b8504e40a63aaa679ca25c0b2a1cc' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/psr7/src/functions_include.php',
'e3e111437f37e10e6bcab5eacc08fb6f' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/promises/src/functions_include.php',
@ -208,8 +210,11 @@ class ComposerStaticInit4505233c9771255f4bcd3288908993ad
'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\AggregateException' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/promises/src/AggregateException.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\CancellationException' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/promises/src/CancellationException.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\Coroutine' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/promises/src/Coroutine.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\Create' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/promises/src/Create.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\Each' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/promises/src/Each.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\EachPromise' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/promises/src/EachPromise.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\FulfilledPromise' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/promises/src/FulfilledPromise.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\Is' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/promises/src/Is.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\Promise' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/promises/src/Promise.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\PromiseInterface' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/promises/src/PromiseInterface.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\PromisorInterface' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/promises/src/PromisorInterface.php',
@ -217,18 +222,23 @@ class ComposerStaticInit4505233c9771255f4bcd3288908993ad
'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\RejectionException' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/promises/src/RejectionException.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\TaskQueue' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/promises/src/TaskQueue.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\TaskQueueInterface' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/promises/src/TaskQueueInterface.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Promise\\Utils' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/promises/src/Utils.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\AppendStream' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/psr7/src/AppendStream.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\BufferStream' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/psr7/src/BufferStream.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\CachingStream' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/psr7/src/CachingStream.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\DroppingStream' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/psr7/src/DroppingStream.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\FnStream' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/psr7/src/FnStream.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\Header' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/psr7/src/Header.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\InflateStream' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/psr7/src/InflateStream.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\LazyOpenStream' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/psr7/src/LazyOpenStream.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\LimitStream' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/psr7/src/LimitStream.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\Message' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/psr7/src/Message.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\MessageTrait' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/psr7/src/MessageTrait.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\MimeType' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/psr7/src/MimeType.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\MultipartStream' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/psr7/src/MultipartStream.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\NoSeekStream' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/psr7/src/NoSeekStream.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\PumpStream' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/psr7/src/PumpStream.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\Query' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/psr7/src/Query.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\Request' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/psr7/src/Request.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\Response' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/psr7/src/Response.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\Rfc7230' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/psr7/src/Rfc7230.php',
@ -240,6 +250,7 @@ class ComposerStaticInit4505233c9771255f4bcd3288908993ad
'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\Uri' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/psr7/src/Uri.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\UriNormalizer' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/psr7/src/UriNormalizer.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\UriResolver' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/psr7/src/UriResolver.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\Psr7\\Utils' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/psr7/src/Utils.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\RedirectMiddleware' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/guzzle/src/RedirectMiddleware.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\RequestOptions' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/guzzle/src/RequestOptions.php',
'WPMailSMTP\\Vendor\\GuzzleHttp\\RetryMiddleware' => __DIR__ . '/../..' . '/vendor_prefixed/guzzlehttp/guzzle/src/RetryMiddleware.php',
@ -586,9 +597,9 @@ class ComposerStaticInit4505233c9771255f4bcd3288908993ad
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit4505233c9771255f4bcd3288908993ad::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit4505233c9771255f4bcd3288908993ad::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit4505233c9771255f4bcd3288908993ad::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit982434b9fa67b618e1fee7385b7ec239::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit982434b9fa67b618e1fee7385b7ec239::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit982434b9fa67b618e1fee7385b7ec239::$classMap;
}, null, ClassLoader::class);
}

View File

@ -0,0 +1,22 @@
The MIT License (MIT)
Copyright (c) 2015 Paragon Initiative Enterprises
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -0,0 +1,5 @@
-----BEGIN PUBLIC KEY-----
MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEEd+wCqJDrx5B4OldM0dQE0ZMX+lx1ZWm
pui0SUqD4G29L3NGsz9UhJ/0HjBdbnkhIK5xviT0X5vtjacF6ajgcCArbTB+ds+p
+h7Q084NuSuIpNb6YPfoUFgC/CL9kAoc
-----END PUBLIC KEY-----

View File

@ -0,0 +1,11 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (MingW32)
iQEcBAABAgAGBQJWtW1hAAoJEGuXocKCZATaJf0H+wbZGgskK1dcRTsuVJl9IWip
QwGw/qIKI280SD6/ckoUMxKDCJiFuPR14zmqnS36k7N5UNPnpdTJTS8T11jttSpg
1LCmgpbEIpgaTah+cELDqFCav99fS+bEiAL5lWDAHBTE/XPjGVCqeehyPYref4IW
NDBIEsvnHPHPLsn6X5jq4+Yj5oUixgxaMPiR+bcO4Sh+RzOVB6i2D0upWfRXBFXA
NNnsg9/zjvoC7ZW73y9uSH+dPJTt/Vgfeiv52/v41XliyzbUyLalf02GNPY+9goV
JHG1ulEEBJOCiUD9cE1PUIJwHA/HqyhHIvV350YoEFiHl8iSwm7SiZu5kPjaq74=
=B6+8
-----END PGP SIGNATURE-----

View File

@ -0,0 +1,195 @@
<?php
/**
* Random_* Compatibility Library
* for using the new PHP 7 random_* API in PHP 5 projects
*
* The MIT License (MIT)
*
* Copyright (c) 2015 - 2018 Paragon Initiative Enterprises
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
if (!is_callable('RandomCompat_strlen')) {
if (
defined('MB_OVERLOAD_STRING')
&&
((int) ini_get('mbstring.func_overload')) & MB_OVERLOAD_STRING
) {
/**
* strlen() implementation that isn't brittle to mbstring.func_overload
*
* This version uses mb_strlen() in '8bit' mode to treat strings as raw
* binary rather than UTF-8, ISO-8859-1, etc
*
* @param string $binary_string
*
* @throws TypeError
*
* @return int
*/
function RandomCompat_strlen($binary_string)
{
if (!is_string($binary_string)) {
throw new TypeError(
'RandomCompat_strlen() expects a string'
);
}
return (int) mb_strlen($binary_string, '8bit');
}
} else {
/**
* strlen() implementation that isn't brittle to mbstring.func_overload
*
* This version just used the default strlen()
*
* @param string $binary_string
*
* @throws TypeError
*
* @return int
*/
function RandomCompat_strlen($binary_string)
{
if (!is_string($binary_string)) {
throw new TypeError(
'RandomCompat_strlen() expects a string'
);
}
return (int) strlen($binary_string);
}
}
}
if (!is_callable('RandomCompat_substr')) {
if (
defined('MB_OVERLOAD_STRING')
&&
((int) ini_get('mbstring.func_overload')) & MB_OVERLOAD_STRING
) {
/**
* substr() implementation that isn't brittle to mbstring.func_overload
*
* This version uses mb_substr() in '8bit' mode to treat strings as raw
* binary rather than UTF-8, ISO-8859-1, etc
*
* @param string $binary_string
* @param int $start
* @param int|null $length (optional)
*
* @throws TypeError
*
* @return string
*/
function RandomCompat_substr($binary_string, $start, $length = null)
{
if (!is_string($binary_string)) {
throw new TypeError(
'RandomCompat_substr(): First argument should be a string'
);
}
if (!is_int($start)) {
throw new TypeError(
'RandomCompat_substr(): Second argument should be an integer'
);
}
if ($length === null) {
/**
* mb_substr($str, 0, NULL, '8bit') returns an empty string on
* PHP 5.3, so we have to find the length ourselves.
*/
/** @var int $length */
$length = RandomCompat_strlen($binary_string) - $start;
} elseif (!is_int($length)) {
throw new TypeError(
'RandomCompat_substr(): Third argument should be an integer, or omitted'
);
}
// Consistency with PHP's behavior
if ($start === RandomCompat_strlen($binary_string) && $length === 0) {
return '';
}
if ($start > RandomCompat_strlen($binary_string)) {
return '';
}
return (string) mb_substr(
(string) $binary_string,
(int) $start,
(int) $length,
'8bit'
);
}
} else {
/**
* substr() implementation that isn't brittle to mbstring.func_overload
*
* This version just uses the default substr()
*
* @param string $binary_string
* @param int $start
* @param int|null $length (optional)
*
* @throws TypeError
*
* @return string
*/
function RandomCompat_substr($binary_string, $start, $length = null)
{
if (!is_string($binary_string)) {
throw new TypeError(
'RandomCompat_substr(): First argument should be a string'
);
}
if (!is_int($start)) {
throw new TypeError(
'RandomCompat_substr(): Second argument should be an integer'
);
}
if ($length !== null) {
if (!is_int($length)) {
throw new TypeError(
'RandomCompat_substr(): Third argument should be an integer, or omitted'
);
}
return (string) substr(
(string )$binary_string,
(int) $start,
(int) $length
);
}
return (string) substr(
(string) $binary_string,
(int) $start
);
}
}
}

View File

@ -0,0 +1,77 @@
<?php
/**
* Random_* Compatibility Library
* for using the new PHP 7 random_* API in PHP 5 projects
*
* The MIT License (MIT)
*
* Copyright (c) 2015 - 2018 Paragon Initiative Enterprises
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
if (!is_callable('RandomCompat_intval')) {
/**
* Cast to an integer if we can, safely.
*
* If you pass it a float in the range (~PHP_INT_MAX, PHP_INT_MAX)
* (non-inclusive), it will sanely cast it to an int. If you it's equal to
* ~PHP_INT_MAX or PHP_INT_MAX, we let it fail as not an integer. Floats
* lose precision, so the <= and => operators might accidentally let a float
* through.
*
* @param int|float $number The number we want to convert to an int
* @param bool $fail_open Set to true to not throw an exception
*
* @return float|int
* @psalm-suppress InvalidReturnType
*
* @throws TypeError
*/
function RandomCompat_intval($number, $fail_open = false)
{
if (is_int($number) || is_float($number)) {
$number += 0;
} elseif (is_numeric($number)) {
/** @psalm-suppress InvalidOperand */
$number += 0;
}
/** @var int|float $number */
if (
is_float($number)
&&
$number > ~PHP_INT_MAX
&&
$number < PHP_INT_MAX
) {
$number = (int) $number;
}
if (is_int($number)) {
return (int) $number;
} elseif (!$fail_open) {
throw new TypeError(
'Expected an integer.'
);
}
return $number;
}
}

View File

@ -0,0 +1,49 @@
<?php
/**
* Random_* Compatibility Library
* for using the new PHP 7 random_* API in PHP 5 projects
*
* The MIT License (MIT)
*
* Copyright (c) 2015 - 2018 Paragon Initiative Enterprises
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
if (!class_exists('Error', false)) {
// We can't really avoid making this extend Exception in PHP 5.
class Error extends Exception
{
}
}
if (!class_exists('TypeError', false)) {
if (is_subclass_of('Error', 'Exception')) {
class TypeError extends Error
{
}
} else {
class TypeError extends Exception
{
}
}
}

View File

@ -0,0 +1,225 @@
<?php
/**
* Random_* Compatibility Library
* for using the new PHP 7 random_* API in PHP 5 projects
*
* @version 2.0.17
* @released 2018-07-04
*
* The MIT License (MIT)
*
* Copyright (c) 2015 - 2018 Paragon Initiative Enterprises
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
if (!defined('PHP_VERSION_ID')) {
// This constant was introduced in PHP 5.2.7
$RandomCompatversion = array_map('intval', explode('.', PHP_VERSION));
define(
'PHP_VERSION_ID',
$RandomCompatversion[0] * 10000
+ $RandomCompatversion[1] * 100
+ $RandomCompatversion[2]
);
$RandomCompatversion = null;
}
/**
* PHP 7.0.0 and newer have these functions natively.
*/
if (PHP_VERSION_ID >= 70000) {
return;
}
if (!defined('RANDOM_COMPAT_READ_BUFFER')) {
define('RANDOM_COMPAT_READ_BUFFER', 8);
}
$RandomCompatDIR = dirname(__FILE__);
require_once $RandomCompatDIR . DIRECTORY_SEPARATOR . 'byte_safe_strings.php';
require_once $RandomCompatDIR . DIRECTORY_SEPARATOR . 'cast_to_int.php';
require_once $RandomCompatDIR . DIRECTORY_SEPARATOR . 'error_polyfill.php';
if (!is_callable('random_bytes')) {
/**
* PHP 5.2.0 - 5.6.x way to implement random_bytes()
*
* We use conditional statements here to define the function in accordance
* to the operating environment. It's a micro-optimization.
*
* In order of preference:
* 1. Use libsodium if available.
* 2. fread() /dev/urandom if available (never on Windows)
* 3. mcrypt_create_iv($bytes, MCRYPT_DEV_URANDOM)
* 4. COM('CAPICOM.Utilities.1')->GetRandom()
*
* See RATIONALE.md for our reasoning behind this particular order
*/
if (extension_loaded('libsodium')) {
// See random_bytes_libsodium.php
if (PHP_VERSION_ID >= 50300 && is_callable('\\Sodium\\randombytes_buf')) {
require_once $RandomCompatDIR . DIRECTORY_SEPARATOR . 'random_bytes_libsodium.php';
} elseif (method_exists('Sodium', 'randombytes_buf')) {
require_once $RandomCompatDIR . DIRECTORY_SEPARATOR . 'random_bytes_libsodium_legacy.php';
}
}
/**
* Reading directly from /dev/urandom:
*/
if (DIRECTORY_SEPARATOR === '/') {
// DIRECTORY_SEPARATOR === '/' on Unix-like OSes -- this is a fast
// way to exclude Windows.
$RandomCompatUrandom = true;
$RandomCompat_basedir = ini_get('open_basedir');
if (!empty($RandomCompat_basedir)) {
$RandomCompat_open_basedir = explode(
PATH_SEPARATOR,
strtolower($RandomCompat_basedir)
);
$RandomCompatUrandom = (array() !== array_intersect(
array('/dev', '/dev/', '/dev/urandom'),
$RandomCompat_open_basedir
));
$RandomCompat_open_basedir = null;
}
if (
!is_callable('random_bytes')
&&
$RandomCompatUrandom
&&
@is_readable('/dev/urandom')
) {
// Error suppression on is_readable() in case of an open_basedir
// or safe_mode failure. All we care about is whether or not we
// can read it at this point. If the PHP environment is going to
// panic over trying to see if the file can be read in the first
// place, that is not helpful to us here.
// See random_bytes_dev_urandom.php
require_once $RandomCompatDIR . DIRECTORY_SEPARATOR . 'random_bytes_dev_urandom.php';
}
// Unset variables after use
$RandomCompat_basedir = null;
} else {
$RandomCompatUrandom = false;
}
/**
* mcrypt_create_iv()
*
* We only want to use mcypt_create_iv() if:
*
* - random_bytes() hasn't already been defined
* - the mcrypt extensions is loaded
* - One of these two conditions is true:
* - We're on Windows (DIRECTORY_SEPARATOR !== '/')
* - We're not on Windows and /dev/urandom is readabale
* (i.e. we're not in a chroot jail)
* - Special case:
* - If we're not on Windows, but the PHP version is between
* 5.6.10 and 5.6.12, we don't want to use mcrypt. It will
* hang indefinitely. This is bad.
* - If we're on Windows, we want to use PHP >= 5.3.7 or else
* we get insufficient entropy errors.
*/
if (
!is_callable('random_bytes')
&&
// Windows on PHP < 5.3.7 is broken, but non-Windows is not known to be.
(DIRECTORY_SEPARATOR === '/' || PHP_VERSION_ID >= 50307)
&&
// Prevent this code from hanging indefinitely on non-Windows;
// see https://bugs.php.net/bug.php?id=69833
(
DIRECTORY_SEPARATOR !== '/' ||
(PHP_VERSION_ID <= 50609 || PHP_VERSION_ID >= 50613)
)
&&
extension_loaded('mcrypt')
) {
// See random_bytes_mcrypt.php
require_once $RandomCompatDIR . DIRECTORY_SEPARATOR . 'random_bytes_mcrypt.php';
}
$RandomCompatUrandom = null;
/**
* This is a Windows-specific fallback, for when the mcrypt extension
* isn't loaded.
*/
if (
!is_callable('random_bytes')
&&
extension_loaded('com_dotnet')
&&
class_exists('COM')
) {
$RandomCompat_disabled_classes = preg_split(
'#\s*,\s*#',
strtolower(ini_get('disable_classes'))
);
if (!in_array('com', $RandomCompat_disabled_classes)) {
try {
$RandomCompatCOMtest = new COM('CAPICOM.Utilities.1');
if (method_exists($RandomCompatCOMtest, 'GetRandom')) {
// See random_bytes_com_dotnet.php
require_once $RandomCompatDIR . DIRECTORY_SEPARATOR . 'random_bytes_com_dotnet.php';
}
} catch (com_exception $e) {
// Don't try to use it.
}
}
$RandomCompat_disabled_classes = null;
$RandomCompatCOMtest = null;
}
/**
* throw new Exception
*/
if (!is_callable('random_bytes')) {
/**
* We don't have any more options, so let's throw an exception right now
* and hope the developer won't let it fail silently.
*
* @param mixed $length
* @psalm-suppress InvalidReturnType
* @throws Exception
* @return string
*/
function random_bytes($length)
{
unset($length); // Suppress "variable not used" warnings.
throw new Exception(
'There is no suitable CSPRNG installed on your system'
);
return '';
}
}
}
if (!is_callable('random_int')) {
require_once $RandomCompatDIR . DIRECTORY_SEPARATOR . 'random_int.php';
}
$RandomCompatDIR = null;

View File

@ -0,0 +1,91 @@
<?php
/**
* Random_* Compatibility Library
* for using the new PHP 7 random_* API in PHP 5 projects
*
* The MIT License (MIT)
*
* Copyright (c) 2015 - 2018 Paragon Initiative Enterprises
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
if (!is_callable('random_bytes')) {
/**
* Windows with PHP < 5.3.0 will not have the function
* openssl_random_pseudo_bytes() available, so let's use
* CAPICOM to work around this deficiency.
*
* @param int $bytes
*
* @throws Exception
*
* @return string
*/
function random_bytes($bytes)
{
try {
/** @var int $bytes */
$bytes = RandomCompat_intval($bytes);
} catch (TypeError $ex) {
throw new TypeError(
'random_bytes(): $bytes must be an integer'
);
}
if ($bytes < 1) {
throw new Error(
'Length must be greater than 0'
);
}
/** @var string $buf */
$buf = '';
if (!class_exists('COM')) {
throw new Error(
'COM does not exist'
);
}
/** @var COM $util */
$util = new COM('CAPICOM.Utilities.1');
$execCount = 0;
/**
* Let's not let it loop forever. If we run N times and fail to
* get N bytes of random data, then CAPICOM has failed us.
*/
do {
$buf .= base64_decode((string) $util->GetRandom($bytes, 0));
if (RandomCompat_strlen($buf) >= $bytes) {
/**
* Return our random entropy buffer here:
*/
return (string) RandomCompat_substr($buf, 0, $bytes);
}
++$execCount;
} while ($execCount < $bytes);
/**
* If we reach here, PHP has failed us.
*/
throw new Exception(
'Could not gather sufficient random data'
);
}
}

View File

@ -0,0 +1,190 @@
<?php
/**
* Random_* Compatibility Library
* for using the new PHP 7 random_* API in PHP 5 projects
*
* The MIT License (MIT)
*
* Copyright (c) 2015 - 2018 Paragon Initiative Enterprises
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
if (!defined('RANDOM_COMPAT_READ_BUFFER')) {
define('RANDOM_COMPAT_READ_BUFFER', 8);
}
if (!is_callable('random_bytes')) {
/**
* Unless open_basedir is enabled, use /dev/urandom for
* random numbers in accordance with best practices
*
* Why we use /dev/urandom and not /dev/random
* @ref https://www.2uo.de/myths-about-urandom
* @ref http://sockpuppet.org/blog/2014/02/25/safely-generate-random-numbers
*
* @param int $bytes
*
* @throws Exception
*
* @return string
*/
function random_bytes($bytes)
{
/** @var resource $fp */
static $fp = null;
/**
* This block should only be run once
*/
if (empty($fp)) {
/**
* We don't want to ever read C:\dev\random, only /dev/urandom on
* Unix-like operating systems. While we guard against this
* condition in random.php, it doesn't hurt to be defensive in depth
* here.
*
* To that end, we only try to open /dev/urandom if we're on a Unix-
* like operating system (which means the directory separator is set
* to "/" not "\".
*/
if (DIRECTORY_SEPARATOR === '/') {
if (!is_readable('/dev/urandom')) {
throw new Exception(
'Environment misconfiguration: ' .
'/dev/urandom cannot be read.'
);
}
/**
* We use /dev/urandom if it is a char device.
* We never fall back to /dev/random
*/
/** @var resource|bool $fp */
$fp = fopen('/dev/urandom', 'rb');
if (is_resource($fp)) {
/** @var array<string, int> $st */
$st = fstat($fp);
if (($st['mode'] & 0170000) !== 020000) {
fclose($fp);
$fp = false;
}
}
}
if (is_resource($fp)) {
/**
* stream_set_read_buffer() does not exist in HHVM
*
* If we don't set the stream's read buffer to 0, PHP will
* internally buffer 8192 bytes, which can waste entropy
*
* stream_set_read_buffer returns 0 on success
*/
if (is_callable('stream_set_read_buffer')) {
stream_set_read_buffer($fp, RANDOM_COMPAT_READ_BUFFER);
}
if (is_callable('stream_set_chunk_size')) {
stream_set_chunk_size($fp, RANDOM_COMPAT_READ_BUFFER);
}
}
}
try {
/** @var int $bytes */
$bytes = RandomCompat_intval($bytes);
} catch (TypeError $ex) {
throw new TypeError(
'random_bytes(): $bytes must be an integer'
);
}
if ($bytes < 1) {
throw new Error(
'Length must be greater than 0'
);
}
/**
* This if() block only runs if we managed to open a file handle
*
* It does not belong in an else {} block, because the above
* if (empty($fp)) line is logic that should only be run once per
* page load.
*/
if (is_resource($fp)) {
/**
* @var int
*/
$remaining = $bytes;
/**
* @var string|bool
*/
$buf = '';
/**
* We use fread() in a loop to protect against partial reads
*/
do {
/**
* @var string|bool
*/
$read = fread($fp, $remaining);
if (!is_string($read)) {
/**
* We cannot safely read from the file. Exit the
* do-while loop and trigger the exception condition
*
* @var string|bool
*/
$buf = false;
break;
}
/**
* Decrease the number of bytes returned from remaining
*/
$remaining -= RandomCompat_strlen($read);
/**
* @var string $buf
*/
$buf .= $read;
} while ($remaining > 0);
/**
* Is our result valid?
* @var string|bool $buf
*/
if (is_string($buf)) {
if (RandomCompat_strlen($buf) === $bytes) {
/**
* Return our random entropy buffer here:
*/
return $buf;
}
}
}
/**
* If we reach here, PHP has failed us.
*/
throw new Exception(
'Error reading from source device'
);
}
}

View File

@ -0,0 +1,91 @@
<?php
/**
* Random_* Compatibility Library
* for using the new PHP 7 random_* API in PHP 5 projects
*
* The MIT License (MIT)
*
* Copyright (c) 2015 - 2018 Paragon Initiative Enterprises
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
if (!is_callable('random_bytes')) {
/**
* If the libsodium PHP extension is loaded, we'll use it above any other
* solution.
*
* libsodium-php project:
* @ref https://github.com/jedisct1/libsodium-php
*
* @param int $bytes
*
* @throws Exception
*
* @return string
*/
function random_bytes($bytes)
{
try {
/** @var int $bytes */
$bytes = RandomCompat_intval($bytes);
} catch (TypeError $ex) {
throw new TypeError(
'random_bytes(): $bytes must be an integer'
);
}
if ($bytes < 1) {
throw new Error(
'Length must be greater than 0'
);
}
/**
* \Sodium\randombytes_buf() doesn't allow more than 2147483647 bytes to be
* generated in one invocation.
*/
/** @var string|bool $buf */
if ($bytes > 2147483647) {
$buf = '';
for ($i = 0; $i < $bytes; $i += 1073741824) {
$n = ($bytes - $i) > 1073741824
? 1073741824
: $bytes - $i;
$buf .= \Sodium\randombytes_buf($n);
}
} else {
/** @var string|bool $buf */
$buf = \Sodium\randombytes_buf($bytes);
}
if (is_string($buf)) {
if (RandomCompat_strlen($buf) === $bytes) {
return $buf;
}
}
/**
* If we reach here, PHP has failed us.
*/
throw new Exception(
'Could not gather sufficient random data'
);
}
}

View File

@ -0,0 +1,93 @@
<?php
/**
* Random_* Compatibility Library
* for using the new PHP 7 random_* API in PHP 5 projects
*
* The MIT License (MIT)
*
* Copyright (c) 2015 - 2018 Paragon Initiative Enterprises
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
if (!is_callable('random_bytes')) {
/**
* If the libsodium PHP extension is loaded, we'll use it above any other
* solution.
*
* libsodium-php project:
* @ref https://github.com/jedisct1/libsodium-php
*
* @param int $bytes
*
* @throws Exception
*
* @return string
*/
function random_bytes($bytes)
{
try {
/** @var int $bytes */
$bytes = RandomCompat_intval($bytes);
} catch (TypeError $ex) {
throw new TypeError(
'random_bytes(): $bytes must be an integer'
);
}
if ($bytes < 1) {
throw new Error(
'Length must be greater than 0'
);
}
/**
* @var string
*/
$buf = '';
/**
* \Sodium\randombytes_buf() doesn't allow more than 2147483647 bytes to be
* generated in one invocation.
*/
if ($bytes > 2147483647) {
for ($i = 0; $i < $bytes; $i += 1073741824) {
$n = ($bytes - $i) > 1073741824
? 1073741824
: $bytes - $i;
$buf .= Sodium::randombytes_buf((int) $n);
}
} else {
$buf .= Sodium::randombytes_buf((int) $bytes);
}
if (is_string($buf)) {
if (RandomCompat_strlen($buf) === $bytes) {
return $buf;
}
}
/**
* If we reach here, PHP has failed us.
*/
throw new Exception(
'Could not gather sufficient random data'
);
}
}

View File

@ -0,0 +1,79 @@
<?php
/**
* Random_* Compatibility Library
* for using the new PHP 7 random_* API in PHP 5 projects
*
* The MIT License (MIT)
*
* Copyright (c) 2015 - 2018 Paragon Initiative Enterprises
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
if (!is_callable('random_bytes')) {
/**
* Powered by ext/mcrypt (and thankfully NOT libmcrypt)
*
* @ref https://bugs.php.net/bug.php?id=55169
* @ref https://github.com/php/php-src/blob/c568ffe5171d942161fc8dda066bce844bdef676/ext/mcrypt/mcrypt.c#L1321-L1386
*
* @param int $bytes
*
* @throws Exception
*
* @return string
*/
function random_bytes($bytes)
{
try {
/** @var int $bytes */
$bytes = RandomCompat_intval($bytes);
} catch (TypeError $ex) {
throw new TypeError(
'random_bytes(): $bytes must be an integer'
);
}
if ($bytes < 1) {
throw new Error(
'Length must be greater than 0'
);
}
/** @var string|bool $buf */
$buf = @mcrypt_create_iv((int) $bytes, (int) MCRYPT_DEV_URANDOM);
if (
is_string($buf)
&&
RandomCompat_strlen($buf) === $bytes
) {
/**
* Return our random entropy buffer here:
*/
return $buf;
}
/**
* If we reach here, PHP has failed us.
*/
throw new Exception(
'Could not gather sufficient random data'
);
}
}

View File

@ -0,0 +1,204 @@
<?php
if (!is_callable('random_int')) {
/**
* Random_* Compatibility Library
* for using the new PHP 7 random_* API in PHP 5 projects
*
* The MIT License (MIT)
*
* Copyright (c) 2015 - 2018 Paragon Initiative Enterprises
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
/**
* Fetch a random integer between $min and $max inclusive
*
* @param int $min
* @param int $max
*
* @throws Exception
*
* @return int
*/
function random_int($min, $max)
{
/**
* Type and input logic checks
*
* If you pass it a float in the range (~PHP_INT_MAX, PHP_INT_MAX)
* (non-inclusive), it will sanely cast it to an int. If you it's equal to
* ~PHP_INT_MAX or PHP_INT_MAX, we let it fail as not an integer. Floats
* lose precision, so the <= and => operators might accidentally let a float
* through.
*/
try {
/** @var int $min */
$min = RandomCompat_intval($min);
} catch (TypeError $ex) {
throw new TypeError(
'random_int(): $min must be an integer'
);
}
try {
/** @var int $max */
$max = RandomCompat_intval($max);
} catch (TypeError $ex) {
throw new TypeError(
'random_int(): $max must be an integer'
);
}
/**
* Now that we've verified our weak typing system has given us an integer,
* let's validate the logic then we can move forward with generating random
* integers along a given range.
*/
if ($min > $max) {
throw new Error(
'Minimum value must be less than or equal to the maximum value'
);
}
if ($max === $min) {
return (int) $min;
}
/**
* Initialize variables to 0
*
* We want to store:
* $bytes => the number of random bytes we need
* $mask => an integer bitmask (for use with the &) operator
* so we can minimize the number of discards
*/
$attempts = $bits = $bytes = $mask = $valueShift = 0;
/** @var int $attempts */
/** @var int $bits */
/** @var int $bytes */
/** @var int $mask */
/** @var int $valueShift */
/**
* At this point, $range is a positive number greater than 0. It might
* overflow, however, if $max - $min > PHP_INT_MAX. PHP will cast it to
* a float and we will lose some precision.
*
* @var int|float $range
*/
$range = $max - $min;
/**
* Test for integer overflow:
*/
if (!is_int($range)) {
/**
* Still safely calculate wider ranges.
* Provided by @CodesInChaos, @oittaa
*
* @ref https://gist.github.com/CodesInChaos/03f9ea0b58e8b2b8d435
*
* We use ~0 as a mask in this case because it generates all 1s
*
* @ref https://eval.in/400356 (32-bit)
* @ref http://3v4l.org/XX9r5 (64-bit)
*/
$bytes = PHP_INT_SIZE;
/** @var int $mask */
$mask = ~0;
} else {
/**
* $bits is effectively ceil(log($range, 2)) without dealing with
* type juggling
*/
while ($range > 0) {
if ($bits % 8 === 0) {
++$bytes;
}
++$bits;
$range >>= 1;
/** @var int $mask */
$mask = $mask << 1 | 1;
}
$valueShift = $min;
}
/** @var int $val */
$val = 0;
/**
* Now that we have our parameters set up, let's begin generating
* random integers until one falls between $min and $max
*/
/** @psalm-suppress RedundantCondition */
do {
/**
* The rejection probability is at most 0.5, so this corresponds
* to a failure probability of 2^-128 for a working RNG
*/
if ($attempts > 128) {
throw new Exception(
'random_int: RNG is broken - too many rejections'
);
}
/**
* Let's grab the necessary number of random bytes
*/
$randomByteString = random_bytes($bytes);
/**
* Let's turn $randomByteString into an integer
*
* This uses bitwise operators (<< and |) to build an integer
* out of the values extracted from ord()
*
* Example: [9F] | [6D] | [32] | [0C] =>
* 159 + 27904 + 3276800 + 201326592 =>
* 204631455
*/
$val &= 0;
for ($i = 0; $i < $bytes; ++$i) {
$val |= ord($randomByteString[$i]) << ($i * 8);
}
/** @var int $val */
/**
* Apply mask
*/
$val &= $mask;
$val += $valueShift;
++$attempts;
/**
* If $val overflows to a floating point number,
* ... or is larger than $max,
* ... or smaller than $min,
* then try again.
*/
} while (!is_int($val) || $val > $max || $val < $min);
return (int) $val;
}
}

View File

@ -0,0 +1,14 @@
<?php
require_once __DIR__ . '/psalm-autoload.php';
/**
* This is necessary for PHPUnit on PHP >= 5.3
*
* Class PHPUnit_Framework_TestCase
*/
if (PHP_VERSION_ID >= 50300) {
if (!class_exists('PHPUnit_Framework_TestCase')) {
require_once __DIR__ . '/other/phpunit-shim.php';
}
}

View File

@ -0,0 +1,21 @@
/*
* ISC License
*
* Copyright (c) 2016-2019
* Paragon Initiative Enterprises <security at paragonie dot com>
*
* Copyright (c) 2013-2019
* Frank Denis <j at pureftpd dot org>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/

View File

@ -0,0 +1,4 @@
<?php
require_once 'autoload.php';
ParagonIE_Sodium_Compat::$fastMult = true;

View File

@ -0,0 +1,6 @@
<?php
require_once 'autoload.php';
define('DO_PEDANTIC_TEST', true);
ParagonIE_Sodium_Compat::$fastMult = true;

View File

@ -0,0 +1,31 @@
<?php
/*
This file should only ever be loaded on PHP 7+
*/
if (PHP_VERSION_ID < 70000) {
return;
}
spl_autoload_register(function ($class) {
$namespace = 'ParagonIE_Sodium_';
// Does the class use the namespace prefix?
$len = strlen($namespace);
if (strncmp($namespace, $class, $len) !== 0) {
// no, move to the next registered autoloader
return false;
}
// Get the relative class name
$relative_class = substr($class, $len);
// Replace the namespace prefix with the base directory, replace namespace
// separators with directory separators in the relative class name, append
// with .php
$file = dirname(__FILE__) . '/src/' . str_replace('_', '/', $relative_class) . '.php';
// if the file exists, require it
if (file_exists($file)) {
require_once $file;
return true;
}
return false;
});

View File

@ -0,0 +1,7 @@
<?php
require_once (dirname(__FILE__) . '/vendor/autoload.php');
if (PHP_VERSION_ID >= 50300) {
require_once (dirname(__FILE__) . '/tests/phpunit-shim.php');
}

View File

@ -0,0 +1,65 @@
<?php
if (PHP_VERSION_ID < 70000) {
if (!is_callable('sodiumCompatAutoloader')) {
/**
* Sodium_Compat autoloader.
*
* @param string $class Class name to be autoloaded.
*
* @return bool Stop autoloading?
*/
function sodiumCompatAutoloader($class)
{
$namespace = 'ParagonIE_Sodium_';
// Does the class use the namespace prefix?
$len = strlen($namespace);
if (strncmp($namespace, $class, $len) !== 0) {
// no, move to the next registered autoloader
return false;
}
// Get the relative class name
$relative_class = substr($class, $len);
// Replace the namespace prefix with the base directory, replace namespace
// separators with directory separators in the relative class name, append
// with .php
$file = dirname(__FILE__) . '/src/' . str_replace('_', '/', $relative_class) . '.php';
// if the file exists, require it
if (file_exists($file)) {
require_once $file;
return true;
}
return false;
}
// Now that we have an autoloader, let's register it!
spl_autoload_register('sodiumCompatAutoloader');
}
} else {
require_once dirname(__FILE__) . '/autoload-php7.php';
}
if (!class_exists('SodiumException', false)) {
require_once dirname(__FILE__) . '/src/SodiumException.php';
}
if (PHP_VERSION_ID >= 50300) {
// Namespaces didn't exist before 5.3.0, so don't even try to use this
// unless PHP >= 5.3.0
require_once dirname(__FILE__) . '/lib/namespaced.php';
require_once dirname(__FILE__) . '/lib/sodium_compat.php';
} else {
require_once dirname(__FILE__) . '/src/PHP52/SplFixedArray.php';
}
if (PHP_VERSION_ID < 70200 || !extension_loaded('sodium')) {
if (PHP_VERSION_ID >= 50300 && !defined('SODIUM_CRYPTO_SCALARMULT_BYTES')) {
require_once dirname(__FILE__) . '/lib/php72compat_const.php';
}
if (PHP_VERSION_ID >= 70000) {
assert(class_exists('ParagonIE_Sodium_Compat'), 'Possible filesystem/autoloader bug?');
} else {
assert(class_exists('ParagonIE_Sodium_Compat'));
}
require_once (dirname(__FILE__) . '/lib/php72compat.php');
}

View File

@ -0,0 +1,52 @@
<?php
namespace Sodium;
require_once dirname(dirname(__FILE__)) . '/autoload.php';
use ParagonIE_Sodium_Compat;
const CRYPTO_AEAD_AES256GCM_KEYBYTES = ParagonIE_Sodium_Compat::CRYPTO_AEAD_AES256GCM_KEYBYTES;
const CRYPTO_AEAD_AES256GCM_NSECBYTES = ParagonIE_Sodium_Compat::CRYPTO_AEAD_AES256GCM_NSECBYTES;
const CRYPTO_AEAD_AES256GCM_NPUBBYTES = ParagonIE_Sodium_Compat::CRYPTO_AEAD_AES256GCM_NPUBBYTES;
const CRYPTO_AEAD_AES256GCM_ABYTES = ParagonIE_Sodium_Compat::CRYPTO_AEAD_AES256GCM_ABYTES;
const CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES = ParagonIE_Sodium_Compat::CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES;
const CRYPTO_AEAD_CHACHA20POLY1305_NSECBYTES = ParagonIE_Sodium_Compat::CRYPTO_AEAD_CHACHA20POLY1305_NSECBYTES;
const CRYPTO_AEAD_CHACHA20POLY1305_NPUBBYTES = ParagonIE_Sodium_Compat::CRYPTO_AEAD_CHACHA20POLY1305_NPUBBYTES;
const CRYPTO_AEAD_CHACHA20POLY1305_ABYTES = ParagonIE_Sodium_Compat::CRYPTO_AEAD_CHACHA20POLY1305_ABYTES;
const CRYPTO_AEAD_CHACHA20POLY1305_IETF_KEYBYTES = ParagonIE_Sodium_Compat::CRYPTO_AEAD_CHACHA20POLY1305_IETF_KEYBYTES;
const CRYPTO_AEAD_CHACHA20POLY1305_IETF_NSECBYTES = ParagonIE_Sodium_Compat::CRYPTO_AEAD_CHACHA20POLY1305_IETF_NSECBYTES;
const CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES = ParagonIE_Sodium_Compat::CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES;
const CRYPTO_AEAD_CHACHA20POLY1305_IETF_ABYTES = ParagonIE_Sodium_Compat::CRYPTO_AEAD_CHACHA20POLY1305_IETF_ABYTES;
const CRYPTO_AUTH_BYTES = ParagonIE_Sodium_Compat::CRYPTO_AUTH_BYTES;
const CRYPTO_AUTH_KEYBYTES = ParagonIE_Sodium_Compat::CRYPTO_AUTH_KEYBYTES;
const CRYPTO_BOX_SEALBYTES = ParagonIE_Sodium_Compat::CRYPTO_BOX_SEALBYTES;
const CRYPTO_BOX_SECRETKEYBYTES = ParagonIE_Sodium_Compat::CRYPTO_BOX_SECRETKEYBYTES;
const CRYPTO_BOX_PUBLICKEYBYTES = ParagonIE_Sodium_Compat::CRYPTO_BOX_PUBLICKEYBYTES;
const CRYPTO_BOX_KEYPAIRBYTES = ParagonIE_Sodium_Compat::CRYPTO_BOX_KEYPAIRBYTES;
const CRYPTO_BOX_MACBYTES = ParagonIE_Sodium_Compat::CRYPTO_BOX_MACBYTES;
const CRYPTO_BOX_NONCEBYTES = ParagonIE_Sodium_Compat::CRYPTO_BOX_NONCEBYTES;
const CRYPTO_BOX_SEEDBYTES = ParagonIE_Sodium_Compat::CRYPTO_BOX_SEEDBYTES;
const CRYPTO_KX_BYTES = ParagonIE_Sodium_Compat::CRYPTO_KX_BYTES;
const CRYPTO_KX_SEEDBYTES = ParagonIE_Sodium_Compat::CRYPTO_KX_SEEDBYTES;
const CRYPTO_KX_PUBLICKEYBYTES = ParagonIE_Sodium_Compat::CRYPTO_KX_PUBLICKEYBYTES;
const CRYPTO_KX_SECRETKEYBYTES = ParagonIE_Sodium_Compat::CRYPTO_KX_SECRETKEYBYTES;
const CRYPTO_GENERICHASH_BYTES = ParagonIE_Sodium_Compat::CRYPTO_GENERICHASH_BYTES;
const CRYPTO_GENERICHASH_BYTES_MIN = ParagonIE_Sodium_Compat::CRYPTO_GENERICHASH_BYTES_MIN;
const CRYPTO_GENERICHASH_BYTES_MAX = ParagonIE_Sodium_Compat::CRYPTO_GENERICHASH_BYTES_MAX;
const CRYPTO_GENERICHASH_KEYBYTES = ParagonIE_Sodium_Compat::CRYPTO_GENERICHASH_KEYBYTES;
const CRYPTO_GENERICHASH_KEYBYTES_MIN = ParagonIE_Sodium_Compat::CRYPTO_GENERICHASH_KEYBYTES_MIN;
const CRYPTO_GENERICHASH_KEYBYTES_MAX = ParagonIE_Sodium_Compat::CRYPTO_GENERICHASH_KEYBYTES_MAX;
const CRYPTO_SCALARMULT_BYTES = ParagonIE_Sodium_Compat::CRYPTO_SCALARMULT_BYTES;
const CRYPTO_SCALARMULT_SCALARBYTES = ParagonIE_Sodium_Compat::CRYPTO_SCALARMULT_SCALARBYTES;
const CRYPTO_SHORTHASH_BYTES = ParagonIE_Sodium_Compat::CRYPTO_SHORTHASH_BYTES;
const CRYPTO_SHORTHASH_KEYBYTES = ParagonIE_Sodium_Compat::CRYPTO_SHORTHASH_KEYBYTES;
const CRYPTO_SECRETBOX_KEYBYTES = ParagonIE_Sodium_Compat::CRYPTO_SECRETBOX_KEYBYTES;
const CRYPTO_SECRETBOX_MACBYTES = ParagonIE_Sodium_Compat::CRYPTO_SECRETBOX_MACBYTES;
const CRYPTO_SECRETBOX_NONCEBYTES = ParagonIE_Sodium_Compat::CRYPTO_SECRETBOX_NONCEBYTES;
const CRYPTO_SIGN_BYTES = ParagonIE_Sodium_Compat::CRYPTO_SIGN_BYTES;
const CRYPTO_SIGN_SEEDBYTES = ParagonIE_Sodium_Compat::CRYPTO_SIGN_SEEDBYTES;
const CRYPTO_SIGN_PUBLICKEYBYTES = ParagonIE_Sodium_Compat::CRYPTO_SIGN_PUBLICKEYBYTES;
const CRYPTO_SIGN_SECRETKEYBYTES = ParagonIE_Sodium_Compat::CRYPTO_SIGN_SECRETKEYBYTES;
const CRYPTO_SIGN_KEYPAIRBYTES = ParagonIE_Sodium_Compat::CRYPTO_SIGN_KEYPAIRBYTES;
const CRYPTO_STREAM_KEYBYTES = ParagonIE_Sodium_Compat::CRYPTO_STREAM_KEYBYTES;
const CRYPTO_STREAM_NONCEBYTES = ParagonIE_Sodium_Compat::CRYPTO_STREAM_NONCEBYTES;

View File

@ -0,0 +1,48 @@
<?php
require_once dirname(dirname(__FILE__)) . '/autoload.php';
if (PHP_VERSION_ID < 50300) {
return;
}
/*
* This file is just for convenience, to allow developers to reduce verbosity when
* they add this project to their libraries.
*
* Replace this:
*
* $x = ParagonIE_Sodium_Compat::crypto_aead_xchacha20poly1305_encrypt(...$args);
*
* with this:
*
* use ParagonIE\Sodium\Compat;
*
* $x = Compat::crypto_aead_xchacha20poly1305_encrypt(...$args);
*/
spl_autoload_register(function ($class) {
if ($class[0] === '\\') {
$class = substr($class, 1);
}
$namespace = 'ParagonIE\\Sodium';
// Does the class use the namespace prefix?
$len = strlen($namespace);
if (strncmp($namespace, $class, $len) !== 0) {
// no, move to the next registered autoloader
return false;
}
// Get the relative class name
$relative_class = substr($class, $len);
// Replace the namespace prefix with the base directory, replace namespace
// separators with directory separators in the relative class name, append
// with .php
$file = dirname(dirname(__FILE__)) . '/namespaced/' . str_replace('\\', '/', $relative_class) . '.php';
// if the file exists, require it
if (file_exists($file)) {
require_once $file;
return true;
}
return false;
});

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,90 @@
<?php
const SODIUM_LIBRARY_MAJOR_VERSION = 9;
const SODIUM_LIBRARY_MINOR_VERSION = 1;
const SODIUM_LIBRARY_VERSION = '1.0.8';
const SODIUM_BASE64_VARIANT_ORIGINAL = 1;
const SODIUM_BASE64_VARIANT_ORIGINAL_NO_PADDING = 3;
const SODIUM_BASE64_VARIANT_URLSAFE = 5;
const SODIUM_BASE64_VARIANT_URLSAFE_NO_PADDING = 7;
const SODIUM_CRYPTO_AEAD_AES256GCM_KEYBYTES = 32;
const SODIUM_CRYPTO_AEAD_AES256GCM_NSECBYTES = 0;
const SODIUM_CRYPTO_AEAD_AES256GCM_NPUBBYTES = 12;
const SODIUM_CRYPTO_AEAD_AES256GCM_ABYTES = 16;
const SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_KEYBYTES = 32;
const SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_NSECBYTES = 0;
const SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_NPUBBYTES = 8;
const SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_ABYTES = 16;
const SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_IETF_KEYBYTES = 32;
const SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_IETF_NSECBYTES = 0;
const SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES = 12;
const SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_IETF_ABYTES = 16;
const SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_KEYBYTES = 32;
const SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NSECBYTES = 0;
const SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NPUBBYTES = 24;
const SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_ABYTES = 16;
const SODIUM_CRYPTO_AUTH_BYTES = 32;
const SODIUM_CRYPTO_AUTH_KEYBYTES = 32;
const SODIUM_CRYPTO_BOX_SEALBYTES = 16;
const SODIUM_CRYPTO_BOX_SECRETKEYBYTES = 32;
const SODIUM_CRYPTO_BOX_PUBLICKEYBYTES = 32;
const SODIUM_CRYPTO_BOX_KEYPAIRBYTES = 64;
const SODIUM_CRYPTO_BOX_MACBYTES = 16;
const SODIUM_CRYPTO_BOX_NONCEBYTES = 24;
const SODIUM_CRYPTO_BOX_SEEDBYTES = 32;
const SODIUM_CRYPTO_KDF_BYTES_MIN = 16;
const SODIUM_CRYPTO_KDF_BYTES_MAX = 64;
const SODIUM_CRYPTO_KDF_CONTEXTBYTES = 8;
const SODIUM_CRYPTO_KDF_KEYBYTES = 32;
const SODIUM_CRYPTO_KX_BYTES = 32;
const SODIUM_CRYPTO_KX_PRIMITIVE = 'x25519blake2b';
const SODIUM_CRYPTO_KX_SEEDBYTES = 32;
const SODIUM_CRYPTO_KX_KEYPAIRBYTES = 64;
const SODIUM_CRYPTO_KX_PUBLICKEYBYTES = 32;
const SODIUM_CRYPTO_KX_SECRETKEYBYTES = 32;
const SODIUM_CRYPTO_KX_SESSIONKEYBYTES = 32;
const SODIUM_CRYPTO_GENERICHASH_BYTES = 32;
const SODIUM_CRYPTO_GENERICHASH_BYTES_MIN = 16;
const SODIUM_CRYPTO_GENERICHASH_BYTES_MAX = 64;
const SODIUM_CRYPTO_GENERICHASH_KEYBYTES = 32;
const SODIUM_CRYPTO_GENERICHASH_KEYBYTES_MIN = 16;
const SODIUM_CRYPTO_GENERICHASH_KEYBYTES_MAX = 64;
const SODIUM_CRYPTO_PWHASH_SALTBYTES = 16;
const SODIUM_CRYPTO_PWHASH_STRPREFIX = '$argon2id$';
const SODIUM_CRYPTO_PWHASH_ALG_ARGON2I13 = 1;
const SODIUM_CRYPTO_PWHASH_ALG_ARGON2ID13 = 2;
const SODIUM_CRYPTO_PWHASH_MEMLIMIT_INTERACTIVE = 33554432;
const SODIUM_CRYPTO_PWHASH_OPSLIMIT_INTERACTIVE = 4;
const SODIUM_CRYPTO_PWHASH_MEMLIMIT_MODERATE = 134217728;
const SODIUM_CRYPTO_PWHASH_OPSLIMIT_MODERATE = 6;
const SODIUM_CRYPTO_PWHASH_MEMLIMIT_SENSITIVE = 536870912;
const SODIUM_CRYPTO_PWHASH_OPSLIMIT_SENSITIVE = 8;
const SODIUM_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_SALTBYTES = 32;
const SODIUM_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_STRPREFIX = '$7$';
const SODIUM_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_OPSLIMIT_INTERACTIVE = 534288;
const SODIUM_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_MEMLIMIT_INTERACTIVE = 16777216;
const SODIUM_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_OPSLIMIT_SENSITIVE = 33554432;
const SODIUM_CRYPTO_PWHASH_SCRYPTSALSA208SHA256_MEMLIMIT_SENSITIVE = 1073741824;
const SODIUM_CRYPTO_SCALARMULT_BYTES = 32;
const SODIUM_CRYPTO_SCALARMULT_SCALARBYTES = 32;
const SODIUM_CRYPTO_SHORTHASH_BYTES = 8;
const SODIUM_CRYPTO_SHORTHASH_KEYBYTES = 16;
const SODIUM_CRYPTO_SECRETBOX_KEYBYTES = 32;
const SODIUM_CRYPTO_SECRETBOX_MACBYTES = 16;
const SODIUM_CRYPTO_SECRETBOX_NONCEBYTES = 24;
const SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_ABYTES = 17;
const SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_HEADERBYTES = 24;
const SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_KEYBYTES = 32;
const SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_TAG_PUSH = 0;
const SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_TAG_PULL = 1;
const SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_TAG_REKEY = 2;
const SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_TAG_FINAL = 3;
const SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_MESSAGEBYTES_MAX = 0x3fffffff80;
const SODIUM_CRYPTO_SIGN_BYTES = 64;
const SODIUM_CRYPTO_SIGN_SEEDBYTES = 32;
const SODIUM_CRYPTO_SIGN_PUBLICKEYBYTES = 32;
const SODIUM_CRYPTO_SIGN_SECRETKEYBYTES = 64;
const SODIUM_CRYPTO_SIGN_KEYPAIRBYTES = 96;
const SODIUM_CRYPTO_STREAM_KEYBYTES = 32;
const SODIUM_CRYPTO_STREAM_NONCEBYTES = 24;

View File

@ -0,0 +1,826 @@
<?php
namespace Sodium;
require_once dirname(dirname(__FILE__)) . '/autoload.php';
use ParagonIE_Sodium_Compat;
/**
* This file will monkey patch the pure-PHP implementation in place of the
* PECL functions, but only if they do not already exist.
*
* Thus, the functions just proxy to the appropriate ParagonIE_Sodium_Compat
* method.
*/
if (!is_callable('\\Sodium\\bin2hex')) {
/**
* @see ParagonIE_Sodium_Compat::bin2hex()
* @param string $string
* @return string
* @throws \SodiumException
* @throws \TypeError
*/
function bin2hex($string)
{
return ParagonIE_Sodium_Compat::bin2hex($string);
}
}
if (!is_callable('\\Sodium\\compare')) {
/**
* @see ParagonIE_Sodium_Compat::compare()
* @param string $a
* @param string $b
* @return int
* @throws \SodiumException
* @throws \TypeError
*/
function compare($a, $b)
{
return ParagonIE_Sodium_Compat::compare($a, $b);
}
}
if (!is_callable('\\Sodium\\crypto_aead_aes256gcm_decrypt')) {
/**
* @see ParagonIE_Sodium_Compat::crypto_aead_aes256gcm_decrypt()
* @param string $message
* @param string $assocData
* @param string $nonce
* @param string $key
* @return string|bool
*/
function crypto_aead_aes256gcm_decrypt($message, $assocData, $nonce, $key)
{
try {
return ParagonIE_Sodium_Compat::crypto_aead_aes256gcm_decrypt($message, $assocData, $nonce, $key);
} catch (\TypeError $ex) {
return false;
} catch (\SodiumException $ex) {
return false;
}
}
}
if (!is_callable('\\Sodium\\crypto_aead_aes256gcm_encrypt')) {
/**
* @see ParagonIE_Sodium_Compat::crypto_aead_aes256gcm_encrypt()
* @param string $message
* @param string $assocData
* @param string $nonce
* @param string $key
* @return string
* @throws \SodiumException
* @throws \TypeError
*/
function crypto_aead_aes256gcm_encrypt($message, $assocData, $nonce, $key)
{
return ParagonIE_Sodium_Compat::crypto_aead_aes256gcm_encrypt($message, $assocData, $nonce, $key);
}
}
if (!is_callable('\\Sodium\\crypto_aead_aes256gcm_is_available')) {
/**
* @see ParagonIE_Sodium_Compat::crypto_aead_aes256gcm_is_available()
* @return bool
*/
function crypto_aead_aes256gcm_is_available()
{
return ParagonIE_Sodium_Compat::crypto_aead_aes256gcm_is_available();
}
}
if (!is_callable('\\Sodium\\crypto_aead_chacha20poly1305_decrypt')) {
/**
* @see ParagonIE_Sodium_Compat::crypto_aead_chacha20poly1305_decrypt()
* @param string $message
* @param string $assocData
* @param string $nonce
* @param string $key
* @return string|bool
*/
function crypto_aead_chacha20poly1305_decrypt($message, $assocData, $nonce, $key)
{
try {
return ParagonIE_Sodium_Compat::crypto_aead_chacha20poly1305_decrypt($message, $assocData, $nonce, $key);
} catch (\TypeError $ex) {
return false;
} catch (\SodiumException $ex) {
return false;
}
}
}
if (!is_callable('\\Sodium\\crypto_aead_chacha20poly1305_encrypt')) {
/**
* @see ParagonIE_Sodium_Compat::crypto_aead_chacha20poly1305_encrypt()
* @param string $message
* @param string $assocData
* @param string $nonce
* @param string $key
* @return string
* @throws \SodiumException
* @throws \TypeError
*/
function crypto_aead_chacha20poly1305_encrypt($message, $assocData, $nonce, $key)
{
return ParagonIE_Sodium_Compat::crypto_aead_chacha20poly1305_encrypt($message, $assocData, $nonce, $key);
}
}
if (!is_callable('\\Sodium\\crypto_aead_chacha20poly1305_ietf_decrypt')) {
/**
* @see ParagonIE_Sodium_Compat::crypto_aead_chacha20poly1305_ietf_decrypt()
* @param string $message
* @param string $assocData
* @param string $nonce
* @param string $key
* @return string|bool
*/
function crypto_aead_chacha20poly1305_ietf_decrypt($message, $assocData, $nonce, $key)
{
try {
return ParagonIE_Sodium_Compat::crypto_aead_chacha20poly1305_ietf_decrypt($message, $assocData, $nonce, $key);
} catch (\TypeError $ex) {
return false;
} catch (\SodiumException $ex) {
return false;
}
}
}
if (!is_callable('\\Sodium\\crypto_aead_chacha20poly1305_ietf_encrypt')) {
/**
* @see ParagonIE_Sodium_Compat::crypto_aead_chacha20poly1305_ietf_encrypt()
* @param string $message
* @param string $assocData
* @param string $nonce
* @param string $key
* @return string
* @throws \SodiumException
* @throws \TypeError
*/
function crypto_aead_chacha20poly1305_ietf_encrypt($message, $assocData, $nonce, $key)
{
return ParagonIE_Sodium_Compat::crypto_aead_chacha20poly1305_ietf_encrypt($message, $assocData, $nonce, $key);
}
}
if (!is_callable('\\Sodium\\crypto_auth')) {
/**
* @see ParagonIE_Sodium_Compat::crypto_auth()
* @param string $message
* @param string $key
* @return string
* @throws \SodiumException
* @throws \TypeError
*/
function crypto_auth($message, $key)
{
return ParagonIE_Sodium_Compat::crypto_auth($message, $key);
}
}
if (!is_callable('\\Sodium\\crypto_auth_verify')) {
/**
* @see ParagonIE_Sodium_Compat::crypto_auth_verify()
* @param string $mac
* @param string $message
* @param string $key
* @return bool
* @throws \SodiumException
* @throws \TypeError
*/
function crypto_auth_verify($mac, $message, $key)
{
return ParagonIE_Sodium_Compat::crypto_auth_verify($mac, $message, $key);
}
}
if (!is_callable('\\Sodium\\crypto_box')) {
/**
* @see ParagonIE_Sodium_Compat::crypto_box()
* @param string $message
* @param string $nonce
* @param string $kp
* @return string
* @throws \SodiumException
* @throws \TypeError
*/
function crypto_box($message, $nonce, $kp)
{
return ParagonIE_Sodium_Compat::crypto_box($message, $nonce, $kp);
}
}
if (!is_callable('\\Sodium\\crypto_box_keypair')) {
/**
* @see ParagonIE_Sodium_Compat::crypto_box_keypair()
* @return string
* @throws \SodiumException
* @throws \TypeError
*/
function crypto_box_keypair()
{
return ParagonIE_Sodium_Compat::crypto_box_keypair();
}
}
if (!is_callable('\\Sodium\\crypto_box_keypair_from_secretkey_and_publickey')) {
/**
* @see ParagonIE_Sodium_Compat::crypto_box_keypair_from_secretkey_and_publickey()
* @param string $sk
* @param string $pk
* @return string
* @throws \SodiumException
* @throws \TypeError
*/
function crypto_box_keypair_from_secretkey_and_publickey($sk, $pk)
{
return ParagonIE_Sodium_Compat::crypto_box_keypair_from_secretkey_and_publickey($sk, $pk);
}
}
if (!is_callable('\\Sodium\\crypto_box_open')) {
/**
* @see ParagonIE_Sodium_Compat::crypto_box_open()
* @param string $message
* @param string $nonce
* @param string $kp
* @return string|bool
*/
function crypto_box_open($message, $nonce, $kp)
{
try {
return ParagonIE_Sodium_Compat::crypto_box_open($message, $nonce, $kp);
} catch (\TypeError $ex) {
return false;
} catch (\SodiumException $ex) {
return false;
}
}
}
if (!is_callable('\\Sodium\\crypto_box_publickey')) {
/**
* @see ParagonIE_Sodium_Compat::crypto_box_publickey()
* @param string $keypair
* @return string
* @throws \SodiumException
* @throws \TypeError
*/
function crypto_box_publickey($keypair)
{
return ParagonIE_Sodium_Compat::crypto_box_publickey($keypair);
}
}
if (!is_callable('\\Sodium\\crypto_box_publickey_from_secretkey')) {
/**
* @see ParagonIE_Sodium_Compat::crypto_box_publickey_from_secretkey()
* @param string $sk
* @return string
* @throws \SodiumException
* @throws \TypeError
*/
function crypto_box_publickey_from_secretkey($sk)
{
return ParagonIE_Sodium_Compat::crypto_box_publickey_from_secretkey($sk);
}
}
if (!is_callable('\\Sodium\\crypto_box_seal')) {
/**
* @see ParagonIE_Sodium_Compat::crypto_box_seal_open()
* @param string $message
* @param string $publicKey
* @return string
* @throws \SodiumException
* @throws \TypeError
*/
function crypto_box_seal($message, $publicKey)
{
return ParagonIE_Sodium_Compat::crypto_box_seal($message, $publicKey);
}
}
if (!is_callable('\\Sodium\\crypto_box_seal_open')) {
/**
* @see ParagonIE_Sodium_Compat::crypto_box_seal_open()
* @param string $message
* @param string $kp
* @return string|bool
*/
function crypto_box_seal_open($message, $kp)
{
try {
return ParagonIE_Sodium_Compat::crypto_box_seal_open($message, $kp);
} catch (\TypeError $ex) {
return false;
} catch (\SodiumException $ex) {
return false;
}
}
}
if (!is_callable('\\Sodium\\crypto_box_secretkey')) {
/**
* @see ParagonIE_Sodium_Compat::crypto_box_secretkey()
* @param string $keypair
* @return string
* @throws \SodiumException
* @throws \TypeError
*/
function crypto_box_secretkey($keypair)
{
return ParagonIE_Sodium_Compat::crypto_box_secretkey($keypair);
}
}
if (!is_callable('\\Sodium\\crypto_generichash')) {
/**
* @see ParagonIE_Sodium_Compat::crypto_generichash()
* @param string $message
* @param string|null $key
* @param int $outLen
* @return string
* @throws \SodiumException
* @throws \TypeError
*/
function crypto_generichash($message, $key = null, $outLen = 32)
{
return ParagonIE_Sodium_Compat::crypto_generichash($message, $key, $outLen);
}
}
if (!is_callable('\\Sodium\\crypto_generichash_final')) {
/**
* @see ParagonIE_Sodium_Compat::crypto_generichash_final()
* @param string|null $ctx
* @param int $outputLength
* @return string
* @throws \SodiumException
* @throws \TypeError
*/
function crypto_generichash_final(&$ctx, $outputLength = 32)
{
return ParagonIE_Sodium_Compat::crypto_generichash_final($ctx, $outputLength);
}
}
if (!is_callable('\\Sodium\\crypto_generichash_init')) {
/**
* @see ParagonIE_Sodium_Compat::crypto_generichash_init()
* @param string|null $key
* @param int $outLen
* @return string
* @throws \SodiumException
* @throws \TypeError
*/
function crypto_generichash_init($key = null, $outLen = 32)
{
return ParagonIE_Sodium_Compat::crypto_generichash_init($key, $outLen);
}
}
if (!is_callable('\\Sodium\\crypto_generichash_update')) {
/**
* @see ParagonIE_Sodium_Compat::crypto_generichash_update()
* @param string|null $ctx
* @param string $message
* @return void
* @throws \SodiumException
* @throws \TypeError
*/
function crypto_generichash_update(&$ctx, $message = '')
{
ParagonIE_Sodium_Compat::crypto_generichash_update($ctx, $message);
}
}
if (!is_callable('\\Sodium\\crypto_kx')) {
/**
* @see ParagonIE_Sodium_Compat::crypto_kx()
* @param string $my_secret
* @param string $their_public
* @param string $client_public
* @param string $server_public
* @return string
* @throws \SodiumException
* @throws \TypeError
*/
function crypto_kx($my_secret, $their_public, $client_public, $server_public)
{
return ParagonIE_Sodium_Compat::crypto_kx(
$my_secret,
$their_public,
$client_public,
$server_public
);
}
}
if (!is_callable('\\Sodium\\crypto_pwhash')) {
/**
* @see ParagonIE_Sodium_Compat::crypto_pwhash()
* @param int $outlen
* @param string $passwd
* @param string $salt
* @param int $opslimit
* @param int $memlimit
* @return string
* @throws \SodiumException
* @throws \TypeError
*/
function crypto_pwhash($outlen, $passwd, $salt, $opslimit, $memlimit)
{
return ParagonIE_Sodium_Compat::crypto_pwhash($outlen, $passwd, $salt, $opslimit, $memlimit);
}
}
if (!is_callable('\\Sodium\\crypto_pwhash_str')) {
/**
* @see ParagonIE_Sodium_Compat::crypto_pwhash_str()
* @param string $passwd
* @param int $opslimit
* @param int $memlimit
* @return string
* @throws \SodiumException
* @throws \TypeError
*/
function crypto_pwhash_str($passwd, $opslimit, $memlimit)
{
return ParagonIE_Sodium_Compat::crypto_pwhash_str($passwd, $opslimit, $memlimit);
}
}
if (!is_callable('\\Sodium\\crypto_pwhash_str_verify')) {
/**
* @see ParagonIE_Sodium_Compat::crypto_pwhash_str_verify()
* @param string $passwd
* @param string $hash
* @return bool
* @throws \SodiumException
* @throws \TypeError
*/
function crypto_pwhash_str_verify($passwd, $hash)
{
return ParagonIE_Sodium_Compat::crypto_pwhash_str_verify($passwd, $hash);
}
}
if (!is_callable('\\Sodium\\crypto_pwhash_scryptsalsa208sha256')) {
/**
* @see ParagonIE_Sodium_Compat::crypto_pwhash_scryptsalsa208sha256()
* @param int $outlen
* @param string $passwd
* @param string $salt
* @param int $opslimit
* @param int $memlimit
* @return string
* @throws \SodiumException
* @throws \TypeError
*/
function crypto_pwhash_scryptsalsa208sha256($outlen, $passwd, $salt, $opslimit, $memlimit)
{
return ParagonIE_Sodium_Compat::crypto_pwhash_scryptsalsa208sha256($outlen, $passwd, $salt, $opslimit, $memlimit);
}
}
if (!is_callable('\\Sodium\\crypto_pwhash_scryptsalsa208sha256_str')) {
/**
* @see ParagonIE_Sodium_Compat::crypto_pwhash_scryptsalsa208sha256_str()
* @param string $passwd
* @param int $opslimit
* @param int $memlimit
* @return string
* @throws \SodiumException
* @throws \TypeError
*/
function crypto_pwhash_scryptsalsa208sha256_str($passwd, $opslimit, $memlimit)
{
return ParagonIE_Sodium_Compat::crypto_pwhash_scryptsalsa208sha256_str($passwd, $opslimit, $memlimit);
}
}
if (!is_callable('\\Sodium\\crypto_pwhash_scryptsalsa208sha256_str_verify')) {
/**
* @see ParagonIE_Sodium_Compat::crypto_pwhash_scryptsalsa208sha256_str_verify()
* @param string $passwd
* @param string $hash
* @return bool
* @throws \SodiumException
* @throws \TypeError
*/
function crypto_pwhash_scryptsalsa208sha256_str_verify($passwd, $hash)
{
return ParagonIE_Sodium_Compat::crypto_pwhash_scryptsalsa208sha256_str_verify($passwd, $hash);
}
}
if (!is_callable('\\Sodium\\crypto_scalarmult')) {
/**
* @see ParagonIE_Sodium_Compat::crypto_scalarmult()
* @param string $n
* @param string $p
* @return string
* @throws \SodiumException
* @throws \TypeError
*/
function crypto_scalarmult($n, $p)
{
return ParagonIE_Sodium_Compat::crypto_scalarmult($n, $p);
}
}
if (!is_callable('\\Sodium\\crypto_scalarmult_base')) {
/**
* @see ParagonIE_Sodium_Compat::crypto_scalarmult_base()
* @param string $n
* @return string
* @throws \SodiumException
* @throws \TypeError
*/
function crypto_scalarmult_base($n)
{
return ParagonIE_Sodium_Compat::crypto_scalarmult_base($n);
}
}
if (!is_callable('\\Sodium\\crypto_secretbox')) {
/**
* @see ParagonIE_Sodium_Compat::crypto_secretbox()
* @param string $message
* @param string $nonce
* @param string $key
* @return string
* @throws \SodiumException
* @throws \TypeError
*/
function crypto_secretbox($message, $nonce, $key)
{
return ParagonIE_Sodium_Compat::crypto_secretbox($message, $nonce, $key);
}
}
if (!is_callable('\\Sodium\\crypto_secretbox_open')) {
/**
* @see ParagonIE_Sodium_Compat::crypto_secretbox_open()
* @param string $message
* @param string $nonce
* @param string $key
* @return string|bool
*/
function crypto_secretbox_open($message, $nonce, $key)
{
try {
return ParagonIE_Sodium_Compat::crypto_secretbox_open($message, $nonce, $key);
} catch (\TypeError $ex) {
return false;
} catch (\SodiumException $ex) {
return false;
}
}
}
if (!is_callable('\\Sodium\\crypto_shorthash')) {
/**
* @see ParagonIE_Sodium_Compat::crypto_shorthash()
* @param string $message
* @param string $key
* @return string
* @throws \SodiumException
* @throws \TypeError
*/
function crypto_shorthash($message, $key = '')
{
return ParagonIE_Sodium_Compat::crypto_shorthash($message, $key);
}
}
if (!is_callable('\\Sodium\\crypto_sign')) {
/**
* @see ParagonIE_Sodium_Compat::crypto_sign()
* @param string $message
* @param string $sk
* @return string
* @throws \SodiumException
* @throws \TypeError
*/
function crypto_sign($message, $sk)
{
return ParagonIE_Sodium_Compat::crypto_sign($message, $sk);
}
}
if (!is_callable('\\Sodium\\crypto_sign_detached')) {
/**
* @see ParagonIE_Sodium_Compat::crypto_sign_detached()
* @param string $message
* @param string $sk
* @return string
* @throws \SodiumException
* @throws \TypeError
*/
function crypto_sign_detached($message, $sk)
{
return ParagonIE_Sodium_Compat::crypto_sign_detached($message, $sk);
}
}
if (!is_callable('\\Sodium\\crypto_sign_keypair')) {
/**
* @see ParagonIE_Sodium_Compat::crypto_sign_keypair()
* @return string
* @throws \SodiumException
* @throws \TypeError
*/
function crypto_sign_keypair()
{
return ParagonIE_Sodium_Compat::crypto_sign_keypair();
}
}
if (!is_callable('\\Sodium\\crypto_sign_open')) {
/**
* @see ParagonIE_Sodium_Compat::crypto_sign_open()
* @param string $signedMessage
* @param string $pk
* @return string|bool
*/
function crypto_sign_open($signedMessage, $pk)
{
try {
return ParagonIE_Sodium_Compat::crypto_sign_open($signedMessage, $pk);
} catch (\TypeError $ex) {
return false;
} catch (\SodiumException $ex) {
return false;
}
}
}
if (!is_callable('\\Sodium\\crypto_sign_publickey')) {
/**
* @see ParagonIE_Sodium_Compat::crypto_sign_publickey()
* @param string $keypair
* @return string
* @throws \SodiumException
* @throws \TypeError
*/
function crypto_sign_publickey($keypair)
{
return ParagonIE_Sodium_Compat::crypto_sign_publickey($keypair);
}
}
if (!is_callable('\\Sodium\\crypto_sign_publickey_from_secretkey')) {
/**
* @see ParagonIE_Sodium_Compat::crypto_sign_publickey_from_secretkey()
* @param string $sk
* @return string
* @throws \SodiumException
* @throws \TypeError
*/
function crypto_sign_publickey_from_secretkey($sk)
{
return ParagonIE_Sodium_Compat::crypto_sign_publickey_from_secretkey($sk);
}
}
if (!is_callable('\\Sodium\\crypto_sign_secretkey')) {
/**
* @see ParagonIE_Sodium_Compat::crypto_sign_secretkey()
* @param string $keypair
* @return string
* @throws \SodiumException
* @throws \TypeError
*/
function crypto_sign_secretkey($keypair)
{
return ParagonIE_Sodium_Compat::crypto_sign_secretkey($keypair);
}
}
if (!is_callable('\\Sodium\\crypto_sign_seed_keypair')) {
/**
* @see ParagonIE_Sodium_Compat::crypto_sign_seed_keypair()
* @param string $seed
* @return string
* @throws \SodiumException
* @throws \TypeError
*/
function crypto_sign_seed_keypair($seed)
{
return ParagonIE_Sodium_Compat::crypto_sign_seed_keypair($seed);
}
}
if (!is_callable('\\Sodium\\crypto_sign_verify_detached')) {
/**
* @see ParagonIE_Sodium_Compat::crypto_sign_verify_detached()
* @param string $signature
* @param string $message
* @param string $pk
* @return bool
* @throws \SodiumException
* @throws \TypeError
*/
function crypto_sign_verify_detached($signature, $message, $pk)
{
return ParagonIE_Sodium_Compat::crypto_sign_verify_detached($signature, $message, $pk);
}
}
if (!is_callable('\\Sodium\\crypto_sign_ed25519_pk_to_curve25519')) {
/**
* @see ParagonIE_Sodium_Compat::crypto_sign_ed25519_pk_to_curve25519()
* @param string $pk
* @return string
* @throws \SodiumException
* @throws \TypeError
*/
function crypto_sign_ed25519_pk_to_curve25519($pk)
{
return ParagonIE_Sodium_Compat::crypto_sign_ed25519_pk_to_curve25519($pk);
}
}
if (!is_callable('\\Sodium\\crypto_sign_ed25519_sk_to_curve25519')) {
/**
* @see ParagonIE_Sodium_Compat::crypto_sign_ed25519_sk_to_curve25519()
* @param string $sk
* @return string
* @throws \SodiumException
* @throws \TypeError
*/
function crypto_sign_ed25519_sk_to_curve25519($sk)
{
return ParagonIE_Sodium_Compat::crypto_sign_ed25519_sk_to_curve25519($sk);
}
}
if (!is_callable('\\Sodium\\crypto_stream')) {
/**
* @see ParagonIE_Sodium_Compat::crypto_stream()
* @param int $len
* @param string $nonce
* @param string $key
* @return string
* @throws \SodiumException
* @throws \TypeError
*/
function crypto_stream($len, $nonce, $key)
{
return ParagonIE_Sodium_Compat::crypto_stream($len, $nonce, $key);
}
}
if (!is_callable('\\Sodium\\crypto_stream_xor')) {
/**
* @see ParagonIE_Sodium_Compat::crypto_stream_xor()
* @param string $message
* @param string $nonce
* @param string $key
* @return string
* @throws \SodiumException
* @throws \TypeError
*/
function crypto_stream_xor($message, $nonce, $key)
{
return ParagonIE_Sodium_Compat::crypto_stream_xor($message, $nonce, $key);
}
}
if (!is_callable('\\Sodium\\hex2bin')) {
/**
* @see ParagonIE_Sodium_Compat::hex2bin()
* @param string $string
* @return string
* @throws \SodiumException
* @throws \TypeError
*/
function hex2bin($string)
{
return ParagonIE_Sodium_Compat::hex2bin($string);
}
}
if (!is_callable('\\Sodium\\memcmp')) {
/**
* @see ParagonIE_Sodium_Compat::memcmp()
* @param string $a
* @param string $b
* @return int
* @throws \SodiumException
* @throws \TypeError
*/
function memcmp($a, $b)
{
return ParagonIE_Sodium_Compat::memcmp($a, $b);
}
}
if (!is_callable('\\Sodium\\memzero')) {
/**
* @see ParagonIE_Sodium_Compat::memzero()
* @param string $str
* @return void
* @throws \SodiumException
* @throws \TypeError
*/
function memzero(&$str)
{
ParagonIE_Sodium_Compat::memzero($str);
}
}
if (!is_callable('\\Sodium\\randombytes_buf')) {
/**
* @see ParagonIE_Sodium_Compat::randombytes_buf()
* @param int $amount
* @return string
* @throws \TypeError
*/
function randombytes_buf($amount)
{
return ParagonIE_Sodium_Compat::randombytes_buf($amount);
}
}
if (!is_callable('\\Sodium\\randombytes_uniform')) {
/**
* @see ParagonIE_Sodium_Compat::randombytes_uniform()
* @param int $upperLimit
* @return int
* @throws \SodiumException
* @throws \Error
*/
function randombytes_uniform($upperLimit)
{
return ParagonIE_Sodium_Compat::randombytes_uniform($upperLimit);
}
}
if (!is_callable('\\Sodium\\randombytes_random16')) {
/**
* @see ParagonIE_Sodium_Compat::randombytes_random16()
* @return int
*/
function randombytes_random16()
{
return ParagonIE_Sodium_Compat::randombytes_random16();
}
}
if (!defined('\\Sodium\\CRYPTO_AUTH_BYTES')) {
require_once dirname(__FILE__) . '/constants.php';
}

View File

@ -0,0 +1,7 @@
<?php
namespace ParagonIE\Sodium;
class Compat extends \ParagonIE_Sodium_Compat
{
}

View File

@ -0,0 +1,7 @@
<?php
namespace ParagonIE\Sodium\Core;
class BLAKE2b extends \ParagonIE_Sodium_Core_BLAKE2b
{
}

View File

@ -0,0 +1,7 @@
<?php
namespace ParagonIE\Sodium\Core;
class ChaCha20 extends \ParagonIE_Sodium_Core_ChaCha20
{
}

View File

@ -0,0 +1,7 @@
<?php
namespace ParagonIE\Sodium\Core\ChaCha20;
class Ctx extends \ParagonIE_Sodium_Core_ChaCha20_Ctx
{
}

View File

@ -0,0 +1,7 @@
<?php
namespace ParagonIE\Sodium\Core\ChaCha20;
class IetfCtx extends \ParagonIE_Sodium_Core_ChaCha20_IetfCtx
{
}

View File

@ -0,0 +1,7 @@
<?php
namespace ParagonIE\Sodium\Core;
class Curve25519 extends \ParagonIE_Sodium_Core_Curve25519
{
}

View File

@ -0,0 +1,7 @@
<?php
namespace ParagonIE\Sodium\Core\Curve25519;
class Fe extends \ParagonIE_Sodium_Core_Curve25519_Fe
{
}

View File

@ -0,0 +1,7 @@
<?php
namespace ParagonIE\Sodium\Core\Curve25519\Ge;
class Cached extends \ParagonIE_Sodium_Core_Curve25519_Ge_Cached
{
}

View File

@ -0,0 +1,7 @@
<?php
namespace ParagonIE\Sodium\Core\Curve25519\Ge;
class P1p1 extends \ParagonIE_Sodium_Core_Curve25519_Ge_P1p1
{
}

View File

@ -0,0 +1,7 @@
<?php
namespace ParagonIE\Sodium\Core\Curve25519\Ge;
class P2 extends \ParagonIE_Sodium_Core_Curve25519_Ge_P2
{
}

View File

@ -0,0 +1,7 @@
<?php
namespace ParagonIE\Sodium\Core\Curve25519\Ge;
class P3 extends \ParagonIE_Sodium_Core_Curve25519_Ge_P3
{
}

View File

@ -0,0 +1,7 @@
<?php
namespace ParagonIE\Sodium\Core\Curve25519\Ge;
class Precomp extends \ParagonIE_Sodium_Core_Curve25519_Ge_Precomp
{
}

View File

@ -0,0 +1,7 @@
<?php
namespace ParagonIE\Sodium\Core\Curve25519;
class H extends \ParagonIE_Sodium_Core_Curve25519_H
{
}

View File

@ -0,0 +1,7 @@
<?php
namespace ParagonIE\Sodium\Core;
class Ed25519 extends \ParagonIE_Sodium_Core_Ed25519
{
}

View File

@ -0,0 +1,7 @@
<?php
namespace ParagonIE\Sodium\Core;
class HChaCha20 extends \ParagonIE_Sodium_Core_HChaCha20
{
}

View File

@ -0,0 +1,7 @@
<?php
namespace ParagonIE\Sodium\Core;
class HSalsa20 extends \ParagonIE_Sodium_Core_HSalsa20
{
}

View File

@ -0,0 +1,7 @@
<?php
namespace ParagonIE\Sodium\Core;
class Poly1305 extends \ParagonIE_Sodium_Core_Poly1305
{
}

View File

@ -0,0 +1,7 @@
<?php
namespace ParagonIE\Sodium\Core\Poly1305;
class State extends \ParagonIE_Sodium_Core_Poly1305_State
{
}

View File

@ -0,0 +1,7 @@
<?php
namespace ParagonIE\Sodium\Core;
class Salsa20 extends \ParagonIE_Sodium_Core_Salsa20
{
}

View File

@ -0,0 +1,7 @@
<?php
namespace ParagonIE\Sodium\Core;
class SipHash extends \ParagonIE_Sodium_Core_SipHash
{
}

View File

@ -0,0 +1,7 @@
<?php
namespace ParagonIE\Sodium\Core;
class Util extends \ParagonIE_Sodium_Core_Util
{
}

View File

@ -0,0 +1,7 @@
<?php
namespace ParagonIE\Sodium\Core;
class X25519 extends \ParagonIE_Sodium_Core_X25519
{
}

View File

@ -0,0 +1,7 @@
<?php
namespace ParagonIE\Sodium\Core;
class XChaCha20 extends \ParagonIE_Sodium_Core_XChaCha20
{
}

View File

@ -0,0 +1,7 @@
<?php
namespace ParagonIE\Sodium\Core;
class Xsalsa20 extends \ParagonIE_Sodium_Core_XSalsa20
{
}

View File

@ -0,0 +1,7 @@
<?php
namespace ParagonIE\Sodium;
class Crypto extends \ParagonIE_Sodium_Crypto
{
}

View File

@ -0,0 +1,7 @@
<?php
namespace ParagonIE\Sodium;
class File extends \ParagonIE_Sodium_File
{
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,789 @@
<?php
if (class_exists('ParagonIE_Sodium_Core_BLAKE2b', false)) {
return;
}
/**
* Class ParagonIE_Sodium_Core_BLAKE2b
*
* Based on the work of Devi Mandiri in devi/salt.
*/
abstract class ParagonIE_Sodium_Core_BLAKE2b extends ParagonIE_Sodium_Core_Util
{
/**
* @var SplFixedArray
*/
protected static $iv;
/**
* @var array<int, array<int, int>>
*/
protected static $sigma = array(
array( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15),
array( 14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3),
array( 11, 8, 12, 0, 5, 2, 15, 13, 10, 14, 3, 6, 7, 1, 9, 4),
array( 7, 9, 3, 1, 13, 12, 11, 14, 2, 6, 5, 10, 4, 0, 15, 8),
array( 9, 0, 5, 7, 2, 4, 10, 15, 14, 1, 11, 12, 6, 8, 3, 13),
array( 2, 12, 6, 10, 0, 11, 8, 3, 4, 13, 7, 5, 15, 14, 1, 9),
array( 12, 5, 1, 15, 14, 13, 4, 10, 0, 7, 6, 3, 9, 2, 8, 11),
array( 13, 11, 7, 14, 12, 1, 3, 9, 5, 0, 15, 4, 8, 6, 2, 10),
array( 6, 15, 14, 9, 11, 3, 0, 8, 12, 2, 13, 7, 1, 4, 10, 5),
array( 10, 2, 8, 4, 7, 6, 1, 5, 15, 11, 9, 14, 3, 12, 13 , 0),
array( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15),
array( 14, 10, 4, 8, 9, 15, 13, 6, 1, 12, 0, 2, 11, 7, 5, 3)
);
const BLOCKBYTES = 128;
const OUTBYTES = 64;
const KEYBYTES = 64;
/**
* Turn two 32-bit integers into a fixed array representing a 64-bit integer.
*
* @internal You should not use this directly from another application
*
* @param int $high
* @param int $low
* @return SplFixedArray
* @psalm-suppress MixedAssignment
*/
public static function new64($high, $low)
{
$i64 = new SplFixedArray(2);
$i64[0] = $high & 0xffffffff;
$i64[1] = $low & 0xffffffff;
return $i64;
}
/**
* Convert an arbitrary number into an SplFixedArray of two 32-bit integers
* that represents a 64-bit integer.
*
* @internal You should not use this directly from another application
*
* @param int $num
* @return SplFixedArray
*/
protected static function to64($num)
{
list($hi, $lo) = self::numericTo64BitInteger($num);
return self::new64($hi, $lo);
}
/**
* Adds two 64-bit integers together, returning their sum as a SplFixedArray
* containing two 32-bit integers (representing a 64-bit integer).
*
* @internal You should not use this directly from another application
*
* @param SplFixedArray $x
* @param SplFixedArray $y
* @return SplFixedArray
* @psalm-suppress MixedArgument
* @psalm-suppress MixedAssignment
* @psalm-suppress MixedOperand
*/
protected static function add64($x, $y)
{
$l = ($x[1] + $y[1]) & 0xffffffff;
return self::new64(
(int) ($x[0] + $y[0] + (
($l < $x[1]) ? 1 : 0
)),
(int) $l
);
}
/**
* @internal You should not use this directly from another application
*
* @param SplFixedArray $x
* @param SplFixedArray $y
* @param SplFixedArray $z
* @return SplFixedArray
*/
protected static function add364($x, $y, $z)
{
return self::add64($x, self::add64($y, $z));
}
/**
* @internal You should not use this directly from another application
*
* @param SplFixedArray $x
* @param SplFixedArray $y
* @return SplFixedArray
* @throws SodiumException
* @throws TypeError
*/
protected static function xor64(SplFixedArray $x, SplFixedArray $y)
{
if (!is_numeric($x[0])) {
throw new SodiumException('x[0] is not an integer');
}
if (!is_numeric($x[1])) {
throw new SodiumException('x[1] is not an integer');
}
if (!is_numeric($y[0])) {
throw new SodiumException('y[0] is not an integer');
}
if (!is_numeric($y[1])) {
throw new SodiumException('y[1] is not an integer');
}
return self::new64(
(int) (($x[0] ^ $y[0]) & 0xffffffff),
(int) (($x[1] ^ $y[1]) & 0xffffffff)
);
}
/**
* @internal You should not use this directly from another application
*
* @param SplFixedArray $x
* @param int $c
* @return SplFixedArray
* @psalm-suppress MixedAssignment
*/
public static function rotr64($x, $c)
{
if ($c >= 64) {
$c %= 64;
}
if ($c >= 32) {
/** @var int $tmp */
$tmp = $x[0];
$x[0] = $x[1];
$x[1] = $tmp;
$c -= 32;
}
if ($c === 0) {
return $x;
}
$l0 = 0;
$c = 64 - $c;
if ($c < 32) {
/** @var int $h0 */
$h0 = ((int) ($x[0]) << $c) | (
(
(int) ($x[1]) & ((1 << $c) - 1)
<<
(32 - $c)
) >> (32 - $c)
);
/** @var int $l0 */
$l0 = (int) ($x[1]) << $c;
} else {
/** @var int $h0 */
$h0 = (int) ($x[1]) << ($c - 32);
}
$h1 = 0;
$c1 = 64 - $c;
if ($c1 < 32) {
/** @var int $h1 */
$h1 = (int) ($x[0]) >> $c1;
/** @var int $l1 */
$l1 = ((int) ($x[1]) >> $c1) | ((int) ($x[0]) & ((1 << $c1) - 1)) << (32 - $c1);
} else {
/** @var int $l1 */
$l1 = (int) ($x[0]) >> ($c1 - 32);
}
return self::new64($h0 | $h1, $l0 | $l1);
}
/**
* @internal You should not use this directly from another application
*
* @param SplFixedArray $x
* @return int
* @psalm-suppress MixedOperand
*/
protected static function flatten64($x)
{
return (int) ($x[0] * 4294967296 + $x[1]);
}
/**
* @internal You should not use this directly from another application
*
* @param SplFixedArray $x
* @param int $i
* @return SplFixedArray
* @psalm-suppress MixedArgument
* @psalm-suppress MixedArrayOffset
*/
protected static function load64(SplFixedArray $x, $i)
{
/** @var int $l */
$l = (int) ($x[$i])
| ((int) ($x[$i+1]) << 8)
| ((int) ($x[$i+2]) << 16)
| ((int) ($x[$i+3]) << 24);
/** @var int $h */
$h = (int) ($x[$i+4])
| ((int) ($x[$i+5]) << 8)
| ((int) ($x[$i+6]) << 16)
| ((int) ($x[$i+7]) << 24);
return self::new64($h, $l);
}
/**
* @internal You should not use this directly from another application
*
* @param SplFixedArray $x
* @param int $i
* @param SplFixedArray $u
* @return void
* @psalm-suppress MixedAssignment
*/
protected static function store64(SplFixedArray $x, $i, SplFixedArray $u)
{
$maxLength = $x->getSize() - 1;
for ($j = 0; $j < 8; ++$j) {
/*
[0, 1, 2, 3, 4, 5, 6, 7]
... becomes ...
[0, 0, 0, 0, 1, 1, 1, 1]
*/
/** @var int $uIdx */
$uIdx = ((7 - $j) & 4) >> 2;
$x[$i] = ((int) ($u[$uIdx]) & 0xff);
if (++$i > $maxLength) {
return;
}
/** @psalm-suppress MixedOperand */
$u[$uIdx] >>= 8;
}
}
/**
* This just sets the $iv static variable.
*
* @internal You should not use this directly from another application
*
* @return void
*/
public static function pseudoConstructor()
{
static $called = false;
if ($called) {
return;
}
self::$iv = new SplFixedArray(8);
self::$iv[0] = self::new64(0x6a09e667, 0xf3bcc908);
self::$iv[1] = self::new64(0xbb67ae85, 0x84caa73b);
self::$iv[2] = self::new64(0x3c6ef372, 0xfe94f82b);
self::$iv[3] = self::new64(0xa54ff53a, 0x5f1d36f1);
self::$iv[4] = self::new64(0x510e527f, 0xade682d1);
self::$iv[5] = self::new64(0x9b05688c, 0x2b3e6c1f);
self::$iv[6] = self::new64(0x1f83d9ab, 0xfb41bd6b);
self::$iv[7] = self::new64(0x5be0cd19, 0x137e2179);
$called = true;
}
/**
* Returns a fresh BLAKE2 context.
*
* @internal You should not use this directly from another application
*
* @return SplFixedArray
* @psalm-suppress MixedAssignment
* @psalm-suppress MixedArrayAccess
* @psalm-suppress MixedArrayAssignment
*/
protected static function context()
{
$ctx = new SplFixedArray(6);
$ctx[0] = new SplFixedArray(8); // h
$ctx[1] = new SplFixedArray(2); // t
$ctx[2] = new SplFixedArray(2); // f
$ctx[3] = new SplFixedArray(256); // buf
$ctx[4] = 0; // buflen
$ctx[5] = 0; // last_node (uint8_t)
for ($i = 8; $i--;) {
$ctx[0][$i] = self::$iv[$i];
}
for ($i = 256; $i--;) {
$ctx[3][$i] = 0;
}
$zero = self::new64(0, 0);
$ctx[1][0] = $zero;
$ctx[1][1] = $zero;
$ctx[2][0] = $zero;
$ctx[2][1] = $zero;
return $ctx;
}
/**
* @internal You should not use this directly from another application
*
* @param SplFixedArray $ctx
* @param SplFixedArray $buf
* @return void
* @throws SodiumException
* @throws TypeError
* @psalm-suppress MixedArgument
* @psalm-suppress MixedAssignment
* @psalm-suppress MixedArrayAccess
* @psalm-suppress MixedArrayAssignment
* @psalm-suppress MixedArrayOffset
*/
protected static function compress(SplFixedArray $ctx, SplFixedArray $buf)
{
$m = new SplFixedArray(16);
$v = new SplFixedArray(16);
for ($i = 16; $i--;) {
$m[$i] = self::load64($buf, $i << 3);
}
for ($i = 8; $i--;) {
$v[$i] = $ctx[0][$i];
}
$v[ 8] = self::$iv[0];
$v[ 9] = self::$iv[1];
$v[10] = self::$iv[2];
$v[11] = self::$iv[3];
$v[12] = self::xor64($ctx[1][0], self::$iv[4]);
$v[13] = self::xor64($ctx[1][1], self::$iv[5]);
$v[14] = self::xor64($ctx[2][0], self::$iv[6]);
$v[15] = self::xor64($ctx[2][1], self::$iv[7]);
for ($r = 0; $r < 12; ++$r) {
$v = self::G($r, 0, 0, 4, 8, 12, $v, $m);
$v = self::G($r, 1, 1, 5, 9, 13, $v, $m);
$v = self::G($r, 2, 2, 6, 10, 14, $v, $m);
$v = self::G($r, 3, 3, 7, 11, 15, $v, $m);
$v = self::G($r, 4, 0, 5, 10, 15, $v, $m);
$v = self::G($r, 5, 1, 6, 11, 12, $v, $m);
$v = self::G($r, 6, 2, 7, 8, 13, $v, $m);
$v = self::G($r, 7, 3, 4, 9, 14, $v, $m);
}
for ($i = 8; $i--;) {
$ctx[0][$i] = self::xor64(
$ctx[0][$i], self::xor64($v[$i], $v[$i+8])
);
}
}
/**
* @internal You should not use this directly from another application
*
* @param int $r
* @param int $i
* @param int $a
* @param int $b
* @param int $c
* @param int $d
* @param SplFixedArray $v
* @param SplFixedArray $m
* @return SplFixedArray
* @throws SodiumException
* @throws TypeError
* @psalm-suppress MixedArgument
* @psalm-suppress MixedArrayOffset
*/
public static function G($r, $i, $a, $b, $c, $d, SplFixedArray $v, SplFixedArray $m)
{
$v[$a] = self::add364($v[$a], $v[$b], $m[self::$sigma[$r][$i << 1]]);
$v[$d] = self::rotr64(self::xor64($v[$d], $v[$a]), 32);
$v[$c] = self::add64($v[$c], $v[$d]);
$v[$b] = self::rotr64(self::xor64($v[$b], $v[$c]), 24);
$v[$a] = self::add364($v[$a], $v[$b], $m[self::$sigma[$r][($i << 1) + 1]]);
$v[$d] = self::rotr64(self::xor64($v[$d], $v[$a]), 16);
$v[$c] = self::add64($v[$c], $v[$d]);
$v[$b] = self::rotr64(self::xor64($v[$b], $v[$c]), 63);
return $v;
}
/**
* @internal You should not use this directly from another application
*
* @param SplFixedArray $ctx
* @param int $inc
* @return void
* @throws SodiumException
* @psalm-suppress MixedArgument
* @psalm-suppress MixedArrayAccess
* @psalm-suppress MixedArrayAssignment
*/
public static function increment_counter($ctx, $inc)
{
if ($inc < 0) {
throw new SodiumException('Increasing by a negative number makes no sense.');
}
$t = self::to64($inc);
# S->t is $ctx[1] in our implementation
# S->t[0] = ( uint64_t )( t >> 0 );
$ctx[1][0] = self::add64($ctx[1][0], $t);
# S->t[1] += ( S->t[0] < inc );
if (self::flatten64($ctx[1][0]) < $inc) {
$ctx[1][1] = self::add64($ctx[1][1], self::to64(1));
}
}
/**
* @internal You should not use this directly from another application
*
* @param SplFixedArray $ctx
* @param SplFixedArray $p
* @param int $plen
* @return void
* @throws SodiumException
* @throws TypeError
* @psalm-suppress MixedArgument
* @psalm-suppress MixedAssignment
* @psalm-suppress MixedArrayAccess
* @psalm-suppress MixedArrayAssignment
* @psalm-suppress MixedArrayOffset
* @psalm-suppress MixedOperand
*/
public static function update(SplFixedArray $ctx, SplFixedArray $p, $plen)
{
self::pseudoConstructor();
$offset = 0;
while ($plen > 0) {
$left = $ctx[4];
$fill = 256 - $left;
if ($plen > $fill) {
# memcpy( S->buf + left, in, fill ); /* Fill buffer */
for ($i = $fill; $i--;) {
$ctx[3][$i + $left] = $p[$i + $offset];
}
# S->buflen += fill;
$ctx[4] += $fill;
# blake2b_increment_counter( S, BLAKE2B_BLOCKBYTES );
self::increment_counter($ctx, 128);
# blake2b_compress( S, S->buf ); /* Compress */
self::compress($ctx, $ctx[3]);
# memcpy( S->buf, S->buf + BLAKE2B_BLOCKBYTES, BLAKE2B_BLOCKBYTES ); /* Shift buffer left */
for ($i = 128; $i--;) {
$ctx[3][$i] = $ctx[3][$i + 128];
}
# S->buflen -= BLAKE2B_BLOCKBYTES;
$ctx[4] -= 128;
# in += fill;
$offset += $fill;
# inlen -= fill;
$plen -= $fill;
} else {
for ($i = $plen; $i--;) {
$ctx[3][$i + $left] = $p[$i + $offset];
}
$ctx[4] += $plen;
$offset += $plen;
$plen -= $plen;
}
}
}
/**
* @internal You should not use this directly from another application
*
* @param SplFixedArray $ctx
* @param SplFixedArray $out
* @return SplFixedArray
* @throws SodiumException
* @throws TypeError
* @psalm-suppress MixedArgument
* @psalm-suppress MixedAssignment
* @psalm-suppress MixedArrayAccess
* @psalm-suppress MixedArrayAssignment
* @psalm-suppress MixedArrayOffset
* @psalm-suppress MixedOperand
*/
public static function finish(SplFixedArray $ctx, SplFixedArray $out)
{
self::pseudoConstructor();
if ($ctx[4] > 128) {
self::increment_counter($ctx, 128);
self::compress($ctx, $ctx[3]);
$ctx[4] -= 128;
if ($ctx[4] > 128) {
throw new SodiumException('Failed to assert that buflen <= 128 bytes');
}
for ($i = $ctx[4]; $i--;) {
$ctx[3][$i] = $ctx[3][$i + 128];
}
}
self::increment_counter($ctx, $ctx[4]);
$ctx[2][0] = self::new64(0xffffffff, 0xffffffff);
for ($i = 256 - $ctx[4]; $i--;) {
$ctx[3][$i+$ctx[4]] = 0;
}
self::compress($ctx, $ctx[3]);
$i = (int) (($out->getSize() - 1) / 8);
for (; $i >= 0; --$i) {
self::store64($out, $i << 3, $ctx[0][$i]);
}
return $out;
}
/**
* @internal You should not use this directly from another application
*
* @param SplFixedArray|null $key
* @param int $outlen
* @param SplFixedArray|null $salt
* @param SplFixedArray|null $personal
* @return SplFixedArray
* @throws SodiumException
* @throws TypeError
* @psalm-suppress MixedArgument
* @psalm-suppress MixedAssignment
* @psalm-suppress MixedArrayAccess
* @psalm-suppress MixedArrayAssignment
* @psalm-suppress MixedArrayOffset
*/
public static function init(
$key = null,
$outlen = 64,
$salt = null,
$personal = null
) {
self::pseudoConstructor();
$klen = 0;
if ($key !== null) {
if (count($key) > 64) {
throw new SodiumException('Invalid key size');
}
$klen = count($key);
}
if ($outlen > 64) {
throw new SodiumException('Invalid output size');
}
$ctx = self::context();
$p = new SplFixedArray(64);
// Zero our param buffer...
for ($i = 64; --$i;) {
$p[$i] = 0;
}
$p[0] = $outlen; // digest_length
$p[1] = $klen; // key_length
$p[2] = 1; // fanout
$p[3] = 1; // depth
if ($salt instanceof SplFixedArray) {
// salt: [32] through [47]
for ($i = 0; $i < 16; ++$i) {
$p[32 + $i] = (int) $salt[$i];
}
}
if ($personal instanceof SplFixedArray) {
// personal: [48] through [63]
for ($i = 0; $i < 16; ++$i) {
$p[48 + $i] = (int) $personal[$i];
}
}
$ctx[0][0] = self::xor64(
$ctx[0][0],
self::load64($p, 0)
);
if ($salt instanceof SplFixedArray || $personal instanceof SplFixedArray) {
// We need to do what blake2b_init_param() does:
for ($i = 1; $i < 8; ++$i) {
$ctx[0][$i] = self::xor64(
$ctx[0][$i],
self::load64($p, $i << 3)
);
}
}
if ($klen > 0 && $key instanceof SplFixedArray) {
$block = new SplFixedArray(128);
for ($i = 128; $i--;) {
$block[$i] = 0;
}
for ($i = $klen; $i--;) {
$block[$i] = $key[$i];
}
self::update($ctx, $block, 128);
$ctx[4] = 128;
}
return $ctx;
}
/**
* Convert a string into an SplFixedArray of integers
*
* @internal You should not use this directly from another application
*
* @param string $str
* @return SplFixedArray
*/
public static function stringToSplFixedArray($str = '')
{
$values = unpack('C*', $str);
return SplFixedArray::fromArray(array_values($values));
}
/**
* Convert an SplFixedArray of integers into a string
*
* @internal You should not use this directly from another application
*
* @param SplFixedArray $a
* @return string
* @throws TypeError
*/
public static function SplFixedArrayToString(SplFixedArray $a)
{
/**
* @var array<int, int|string> $arr
*/
$arr = $a->toArray();
$c = $a->count();
array_unshift($arr, str_repeat('C', $c));
return (string) (call_user_func_array('pack', $arr));
}
/**
* @internal You should not use this directly from another application
*
* @param SplFixedArray $ctx
* @return string
* @throws TypeError
* @psalm-suppress MixedArgument
* @psalm-suppress MixedAssignment
* @psalm-suppress MixedArrayAccess
* @psalm-suppress MixedArrayAssignment
* @psalm-suppress MixedArrayOffset
* @psalm-suppress MixedMethodCall
*/
public static function contextToString(SplFixedArray $ctx)
{
$str = '';
/** @var array<int, array<int, int>> $ctxA */
$ctxA = $ctx[0]->toArray();
# uint64_t h[8];
for ($i = 0; $i < 8; ++$i) {
$str .= self::store32_le($ctxA[$i][1]);
$str .= self::store32_le($ctxA[$i][0]);
}
# uint64_t t[2];
# uint64_t f[2];
for ($i = 1; $i < 3; ++$i) {
$ctxA = $ctx[$i]->toArray();
$str .= self::store32_le($ctxA[0][1]);
$str .= self::store32_le($ctxA[0][0]);
$str .= self::store32_le($ctxA[1][1]);
$str .= self::store32_le($ctxA[1][0]);
}
# uint8_t buf[2 * 128];
$str .= self::SplFixedArrayToString($ctx[3]);
/** @var int $ctx4 */
$ctx4 = (int) $ctx[4];
# size_t buflen;
$str .= implode('', array(
self::intToChr($ctx4 & 0xff),
self::intToChr(($ctx4 >> 8) & 0xff),
self::intToChr(($ctx4 >> 16) & 0xff),
self::intToChr(($ctx4 >> 24) & 0xff),
self::intToChr(($ctx4 >> 32) & 0xff),
self::intToChr(($ctx4 >> 40) & 0xff),
self::intToChr(($ctx4 >> 48) & 0xff),
self::intToChr(($ctx4 >> 56) & 0xff)
));
# uint8_t last_node;
return $str . self::intToChr($ctx[5]) . str_repeat("\x00", 23);
}
/**
* Creates an SplFixedArray containing other SplFixedArray elements, from
* a string (compatible with \Sodium\crypto_generichash_{init, update, final})
*
* @internal You should not use this directly from another application
*
* @param string $string
* @return SplFixedArray
* @throws SodiumException
* @throws TypeError
* @psalm-suppress MixedArrayAssignment
*/
public static function stringToContext($string)
{
$ctx = self::context();
# uint64_t h[8];
for ($i = 0; $i < 8; ++$i) {
$ctx[0][$i] = SplFixedArray::fromArray(
array(
self::load_4(
self::substr($string, (($i << 3) + 4), 4)
),
self::load_4(
self::substr($string, (($i << 3) + 0), 4)
)
)
);
}
# uint64_t t[2];
# uint64_t f[2];
for ($i = 1; $i < 3; ++$i) {
$ctx[$i][1] = SplFixedArray::fromArray(
array(
self::load_4(self::substr($string, 76 + (($i - 1) << 4), 4)),
self::load_4(self::substr($string, 72 + (($i - 1) << 4), 4))
)
);
$ctx[$i][0] = SplFixedArray::fromArray(
array(
self::load_4(self::substr($string, 68 + (($i - 1) << 4), 4)),
self::load_4(self::substr($string, 64 + (($i - 1) << 4), 4))
)
);
}
# uint8_t buf[2 * 128];
$ctx[3] = self::stringToSplFixedArray(self::substr($string, 96, 256));
# uint8_t buf[2 * 128];
$int = 0;
for ($i = 0; $i < 8; ++$i) {
$int |= self::chrToInt($string[352 + $i]) << ($i << 3);
}
$ctx[4] = $int;
return $ctx;
}
}

View File

@ -0,0 +1,213 @@
<?php
/**
* Class ParagonIE_Sodium_Core_Base64
*
* Copyright (c) 2016 - 2018 Paragon Initiative Enterprises.
* Copyright (c) 2014 Steve "Sc00bz" Thomas (steve at tobtu dot com)
*
* We have to copy/paste the contents into the variant files because PHP 5.2
* doesn't support late static binding, and we have no better workaround
* available that won't break PHP 7+. Therefore, we're forced to duplicate code.
*/
abstract class ParagonIE_Sodium_Core_Base64_Common
{
/**
* Encode into Base64
*
* Base64 character set "[A-Z][a-z][0-9]+/"
*
* @param string $src
* @return string
* @throws TypeError
*/
public static function encode($src)
{
return self::doEncode($src, true);
}
/**
* Encode into Base64, no = padding
*
* Base64 character set "[A-Z][a-z][0-9]+/"
*
* @param string $src
* @return string
* @throws TypeError
*/
public static function encodeUnpadded($src)
{
return self::doEncode($src, false);
}
/**
* @param string $src
* @param bool $pad Include = padding?
* @return string
* @throws TypeError
*/
protected static function doEncode($src, $pad = true)
{
$dest = '';
$srcLen = ParagonIE_Sodium_Core_Util::strlen($src);
// Main loop (no padding):
for ($i = 0; $i + 3 <= $srcLen; $i += 3) {
/** @var array<int, int> $chunk */
$chunk = unpack('C*', ParagonIE_Sodium_Core_Util::substr($src, $i, 3));
$b0 = $chunk[1];
$b1 = $chunk[2];
$b2 = $chunk[3];
$dest .=
self::encode6Bits( $b0 >> 2 ) .
self::encode6Bits((($b0 << 4) | ($b1 >> 4)) & 63) .
self::encode6Bits((($b1 << 2) | ($b2 >> 6)) & 63) .
self::encode6Bits( $b2 & 63);
}
// The last chunk, which may have padding:
if ($i < $srcLen) {
/** @var array<int, int> $chunk */
$chunk = unpack('C*', ParagonIE_Sodium_Core_Util::substr($src, $i, $srcLen - $i));
$b0 = $chunk[1];
if ($i + 1 < $srcLen) {
$b1 = $chunk[2];
$dest .=
self::encode6Bits($b0 >> 2) .
self::encode6Bits((($b0 << 4) | ($b1 >> 4)) & 63) .
self::encode6Bits(($b1 << 2) & 63);
if ($pad) {
$dest .= '=';
}
} else {
$dest .=
self::encode6Bits( $b0 >> 2) .
self::encode6Bits(($b0 << 4) & 63);
if ($pad) {
$dest .= '==';
}
}
}
return $dest;
}
/**
* decode from base64 into binary
*
* Base64 character set "./[A-Z][a-z][0-9]"
*
* @param string $src
* @param bool $strictPadding
* @return string
* @throws RangeException
* @throws TypeError
* @psalm-suppress RedundantCondition
*/
public static function decode($src, $strictPadding = false)
{
// Remove padding
$srcLen = ParagonIE_Sodium_Core_Util::strlen($src);
if ($srcLen === 0) {
return '';
}
if ($strictPadding) {
if (($srcLen & 3) === 0) {
if ($src[$srcLen - 1] === '=') {
$srcLen--;
if ($src[$srcLen - 1] === '=') {
$srcLen--;
}
}
}
if (($srcLen & 3) === 1) {
throw new RangeException(
'Incorrect padding'
);
}
if ($src[$srcLen - 1] === '=') {
throw new RangeException(
'Incorrect padding'
);
}
} else {
$src = rtrim($src, '=');
$srcLen = ParagonIE_Sodium_Core_Util::strlen($src);
}
$err = 0;
$dest = '';
// Main loop (no padding):
for ($i = 0; $i + 4 <= $srcLen; $i += 4) {
/** @var array<int, int> $chunk */
$chunk = unpack('C*', ParagonIE_Sodium_Core_Util::substr($src, $i, 4));
$c0 = self::decode6Bits($chunk[1]);
$c1 = self::decode6Bits($chunk[2]);
$c2 = self::decode6Bits($chunk[3]);
$c3 = self::decode6Bits($chunk[4]);
$dest .= pack(
'CCC',
((($c0 << 2) | ($c1 >> 4)) & 0xff),
((($c1 << 4) | ($c2 >> 2)) & 0xff),
((($c2 << 6) | $c3 ) & 0xff)
);
$err |= ($c0 | $c1 | $c2 | $c3) >> 8;
}
// The last chunk, which may have padding:
if ($i < $srcLen) {
/** @var array<int, int> $chunk */
$chunk = unpack('C*', ParagonIE_Sodium_Core_Util::substr($src, $i, $srcLen - $i));
$c0 = self::decode6Bits($chunk[1]);
if ($i + 2 < $srcLen) {
$c1 = self::decode6Bits($chunk[2]);
$c2 = self::decode6Bits($chunk[3]);
$dest .= pack(
'CC',
((($c0 << 2) | ($c1 >> 4)) & 0xff),
((($c1 << 4) | ($c2 >> 2)) & 0xff)
);
$err |= ($c0 | $c1 | $c2) >> 8;
} elseif ($i + 1 < $srcLen) {
$c1 = self::decode6Bits($chunk[2]);
$dest .= pack(
'C',
((($c0 << 2) | ($c1 >> 4)) & 0xff)
);
$err |= ($c0 | $c1) >> 8;
} elseif ($i < $srcLen && $strictPadding) {
$err |= 1;
}
}
/** @var bool $check */
$check = ($err === 0);
if (!$check) {
throw new RangeException(
'Base64::decode() only expects characters in the correct base64 alphabet'
);
}
return $dest;
}
/**
* Uses bitwise operators instead of table-lookups to turn 6-bit integers
* into 8-bit integers.
*
* Base64 character set:
* [A-Z] [a-z] [0-9] + /
* 0x41-0x5a, 0x61-0x7a, 0x30-0x39, 0x2b, 0x2f
*
* @param int $src
* @return int
*/
abstract protected static function decode6Bits($src);
/**
* Uses bitwise operators instead of table-lookups to turn 8-bit integers
* into 6-bit integers.
*
* @param int $src
* @return string
*/
abstract protected static function encode6Bits($src);
}

Some files were not shown because too many files have changed in this diff Show More