@bootpay/client-js 5.0.0-rc.11 → 5.0.0-rc.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(){"use strict";try{if("undefined"!=typeof document){var o=document.createElement("style");o.appendChild(document.createTextNode('.bootpay-progress-background{position:fixed;display:block;background-color:transparent;inset:0;text-align:center;z-index:200000;white-space:nowrap}.bootpay-progress-background.blur-off{background-color:transparent}.bootpay-progress-background:before{display:inline-block;height:100%;content:" ";vertical-align:middle}.bootpay-progress-background .progress-message-window{display:inline-block;text-align:center;max-width:600px;border-radius:3px;width:100%;background-color:transparent;padding:0;vertical-align:middle}@media (min-width: 600px){.bootpay-progress-background .progress-message-window{padding:1rem}}.bootpay-progress-background .progress-message-window .bootpay-spinner{display:inline-block;width:50px;height:50px;border-radius:50%;border-top:2px solid rgba(255,255,255,.2);border-right:2px solid rgba(255,255,255,.2);border-bottom:2px solid rgba(255,255,255,.2);border-left:2px solid #ffffff;animation:spin 1s infinite linear}.bootpay-progress-background .progress-message-window .alfred-text{margin-top:1rem}.bootpay-progress-background .progress-message-window .alfred-text span.alfred-inner-text{font-weight:400;color:#eee}@keyframes spin{0%{transform:rotate(0);border-left:2px solid #ffffff;border-top:2px solid rgba(255,255,255,.2);border-right:2px solid rgba(255,255,255,.2);border-bottom:2px solid rgba(255,255,255,.2)}50%{transform:rotate(180deg);border-left:3px solid #ffffff;border-top:2px solid rgba(255,255,255,.4);border-right:2px solid rgba(255,255,255,.4);border-bottom:2px solid rgba(255,255,255,.4)}to{transform:rotate(360deg);border-left:2px solid #ffffff;border-top:2px solid rgba(255,255,255,.2);border-right:2px solid rgba(255,255,255,.2);border-bottom:2px solid rgba(255,255,255,.2)}}body.bootpay-open{position:fixed!important;inset:0;padding:0;margin:0;height:100vh!important;overflow:hidden!important;-webkit-overflow-scrolling:auto!important}body.bootpay-open.bootpay-mobile .bootpay-payment-background{background-color:transparent}@media (min-width: 600px){body.bootpay-open.bootpay-mobile .bootpay-payment-background{background-color:#000000b3}}body.bootpay-open .bootpay-payment-background{position:fixed;inset:0;display:block;text-align:center;background-color:#000000b3;z-index:9999}body.bootpay-open .bootpay-payment-background:before{display:inline-block;vertical-align:middle;height:100%;content:" "}body.bootpay-open .bootpay-payment-background.__alert{padding:1rem}body.bootpay-open .bootpay-payment-background.__alert:before{display:inline-block;vertical-align:middle;height:100%;content:" "}body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window{position:absolute;max-width:400px;width:100%;background-color:#fff;border-radius:12px;left:50%;top:50%;transform:translate(-50%,-50%);overflow:hidden;box-shadow:0 0 10px #0000001a}body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window.fade-in{animation:__bootpay-fade-in .3s linear}body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window.fade-out{animation:__bootpay-fade-out .3s linear}@media (max-width: 768px){body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window{left:1rem;right:1rem;width:auto;top:50%;transform:translateY(-50%)}}body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-header{padding:1rem;border-bottom:1px solid #f0f0f0;text-align:left;font-weight:600}body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-body{padding:1.5rem 1rem;text-align:left;font-size:16px;color:#333;line-height:1.5}body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-footer{display:flex;justify-content:flex-end}body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close{flex:0 1 50%;padding:1rem;background-color:#f0f0f0;color:#333;font-size:16px;cursor:pointer;border:0;outline:none}body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close:hover{background-color:#e0e0e0}body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close.bootpay-primary{background-color:#507cf3;color:#fff}body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close.bootpay-primary:hover{background-color:#3f6be2}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window{position:relative;display:inline-block;vertical-align:middle}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window.__mobile{max-width:470px;height:90%}@media (max-width: 768px){body.bootpay-open .bootpay-payment-background>.bootpay-payment-window{position:absolute;inset:0;border-radius:0!important}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window.__mobile{position:absolute;max-width:inherit;inset:0;height:100%}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>iframe{width:100%!important;height:100%!important;border-radius:0}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>iframe.transparent{background:transparent!important}}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close{position:absolute;display:none;top:-32px;right:4px;color:#fff;font-size:32px;text-decoration:none;outline:none;box-shadow:none;border:0;background-color:transparent}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close:before,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close:after{width:2px!important;background-color:#fff!important}@media (max-width: 768px){body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close{top:1rem;right:16px;color:#000;padding:0}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close:before,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close:after{width:2px!important;background-color:#000!important}}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window{position:relative;width:400px;height:600px;display:none;background-color:#fff;border-radius:5px;overflow:hidden}@media (max-width: 768px){body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window{position:absolute;inset:0;width:100%;height:100%;border-radius:0}}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.header{position:absolute;left:0;right:0;top:0;height:50px;color:#333;background-color:#fff;text-align:left}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.body{position:absolute;inset:50px 0 72px;padding:1rem;text-align:left;font-size:14px}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.body>#bootpay-item-name-id{font-size:16px;color:#888;font-weight:400!important;text-align:center}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.body>#bootpay-price-id{font-size:36px;color:#333;font-weight:700;text-align:center}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.body>.agree-text{position:absolute;bottom:1rem;left:0;right:0;color:#888;font-size:14px;text-align:center}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.footer{position:absolute;left:0;right:0;bottom:0;height:72px;padding:0 1rem;margin:0}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.footer>button.bootpay-button{display:block;width:100%;padding:1rem;outline:none;border:none;background-color:#507cf3;border-radius:5px;color:#fff;font-size:16px}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.footer>button.bootpay-button:hover,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.footer>button.bootpay-button:active{outline:none;box-shadow:none}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>iframe{width:100%;height:100%;display:none;border:0!important;outline:0!important;border-radius:0;box-shadow:none}@media (min-width: 600px){body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>iframe{width:0;height:0;border:0;outline:0;border-radius:0!important;box-shadow:none!important}}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>iframe.rounded-iframe{border-radius:0}@media (min-width: 600px){body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>iframe.rounded-iframe{width:0;height:0;border:0;outline:0;border-radius:20px!important;box-shadow:none!important}}body.bootpay-open .bootpay-payment-background #__bootpay-modal-iframe.slide-up{animation:__bootpay-slide-up .3s linear}body.bootpay-open .bootpay-payment-background #__bootpay-modal-iframe.slide-down{animation:__bootpay-slide-down .3s linear}body.bootpay-open .bootpay-payment-background>.bootpay-confirm-window>iframe{display:none;width:1px;height:1px;background:transparent;border:0!important;outline:0!important}.bootpay-close-btn{position:absolute;box-shadow:none;background-color:#fff;outline:0;z-index:10001;right:8px;top:8px;height:21px;width:21px;border:0!important;outline:none!important}@media (min-width: 600px){.bootpay-close-btn{right:4px;top:-32px;width:25px;height:25px;background:transparent;outline:none!important;border:0!important}}.bootpay-close-btn.active,.bootpay-close-btn:focus{outline:none!important;border:0!important}.bootpay-close-btn:before,.bootpay-close-btn:after{position:absolute;left:8px;top:2px;content:" ";height:24px;width:1px;background-color:#333}@media (min-width: 600px){.bootpay-close-btn:before,.bootpay-close-btn:after{height:23px;top:0;width:2px;background-color:#fff}}.bootpay-close-btn:before{transform:rotate(45deg)}.bootpay-close-btn:after{transform:rotate(-45deg)}@keyframes __bootpay-slide-up{0%{transform:translateY(150%);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes __bootpay-slide-down{0%{transform:translateY(0);opacity:1}to{transform:translateY(150%);opacity:0}}@keyframes __bootpay-fade-in{0%{opacity:0}to{opacity:1}}@keyframes __bootpay-fade-out{0%{opacity:1}to{opacity:0}}')),document.head.appendChild(o)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}}();
|
|
1
|
+
!function(){"use strict";try{if("undefined"!=typeof document){var o=document.createElement("style");o.appendChild(document.createTextNode('.bootpay-progress-background{position:fixed;display:block;background-color:transparent;inset:0;text-align:center;z-index:200000;white-space:nowrap}.bootpay-progress-background.blur-off{background-color:transparent}.bootpay-progress-background:before{display:inline-block;height:100%;content:" ";vertical-align:middle}.bootpay-progress-background .progress-message-window{display:inline-block;text-align:center;max-width:600px;border-radius:3px;width:100%;background-color:transparent;padding:0;vertical-align:middle}@media (min-width: 600px){.bootpay-progress-background .progress-message-window{padding:1rem}}.bootpay-progress-background .progress-message-window .bootpay-spinner{display:inline-block;width:50px;height:50px;border-radius:50%;border-top:2px solid rgba(255,255,255,.2);border-right:2px solid rgba(255,255,255,.2);border-bottom:2px solid rgba(255,255,255,.2);border-left:2px solid #ffffff;animation:spin 1s infinite linear}.bootpay-progress-background .progress-message-window .alfred-text{margin-top:1rem}.bootpay-progress-background .progress-message-window .alfred-text span.alfred-inner-text{font-weight:400;color:#eee}@keyframes spin{0%{transform:rotate(0);border-left:2px solid #ffffff;border-top:2px solid rgba(255,255,255,.2);border-right:2px solid rgba(255,255,255,.2);border-bottom:2px solid rgba(255,255,255,.2)}50%{transform:rotate(180deg);border-left:3px solid #ffffff;border-top:2px solid rgba(255,255,255,.4);border-right:2px solid rgba(255,255,255,.4);border-bottom:2px solid rgba(255,255,255,.4)}to{transform:rotate(360deg);border-left:2px solid #ffffff;border-top:2px solid rgba(255,255,255,.2);border-right:2px solid rgba(255,255,255,.2);border-bottom:2px solid rgba(255,255,255,.2)}}body.bootpay-open{position:fixed!important;inset:0;padding:0;margin:0;height:100vh!important;overflow:hidden!important;-webkit-overflow-scrolling:auto!important}body.bootpay-open.bootpay-mobile .bootpay-payment-background{background-color:transparent}@media (min-width: 600px){body.bootpay-open.bootpay-mobile .bootpay-payment-background{background-color:#000000b3}}body.bootpay-open .bootpay-payment-background{position:fixed;inset:0;display:block;text-align:center;background-color:#000000b3;z-index:9999}body.bootpay-open .bootpay-payment-background:before{display:inline-block;vertical-align:middle;height:100%;content:" "}body.bootpay-open .bootpay-payment-background.__alert{padding:1rem}body.bootpay-open .bootpay-payment-background.__alert:before{display:inline-block;vertical-align:middle;height:100%;content:" "}body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window{position:absolute;max-width:400px;width:100%;background-color:#fff;border-radius:12px;left:50%;top:50%;transform:translate(-50%,-50%);overflow:hidden;box-shadow:0 0 10px #0000001a}body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window.fade-in{animation:__bootpay-fade-in .1s linear}body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window.fade-out{animation:__bootpay-fade-out .1s linear}@media (max-width: 768px){body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window{left:1rem;right:1rem;width:auto;top:50%;transform:translateY(-50%)}}body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-header{padding:1rem;text-align:left;font-size:20px;font-weight:600;position:relative}body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-header>.bootpay-close-btn{top:40%;transform:translateY(-50%);padding:0;right:1rem}@media (min-width: 600px){body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-header>.bootpay-close-btn{right:8px;top:50%;transform:translateY(-55%)}body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-header>.bootpay-close-btn:before,body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-header>.bootpay-close-btn:after{background-color:#333;width:1px}}body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-body{padding:1.5rem 1rem;text-align:center;font-size:16px;color:#333;line-height:1.5}body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-footer{display:flex;justify-content:flex-end;border-top:1px solid #f2f2f2}body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close{flex:0 1 50%;padding:1rem;background-color:#fff;color:#333;font-size:16px;cursor:pointer;border:0;outline:none}body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close.border-right{border-right:1px solid #f2f2f2}body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close:hover{background-color:#e0e0e0}body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close.bootpay-primary{color:#507cf3;font-weight:600}body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close.bootpay-primary:hover{color:#3f6be2}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window{position:relative;display:inline-block;vertical-align:middle}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window.__mobile{max-width:470px;height:90%}@media (max-width: 768px){body.bootpay-open .bootpay-payment-background>.bootpay-payment-window{position:absolute;inset:0;border-radius:0!important}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window.__mobile{position:absolute;max-width:inherit;inset:0;height:100%}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>iframe{width:100%!important;height:100%!important;border-radius:0}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>iframe.transparent{background:transparent!important}}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close{position:absolute;display:none;top:-32px;right:4px;color:#fff;font-size:32px;text-decoration:none;outline:none;box-shadow:none;border:0;background-color:transparent}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close:before,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close:after{width:2px!important;background-color:#fff!important}@media (max-width: 768px){body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close{top:1rem;right:16px;color:#000;padding:0}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close:before,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close:after{width:2px!important;background-color:#000!important}}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window{position:relative;width:400px;height:600px;display:none;background-color:#fff;border-radius:5px;overflow:hidden}@media (max-width: 768px){body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window{position:absolute;inset:0;width:100%;height:100%;border-radius:0}}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.header{position:absolute;left:0;right:0;top:0;height:50px;color:#333;background-color:#fff;text-align:left}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.body{position:absolute;inset:50px 0 72px;padding:1rem;text-align:left;font-size:14px}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.body>#bootpay-item-name-id{font-size:16px;color:#888;font-weight:400!important;text-align:center}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.body>#bootpay-price-id{font-size:36px;color:#333;font-weight:700;text-align:center}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.body>.agree-text{position:absolute;bottom:1rem;left:0;right:0;color:#888;font-size:14px;text-align:center}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.footer{position:absolute;left:0;right:0;bottom:0;height:72px;padding:0 1rem;margin:0}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.footer>button.bootpay-button{display:block;width:100%;padding:1rem;outline:none;border:none;background-color:#507cf3;border-radius:5px;color:#fff;font-size:16px}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.footer>button.bootpay-button:hover,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.footer>button.bootpay-button:active{outline:none;box-shadow:none}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>iframe{width:100%;height:100%;display:none;border:0!important;outline:0!important;border-radius:0;box-shadow:none}@media (min-width: 600px){body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>iframe{width:0;height:0;border:0;outline:0;border-radius:0!important;box-shadow:none!important}}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>iframe.rounded-iframe{border-radius:0}@media (min-width: 600px){body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>iframe.rounded-iframe{width:0;height:0;border:0;outline:0;border-radius:20px!important;box-shadow:none!important}}body.bootpay-open .bootpay-payment-background #__bootpay-modal-iframe.slide-up{animation:__bootpay-slide-up .3s linear}body.bootpay-open .bootpay-payment-background #__bootpay-modal-iframe.slide-down{animation:__bootpay-slide-down .3s linear}body.bootpay-open .bootpay-payment-background>.bootpay-confirm-window>iframe{display:none;width:1px;height:1px;background:transparent;border:0!important;outline:0!important}.bootpay-close-btn{position:absolute;box-shadow:none;background-color:#fff;outline:0;z-index:10001;right:8px;top:8px;height:21px;width:21px;border:0!important;outline:none!important}@media (min-width: 600px){.bootpay-close-btn{right:4px;top:-32px;width:25px;height:25px;background:transparent;outline:none!important;border:0!important}}.bootpay-close-btn.active,.bootpay-close-btn:focus{outline:none!important;border:0!important}.bootpay-close-btn:before,.bootpay-close-btn:after{position:absolute;left:8px;top:2px;content:" ";height:24px;width:1px;background-color:#333}@media (min-width: 600px){.bootpay-close-btn:before,.bootpay-close-btn:after{height:23px;top:0;width:2px;background-color:#fff}}.bootpay-close-btn:before{transform:rotate(45deg)}.bootpay-close-btn:after{transform:rotate(-45deg)}@keyframes __bootpay-slide-up{0%{transform:translateY(150%);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes __bootpay-slide-down{0%{transform:translateY(0);opacity:1}to{transform:translateY(150%);opacity:0}}@keyframes __bootpay-fade-in{0%{opacity:0;scale:.9}to{opacity:1;scale:1}}@keyframes __bootpay-fade-out{0%{opacity:1;scale:1}to{opacity:0;scale:.9}}')),document.head.appendChild(o)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}}();
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
@@ -130,7 +130,7 @@ function requireCore() {
|
|
|
130
130
|
module.exports = factory();
|
|
131
131
|
}
|
|
132
132
|
})(commonjsGlobal, function() {
|
|
133
|
-
var
|
|
133
|
+
var CryptoJS2 = CryptoJS2 || function(Math2, undefined$1) {
|
|
134
134
|
var crypto;
|
|
135
135
|
if (typeof window !== "undefined" && window.crypto) {
|
|
136
136
|
crypto = window.crypto;
|
|
@@ -721,7 +721,7 @@ function requireCore() {
|
|
|
721
721
|
var C_algo = C.algo = {};
|
|
722
722
|
return C;
|
|
723
723
|
}(Math);
|
|
724
|
-
return
|
|
724
|
+
return CryptoJS2;
|
|
725
725
|
});
|
|
726
726
|
})(core);
|
|
727
727
|
return core.exports;
|
|
@@ -731,8 +731,8 @@ function requireCore() {
|
|
|
731
731
|
{
|
|
732
732
|
module.exports = factory(requireCore());
|
|
733
733
|
}
|
|
734
|
-
})(commonjsGlobal, function(
|
|
735
|
-
return
|
|
734
|
+
})(commonjsGlobal, function(CryptoJS2) {
|
|
735
|
+
return CryptoJS2.enc.Utf8;
|
|
736
736
|
});
|
|
737
737
|
})(encUtf8);
|
|
738
738
|
var encUtf8Exports = encUtf8.exports;
|
|
@@ -743,9 +743,9 @@ var encBase64 = { exports: {} };
|
|
|
743
743
|
{
|
|
744
744
|
module.exports = factory(requireCore());
|
|
745
745
|
}
|
|
746
|
-
})(commonjsGlobal, function(
|
|
746
|
+
})(commonjsGlobal, function(CryptoJS2) {
|
|
747
747
|
(function() {
|
|
748
|
-
var C =
|
|
748
|
+
var C = CryptoJS2;
|
|
749
749
|
var C_lib = C.lib;
|
|
750
750
|
var WordArray = C_lib.WordArray;
|
|
751
751
|
var C_enc = C.enc;
|
|
@@ -835,7 +835,7 @@ var encBase64 = { exports: {} };
|
|
|
835
835
|
return WordArray.create(words, nBytes);
|
|
836
836
|
}
|
|
837
837
|
})();
|
|
838
|
-
return
|
|
838
|
+
return CryptoJS2.enc.Base64;
|
|
839
839
|
});
|
|
840
840
|
})(encBase64);
|
|
841
841
|
var encBase64Exports = encBase64.exports;
|
|
@@ -1088,7 +1088,7 @@ class SessionStorageManager extends StorageManager {
|
|
|
1088
1088
|
}
|
|
1089
1089
|
const SessionStorage = new SessionStorageManager();
|
|
1090
1090
|
const name = "@bootpay/client-js";
|
|
1091
|
-
const version = "5.0.0-rc.
|
|
1091
|
+
const version = "5.0.0-rc.14";
|
|
1092
1092
|
const main = "dist/index.es.js";
|
|
1093
1093
|
const types = "dist/src/index.d.ts";
|
|
1094
1094
|
const styles = "dist/index.css";
|
|
@@ -2857,9 +2857,9 @@ function requireMd5() {
|
|
|
2857
2857
|
{
|
|
2858
2858
|
module.exports = factory(requireCore());
|
|
2859
2859
|
}
|
|
2860
|
-
})(commonjsGlobal, function(
|
|
2860
|
+
})(commonjsGlobal, function(CryptoJS2) {
|
|
2861
2861
|
(function(Math2) {
|
|
2862
|
-
var C =
|
|
2862
|
+
var C = CryptoJS2;
|
|
2863
2863
|
var C_lib = C.lib;
|
|
2864
2864
|
var WordArray = C_lib.WordArray;
|
|
2865
2865
|
var Hasher = C_lib.Hasher;
|
|
@@ -3020,7 +3020,7 @@ function requireMd5() {
|
|
|
3020
3020
|
C.MD5 = Hasher._createHelper(MD5);
|
|
3021
3021
|
C.HmacMD5 = Hasher._createHmacHelper(MD5);
|
|
3022
3022
|
})(Math);
|
|
3023
|
-
return
|
|
3023
|
+
return CryptoJS2.MD5;
|
|
3024
3024
|
});
|
|
3025
3025
|
})(md5);
|
|
3026
3026
|
return md5.exports;
|
|
@@ -3037,9 +3037,9 @@ function requireSha1() {
|
|
|
3037
3037
|
{
|
|
3038
3038
|
module.exports = factory(requireCore());
|
|
3039
3039
|
}
|
|
3040
|
-
})(commonjsGlobal, function(
|
|
3040
|
+
})(commonjsGlobal, function(CryptoJS2) {
|
|
3041
3041
|
(function() {
|
|
3042
|
-
var C =
|
|
3042
|
+
var C = CryptoJS2;
|
|
3043
3043
|
var C_lib = C.lib;
|
|
3044
3044
|
var WordArray = C_lib.WordArray;
|
|
3045
3045
|
var Hasher = C_lib.Hasher;
|
|
@@ -3112,7 +3112,7 @@ function requireSha1() {
|
|
|
3112
3112
|
C.SHA1 = Hasher._createHelper(SHA1);
|
|
3113
3113
|
C.HmacSHA1 = Hasher._createHmacHelper(SHA1);
|
|
3114
3114
|
})();
|
|
3115
|
-
return
|
|
3115
|
+
return CryptoJS2.SHA1;
|
|
3116
3116
|
});
|
|
3117
3117
|
})(sha1);
|
|
3118
3118
|
return sha1.exports;
|
|
@@ -3128,9 +3128,9 @@ function requireHmac() {
|
|
|
3128
3128
|
{
|
|
3129
3129
|
module.exports = factory(requireCore());
|
|
3130
3130
|
}
|
|
3131
|
-
})(commonjsGlobal, function(
|
|
3131
|
+
})(commonjsGlobal, function(CryptoJS2) {
|
|
3132
3132
|
(function() {
|
|
3133
|
-
var C =
|
|
3133
|
+
var C = CryptoJS2;
|
|
3134
3134
|
var C_lib = C.lib;
|
|
3135
3135
|
var Base = C_lib.Base;
|
|
3136
3136
|
var C_enc = C.enc;
|
|
@@ -3234,9 +3234,9 @@ function requireEvpkdf() {
|
|
|
3234
3234
|
{
|
|
3235
3235
|
module.exports = factory(requireCore(), requireSha1(), requireHmac());
|
|
3236
3236
|
}
|
|
3237
|
-
})(commonjsGlobal, function(
|
|
3237
|
+
})(commonjsGlobal, function(CryptoJS2) {
|
|
3238
3238
|
(function() {
|
|
3239
|
-
var C =
|
|
3239
|
+
var C = CryptoJS2;
|
|
3240
3240
|
var C_lib = C.lib;
|
|
3241
3241
|
var Base = C_lib.Base;
|
|
3242
3242
|
var WordArray = C_lib.WordArray;
|
|
@@ -3309,7 +3309,7 @@ function requireEvpkdf() {
|
|
|
3309
3309
|
return EvpKDF.create(cfg).compute(password, salt);
|
|
3310
3310
|
};
|
|
3311
3311
|
})();
|
|
3312
|
-
return
|
|
3312
|
+
return CryptoJS2.EvpKDF;
|
|
3313
3313
|
});
|
|
3314
3314
|
})(evpkdf);
|
|
3315
3315
|
return evpkdf.exports;
|
|
@@ -3325,9 +3325,9 @@ function requireCipherCore() {
|
|
|
3325
3325
|
{
|
|
3326
3326
|
module.exports = factory(requireCore(), requireEvpkdf());
|
|
3327
3327
|
}
|
|
3328
|
-
})(commonjsGlobal, function(
|
|
3329
|
-
|
|
3330
|
-
var C =
|
|
3328
|
+
})(commonjsGlobal, function(CryptoJS2) {
|
|
3329
|
+
CryptoJS2.lib.Cipher || function(undefined$1) {
|
|
3330
|
+
var C = CryptoJS2;
|
|
3331
3331
|
var C_lib = C.lib;
|
|
3332
3332
|
var Base = C_lib.Base;
|
|
3333
3333
|
var WordArray = C_lib.WordArray;
|
|
@@ -3959,9 +3959,9 @@ function requireCipherCore() {
|
|
|
3959
3959
|
{
|
|
3960
3960
|
module.exports = factory(requireCore(), encBase64Exports, requireMd5(), requireEvpkdf(), requireCipherCore());
|
|
3961
3961
|
}
|
|
3962
|
-
})(commonjsGlobal, function(
|
|
3962
|
+
})(commonjsGlobal, function(CryptoJS2) {
|
|
3963
3963
|
(function() {
|
|
3964
|
-
var C =
|
|
3964
|
+
var C = CryptoJS2;
|
|
3965
3965
|
var C_lib = C.lib;
|
|
3966
3966
|
var BlockCipher = C_lib.BlockCipher;
|
|
3967
3967
|
var C_algo = C.algo;
|
|
@@ -4097,7 +4097,7 @@ function requireCipherCore() {
|
|
|
4097
4097
|
});
|
|
4098
4098
|
C.AES = BlockCipher._createHelper(AES2);
|
|
4099
4099
|
})();
|
|
4100
|
-
return
|
|
4100
|
+
return CryptoJS2.AES;
|
|
4101
4101
|
});
|
|
4102
4102
|
})(aes);
|
|
4103
4103
|
var aesExports = aes.exports;
|
|
@@ -6441,6 +6441,3390 @@ const BootpaySDK = {
|
|
|
6441
6441
|
if (typeof window !== "undefined") {
|
|
6442
6442
|
window.BootpaySDK = BootpaySDK;
|
|
6443
6443
|
}
|
|
6444
|
+
var cryptoJs = { exports: {} };
|
|
6445
|
+
var x64Core = { exports: {} };
|
|
6446
|
+
var hasRequiredX64Core;
|
|
6447
|
+
function requireX64Core() {
|
|
6448
|
+
if (hasRequiredX64Core)
|
|
6449
|
+
return x64Core.exports;
|
|
6450
|
+
hasRequiredX64Core = 1;
|
|
6451
|
+
(function(module, exports) {
|
|
6452
|
+
(function(root, factory) {
|
|
6453
|
+
{
|
|
6454
|
+
module.exports = factory(requireCore());
|
|
6455
|
+
}
|
|
6456
|
+
})(commonjsGlobal, function(CryptoJS2) {
|
|
6457
|
+
(function(undefined$1) {
|
|
6458
|
+
var C = CryptoJS2;
|
|
6459
|
+
var C_lib = C.lib;
|
|
6460
|
+
var Base = C_lib.Base;
|
|
6461
|
+
var X32WordArray = C_lib.WordArray;
|
|
6462
|
+
var C_x64 = C.x64 = {};
|
|
6463
|
+
C_x64.Word = Base.extend({
|
|
6464
|
+
/**
|
|
6465
|
+
* Initializes a newly created 64-bit word.
|
|
6466
|
+
*
|
|
6467
|
+
* @param {number} high The high 32 bits.
|
|
6468
|
+
* @param {number} low The low 32 bits.
|
|
6469
|
+
*
|
|
6470
|
+
* @example
|
|
6471
|
+
*
|
|
6472
|
+
* var x64Word = CryptoJS.x64.Word.create(0x00010203, 0x04050607);
|
|
6473
|
+
*/
|
|
6474
|
+
init: function(high, low) {
|
|
6475
|
+
this.high = high;
|
|
6476
|
+
this.low = low;
|
|
6477
|
+
}
|
|
6478
|
+
/**
|
|
6479
|
+
* Bitwise NOTs this word.
|
|
6480
|
+
*
|
|
6481
|
+
* @return {X64Word} A new x64-Word object after negating.
|
|
6482
|
+
*
|
|
6483
|
+
* @example
|
|
6484
|
+
*
|
|
6485
|
+
* var negated = x64Word.not();
|
|
6486
|
+
*/
|
|
6487
|
+
// not: function () {
|
|
6488
|
+
// var high = ~this.high;
|
|
6489
|
+
// var low = ~this.low;
|
|
6490
|
+
// return X64Word.create(high, low);
|
|
6491
|
+
// },
|
|
6492
|
+
/**
|
|
6493
|
+
* Bitwise ANDs this word with the passed word.
|
|
6494
|
+
*
|
|
6495
|
+
* @param {X64Word} word The x64-Word to AND with this word.
|
|
6496
|
+
*
|
|
6497
|
+
* @return {X64Word} A new x64-Word object after ANDing.
|
|
6498
|
+
*
|
|
6499
|
+
* @example
|
|
6500
|
+
*
|
|
6501
|
+
* var anded = x64Word.and(anotherX64Word);
|
|
6502
|
+
*/
|
|
6503
|
+
// and: function (word) {
|
|
6504
|
+
// var high = this.high & word.high;
|
|
6505
|
+
// var low = this.low & word.low;
|
|
6506
|
+
// return X64Word.create(high, low);
|
|
6507
|
+
// },
|
|
6508
|
+
/**
|
|
6509
|
+
* Bitwise ORs this word with the passed word.
|
|
6510
|
+
*
|
|
6511
|
+
* @param {X64Word} word The x64-Word to OR with this word.
|
|
6512
|
+
*
|
|
6513
|
+
* @return {X64Word} A new x64-Word object after ORing.
|
|
6514
|
+
*
|
|
6515
|
+
* @example
|
|
6516
|
+
*
|
|
6517
|
+
* var ored = x64Word.or(anotherX64Word);
|
|
6518
|
+
*/
|
|
6519
|
+
// or: function (word) {
|
|
6520
|
+
// var high = this.high | word.high;
|
|
6521
|
+
// var low = this.low | word.low;
|
|
6522
|
+
// return X64Word.create(high, low);
|
|
6523
|
+
// },
|
|
6524
|
+
/**
|
|
6525
|
+
* Bitwise XORs this word with the passed word.
|
|
6526
|
+
*
|
|
6527
|
+
* @param {X64Word} word The x64-Word to XOR with this word.
|
|
6528
|
+
*
|
|
6529
|
+
* @return {X64Word} A new x64-Word object after XORing.
|
|
6530
|
+
*
|
|
6531
|
+
* @example
|
|
6532
|
+
*
|
|
6533
|
+
* var xored = x64Word.xor(anotherX64Word);
|
|
6534
|
+
*/
|
|
6535
|
+
// xor: function (word) {
|
|
6536
|
+
// var high = this.high ^ word.high;
|
|
6537
|
+
// var low = this.low ^ word.low;
|
|
6538
|
+
// return X64Word.create(high, low);
|
|
6539
|
+
// },
|
|
6540
|
+
/**
|
|
6541
|
+
* Shifts this word n bits to the left.
|
|
6542
|
+
*
|
|
6543
|
+
* @param {number} n The number of bits to shift.
|
|
6544
|
+
*
|
|
6545
|
+
* @return {X64Word} A new x64-Word object after shifting.
|
|
6546
|
+
*
|
|
6547
|
+
* @example
|
|
6548
|
+
*
|
|
6549
|
+
* var shifted = x64Word.shiftL(25);
|
|
6550
|
+
*/
|
|
6551
|
+
// shiftL: function (n) {
|
|
6552
|
+
// if (n < 32) {
|
|
6553
|
+
// var high = (this.high << n) | (this.low >>> (32 - n));
|
|
6554
|
+
// var low = this.low << n;
|
|
6555
|
+
// } else {
|
|
6556
|
+
// var high = this.low << (n - 32);
|
|
6557
|
+
// var low = 0;
|
|
6558
|
+
// }
|
|
6559
|
+
// return X64Word.create(high, low);
|
|
6560
|
+
// },
|
|
6561
|
+
/**
|
|
6562
|
+
* Shifts this word n bits to the right.
|
|
6563
|
+
*
|
|
6564
|
+
* @param {number} n The number of bits to shift.
|
|
6565
|
+
*
|
|
6566
|
+
* @return {X64Word} A new x64-Word object after shifting.
|
|
6567
|
+
*
|
|
6568
|
+
* @example
|
|
6569
|
+
*
|
|
6570
|
+
* var shifted = x64Word.shiftR(7);
|
|
6571
|
+
*/
|
|
6572
|
+
// shiftR: function (n) {
|
|
6573
|
+
// if (n < 32) {
|
|
6574
|
+
// var low = (this.low >>> n) | (this.high << (32 - n));
|
|
6575
|
+
// var high = this.high >>> n;
|
|
6576
|
+
// } else {
|
|
6577
|
+
// var low = this.high >>> (n - 32);
|
|
6578
|
+
// var high = 0;
|
|
6579
|
+
// }
|
|
6580
|
+
// return X64Word.create(high, low);
|
|
6581
|
+
// },
|
|
6582
|
+
/**
|
|
6583
|
+
* Rotates this word n bits to the left.
|
|
6584
|
+
*
|
|
6585
|
+
* @param {number} n The number of bits to rotate.
|
|
6586
|
+
*
|
|
6587
|
+
* @return {X64Word} A new x64-Word object after rotating.
|
|
6588
|
+
*
|
|
6589
|
+
* @example
|
|
6590
|
+
*
|
|
6591
|
+
* var rotated = x64Word.rotL(25);
|
|
6592
|
+
*/
|
|
6593
|
+
// rotL: function (n) {
|
|
6594
|
+
// return this.shiftL(n).or(this.shiftR(64 - n));
|
|
6595
|
+
// },
|
|
6596
|
+
/**
|
|
6597
|
+
* Rotates this word n bits to the right.
|
|
6598
|
+
*
|
|
6599
|
+
* @param {number} n The number of bits to rotate.
|
|
6600
|
+
*
|
|
6601
|
+
* @return {X64Word} A new x64-Word object after rotating.
|
|
6602
|
+
*
|
|
6603
|
+
* @example
|
|
6604
|
+
*
|
|
6605
|
+
* var rotated = x64Word.rotR(7);
|
|
6606
|
+
*/
|
|
6607
|
+
// rotR: function (n) {
|
|
6608
|
+
// return this.shiftR(n).or(this.shiftL(64 - n));
|
|
6609
|
+
// },
|
|
6610
|
+
/**
|
|
6611
|
+
* Adds this word with the passed word.
|
|
6612
|
+
*
|
|
6613
|
+
* @param {X64Word} word The x64-Word to add with this word.
|
|
6614
|
+
*
|
|
6615
|
+
* @return {X64Word} A new x64-Word object after adding.
|
|
6616
|
+
*
|
|
6617
|
+
* @example
|
|
6618
|
+
*
|
|
6619
|
+
* var added = x64Word.add(anotherX64Word);
|
|
6620
|
+
*/
|
|
6621
|
+
// add: function (word) {
|
|
6622
|
+
// var low = (this.low + word.low) | 0;
|
|
6623
|
+
// var carry = (low >>> 0) < (this.low >>> 0) ? 1 : 0;
|
|
6624
|
+
// var high = (this.high + word.high + carry) | 0;
|
|
6625
|
+
// return X64Word.create(high, low);
|
|
6626
|
+
// }
|
|
6627
|
+
});
|
|
6628
|
+
C_x64.WordArray = Base.extend({
|
|
6629
|
+
/**
|
|
6630
|
+
* Initializes a newly created word array.
|
|
6631
|
+
*
|
|
6632
|
+
* @param {Array} words (Optional) An array of CryptoJS.x64.Word objects.
|
|
6633
|
+
* @param {number} sigBytes (Optional) The number of significant bytes in the words.
|
|
6634
|
+
*
|
|
6635
|
+
* @example
|
|
6636
|
+
*
|
|
6637
|
+
* var wordArray = CryptoJS.x64.WordArray.create();
|
|
6638
|
+
*
|
|
6639
|
+
* var wordArray = CryptoJS.x64.WordArray.create([
|
|
6640
|
+
* CryptoJS.x64.Word.create(0x00010203, 0x04050607),
|
|
6641
|
+
* CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f)
|
|
6642
|
+
* ]);
|
|
6643
|
+
*
|
|
6644
|
+
* var wordArray = CryptoJS.x64.WordArray.create([
|
|
6645
|
+
* CryptoJS.x64.Word.create(0x00010203, 0x04050607),
|
|
6646
|
+
* CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f)
|
|
6647
|
+
* ], 10);
|
|
6648
|
+
*/
|
|
6649
|
+
init: function(words, sigBytes) {
|
|
6650
|
+
words = this.words = words || [];
|
|
6651
|
+
if (sigBytes != undefined$1) {
|
|
6652
|
+
this.sigBytes = sigBytes;
|
|
6653
|
+
} else {
|
|
6654
|
+
this.sigBytes = words.length * 8;
|
|
6655
|
+
}
|
|
6656
|
+
},
|
|
6657
|
+
/**
|
|
6658
|
+
* Converts this 64-bit word array to a 32-bit word array.
|
|
6659
|
+
*
|
|
6660
|
+
* @return {CryptoJS.lib.WordArray} This word array's data as a 32-bit word array.
|
|
6661
|
+
*
|
|
6662
|
+
* @example
|
|
6663
|
+
*
|
|
6664
|
+
* var x32WordArray = x64WordArray.toX32();
|
|
6665
|
+
*/
|
|
6666
|
+
toX32: function() {
|
|
6667
|
+
var x64Words = this.words;
|
|
6668
|
+
var x64WordsLength = x64Words.length;
|
|
6669
|
+
var x32Words = [];
|
|
6670
|
+
for (var i = 0; i < x64WordsLength; i++) {
|
|
6671
|
+
var x64Word = x64Words[i];
|
|
6672
|
+
x32Words.push(x64Word.high);
|
|
6673
|
+
x32Words.push(x64Word.low);
|
|
6674
|
+
}
|
|
6675
|
+
return X32WordArray.create(x32Words, this.sigBytes);
|
|
6676
|
+
},
|
|
6677
|
+
/**
|
|
6678
|
+
* Creates a copy of this word array.
|
|
6679
|
+
*
|
|
6680
|
+
* @return {X64WordArray} The clone.
|
|
6681
|
+
*
|
|
6682
|
+
* @example
|
|
6683
|
+
*
|
|
6684
|
+
* var clone = x64WordArray.clone();
|
|
6685
|
+
*/
|
|
6686
|
+
clone: function() {
|
|
6687
|
+
var clone = Base.clone.call(this);
|
|
6688
|
+
var words = clone.words = this.words.slice(0);
|
|
6689
|
+
var wordsLength = words.length;
|
|
6690
|
+
for (var i = 0; i < wordsLength; i++) {
|
|
6691
|
+
words[i] = words[i].clone();
|
|
6692
|
+
}
|
|
6693
|
+
return clone;
|
|
6694
|
+
}
|
|
6695
|
+
});
|
|
6696
|
+
})();
|
|
6697
|
+
return CryptoJS2;
|
|
6698
|
+
});
|
|
6699
|
+
})(x64Core);
|
|
6700
|
+
return x64Core.exports;
|
|
6701
|
+
}
|
|
6702
|
+
var libTypedarrays = { exports: {} };
|
|
6703
|
+
var hasRequiredLibTypedarrays;
|
|
6704
|
+
function requireLibTypedarrays() {
|
|
6705
|
+
if (hasRequiredLibTypedarrays)
|
|
6706
|
+
return libTypedarrays.exports;
|
|
6707
|
+
hasRequiredLibTypedarrays = 1;
|
|
6708
|
+
(function(module, exports) {
|
|
6709
|
+
(function(root, factory) {
|
|
6710
|
+
{
|
|
6711
|
+
module.exports = factory(requireCore());
|
|
6712
|
+
}
|
|
6713
|
+
})(commonjsGlobal, function(CryptoJS2) {
|
|
6714
|
+
(function() {
|
|
6715
|
+
if (typeof ArrayBuffer != "function") {
|
|
6716
|
+
return;
|
|
6717
|
+
}
|
|
6718
|
+
var C = CryptoJS2;
|
|
6719
|
+
var C_lib = C.lib;
|
|
6720
|
+
var WordArray = C_lib.WordArray;
|
|
6721
|
+
var superInit = WordArray.init;
|
|
6722
|
+
var subInit = WordArray.init = function(typedArray) {
|
|
6723
|
+
if (typedArray instanceof ArrayBuffer) {
|
|
6724
|
+
typedArray = new Uint8Array(typedArray);
|
|
6725
|
+
}
|
|
6726
|
+
if (typedArray instanceof Int8Array || typeof Uint8ClampedArray !== "undefined" && typedArray instanceof Uint8ClampedArray || typedArray instanceof Int16Array || typedArray instanceof Uint16Array || typedArray instanceof Int32Array || typedArray instanceof Uint32Array || typedArray instanceof Float32Array || typedArray instanceof Float64Array) {
|
|
6727
|
+
typedArray = new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength);
|
|
6728
|
+
}
|
|
6729
|
+
if (typedArray instanceof Uint8Array) {
|
|
6730
|
+
var typedArrayByteLength = typedArray.byteLength;
|
|
6731
|
+
var words = [];
|
|
6732
|
+
for (var i = 0; i < typedArrayByteLength; i++) {
|
|
6733
|
+
words[i >>> 2] |= typedArray[i] << 24 - i % 4 * 8;
|
|
6734
|
+
}
|
|
6735
|
+
superInit.call(this, words, typedArrayByteLength);
|
|
6736
|
+
} else {
|
|
6737
|
+
superInit.apply(this, arguments);
|
|
6738
|
+
}
|
|
6739
|
+
};
|
|
6740
|
+
subInit.prototype = WordArray;
|
|
6741
|
+
})();
|
|
6742
|
+
return CryptoJS2.lib.WordArray;
|
|
6743
|
+
});
|
|
6744
|
+
})(libTypedarrays);
|
|
6745
|
+
return libTypedarrays.exports;
|
|
6746
|
+
}
|
|
6747
|
+
var encUtf16 = { exports: {} };
|
|
6748
|
+
var hasRequiredEncUtf16;
|
|
6749
|
+
function requireEncUtf16() {
|
|
6750
|
+
if (hasRequiredEncUtf16)
|
|
6751
|
+
return encUtf16.exports;
|
|
6752
|
+
hasRequiredEncUtf16 = 1;
|
|
6753
|
+
(function(module, exports) {
|
|
6754
|
+
(function(root, factory) {
|
|
6755
|
+
{
|
|
6756
|
+
module.exports = factory(requireCore());
|
|
6757
|
+
}
|
|
6758
|
+
})(commonjsGlobal, function(CryptoJS2) {
|
|
6759
|
+
(function() {
|
|
6760
|
+
var C = CryptoJS2;
|
|
6761
|
+
var C_lib = C.lib;
|
|
6762
|
+
var WordArray = C_lib.WordArray;
|
|
6763
|
+
var C_enc = C.enc;
|
|
6764
|
+
C_enc.Utf16 = C_enc.Utf16BE = {
|
|
6765
|
+
/**
|
|
6766
|
+
* Converts a word array to a UTF-16 BE string.
|
|
6767
|
+
*
|
|
6768
|
+
* @param {WordArray} wordArray The word array.
|
|
6769
|
+
*
|
|
6770
|
+
* @return {string} The UTF-16 BE string.
|
|
6771
|
+
*
|
|
6772
|
+
* @static
|
|
6773
|
+
*
|
|
6774
|
+
* @example
|
|
6775
|
+
*
|
|
6776
|
+
* var utf16String = CryptoJS.enc.Utf16.stringify(wordArray);
|
|
6777
|
+
*/
|
|
6778
|
+
stringify: function(wordArray) {
|
|
6779
|
+
var words = wordArray.words;
|
|
6780
|
+
var sigBytes = wordArray.sigBytes;
|
|
6781
|
+
var utf16Chars = [];
|
|
6782
|
+
for (var i = 0; i < sigBytes; i += 2) {
|
|
6783
|
+
var codePoint = words[i >>> 2] >>> 16 - i % 4 * 8 & 65535;
|
|
6784
|
+
utf16Chars.push(String.fromCharCode(codePoint));
|
|
6785
|
+
}
|
|
6786
|
+
return utf16Chars.join("");
|
|
6787
|
+
},
|
|
6788
|
+
/**
|
|
6789
|
+
* Converts a UTF-16 BE string to a word array.
|
|
6790
|
+
*
|
|
6791
|
+
* @param {string} utf16Str The UTF-16 BE string.
|
|
6792
|
+
*
|
|
6793
|
+
* @return {WordArray} The word array.
|
|
6794
|
+
*
|
|
6795
|
+
* @static
|
|
6796
|
+
*
|
|
6797
|
+
* @example
|
|
6798
|
+
*
|
|
6799
|
+
* var wordArray = CryptoJS.enc.Utf16.parse(utf16String);
|
|
6800
|
+
*/
|
|
6801
|
+
parse: function(utf16Str) {
|
|
6802
|
+
var utf16StrLength = utf16Str.length;
|
|
6803
|
+
var words = [];
|
|
6804
|
+
for (var i = 0; i < utf16StrLength; i++) {
|
|
6805
|
+
words[i >>> 1] |= utf16Str.charCodeAt(i) << 16 - i % 2 * 16;
|
|
6806
|
+
}
|
|
6807
|
+
return WordArray.create(words, utf16StrLength * 2);
|
|
6808
|
+
}
|
|
6809
|
+
};
|
|
6810
|
+
C_enc.Utf16LE = {
|
|
6811
|
+
/**
|
|
6812
|
+
* Converts a word array to a UTF-16 LE string.
|
|
6813
|
+
*
|
|
6814
|
+
* @param {WordArray} wordArray The word array.
|
|
6815
|
+
*
|
|
6816
|
+
* @return {string} The UTF-16 LE string.
|
|
6817
|
+
*
|
|
6818
|
+
* @static
|
|
6819
|
+
*
|
|
6820
|
+
* @example
|
|
6821
|
+
*
|
|
6822
|
+
* var utf16Str = CryptoJS.enc.Utf16LE.stringify(wordArray);
|
|
6823
|
+
*/
|
|
6824
|
+
stringify: function(wordArray) {
|
|
6825
|
+
var words = wordArray.words;
|
|
6826
|
+
var sigBytes = wordArray.sigBytes;
|
|
6827
|
+
var utf16Chars = [];
|
|
6828
|
+
for (var i = 0; i < sigBytes; i += 2) {
|
|
6829
|
+
var codePoint = swapEndian(words[i >>> 2] >>> 16 - i % 4 * 8 & 65535);
|
|
6830
|
+
utf16Chars.push(String.fromCharCode(codePoint));
|
|
6831
|
+
}
|
|
6832
|
+
return utf16Chars.join("");
|
|
6833
|
+
},
|
|
6834
|
+
/**
|
|
6835
|
+
* Converts a UTF-16 LE string to a word array.
|
|
6836
|
+
*
|
|
6837
|
+
* @param {string} utf16Str The UTF-16 LE string.
|
|
6838
|
+
*
|
|
6839
|
+
* @return {WordArray} The word array.
|
|
6840
|
+
*
|
|
6841
|
+
* @static
|
|
6842
|
+
*
|
|
6843
|
+
* @example
|
|
6844
|
+
*
|
|
6845
|
+
* var wordArray = CryptoJS.enc.Utf16LE.parse(utf16Str);
|
|
6846
|
+
*/
|
|
6847
|
+
parse: function(utf16Str) {
|
|
6848
|
+
var utf16StrLength = utf16Str.length;
|
|
6849
|
+
var words = [];
|
|
6850
|
+
for (var i = 0; i < utf16StrLength; i++) {
|
|
6851
|
+
words[i >>> 1] |= swapEndian(utf16Str.charCodeAt(i) << 16 - i % 2 * 16);
|
|
6852
|
+
}
|
|
6853
|
+
return WordArray.create(words, utf16StrLength * 2);
|
|
6854
|
+
}
|
|
6855
|
+
};
|
|
6856
|
+
function swapEndian(word) {
|
|
6857
|
+
return word << 8 & 4278255360 | word >>> 8 & 16711935;
|
|
6858
|
+
}
|
|
6859
|
+
})();
|
|
6860
|
+
return CryptoJS2.enc.Utf16;
|
|
6861
|
+
});
|
|
6862
|
+
})(encUtf16);
|
|
6863
|
+
return encUtf16.exports;
|
|
6864
|
+
}
|
|
6865
|
+
var encBase64url = { exports: {} };
|
|
6866
|
+
var hasRequiredEncBase64url;
|
|
6867
|
+
function requireEncBase64url() {
|
|
6868
|
+
if (hasRequiredEncBase64url)
|
|
6869
|
+
return encBase64url.exports;
|
|
6870
|
+
hasRequiredEncBase64url = 1;
|
|
6871
|
+
(function(module, exports) {
|
|
6872
|
+
(function(root, factory) {
|
|
6873
|
+
{
|
|
6874
|
+
module.exports = factory(requireCore());
|
|
6875
|
+
}
|
|
6876
|
+
})(commonjsGlobal, function(CryptoJS2) {
|
|
6877
|
+
(function() {
|
|
6878
|
+
var C = CryptoJS2;
|
|
6879
|
+
var C_lib = C.lib;
|
|
6880
|
+
var WordArray = C_lib.WordArray;
|
|
6881
|
+
var C_enc = C.enc;
|
|
6882
|
+
C_enc.Base64url = {
|
|
6883
|
+
/**
|
|
6884
|
+
* Converts a word array to a Base64url string.
|
|
6885
|
+
*
|
|
6886
|
+
* @param {WordArray} wordArray The word array.
|
|
6887
|
+
*
|
|
6888
|
+
* @param {boolean} urlSafe Whether to use url safe
|
|
6889
|
+
*
|
|
6890
|
+
* @return {string} The Base64url string.
|
|
6891
|
+
*
|
|
6892
|
+
* @static
|
|
6893
|
+
*
|
|
6894
|
+
* @example
|
|
6895
|
+
*
|
|
6896
|
+
* var base64String = CryptoJS.enc.Base64url.stringify(wordArray);
|
|
6897
|
+
*/
|
|
6898
|
+
stringify: function(wordArray, urlSafe = true) {
|
|
6899
|
+
var words = wordArray.words;
|
|
6900
|
+
var sigBytes = wordArray.sigBytes;
|
|
6901
|
+
var map = urlSafe ? this._safe_map : this._map;
|
|
6902
|
+
wordArray.clamp();
|
|
6903
|
+
var base64Chars = [];
|
|
6904
|
+
for (var i = 0; i < sigBytes; i += 3) {
|
|
6905
|
+
var byte1 = words[i >>> 2] >>> 24 - i % 4 * 8 & 255;
|
|
6906
|
+
var byte2 = words[i + 1 >>> 2] >>> 24 - (i + 1) % 4 * 8 & 255;
|
|
6907
|
+
var byte3 = words[i + 2 >>> 2] >>> 24 - (i + 2) % 4 * 8 & 255;
|
|
6908
|
+
var triplet = byte1 << 16 | byte2 << 8 | byte3;
|
|
6909
|
+
for (var j = 0; j < 4 && i + j * 0.75 < sigBytes; j++) {
|
|
6910
|
+
base64Chars.push(map.charAt(triplet >>> 6 * (3 - j) & 63));
|
|
6911
|
+
}
|
|
6912
|
+
}
|
|
6913
|
+
var paddingChar = map.charAt(64);
|
|
6914
|
+
if (paddingChar) {
|
|
6915
|
+
while (base64Chars.length % 4) {
|
|
6916
|
+
base64Chars.push(paddingChar);
|
|
6917
|
+
}
|
|
6918
|
+
}
|
|
6919
|
+
return base64Chars.join("");
|
|
6920
|
+
},
|
|
6921
|
+
/**
|
|
6922
|
+
* Converts a Base64url string to a word array.
|
|
6923
|
+
*
|
|
6924
|
+
* @param {string} base64Str The Base64url string.
|
|
6925
|
+
*
|
|
6926
|
+
* @param {boolean} urlSafe Whether to use url safe
|
|
6927
|
+
*
|
|
6928
|
+
* @return {WordArray} The word array.
|
|
6929
|
+
*
|
|
6930
|
+
* @static
|
|
6931
|
+
*
|
|
6932
|
+
* @example
|
|
6933
|
+
*
|
|
6934
|
+
* var wordArray = CryptoJS.enc.Base64url.parse(base64String);
|
|
6935
|
+
*/
|
|
6936
|
+
parse: function(base64Str, urlSafe = true) {
|
|
6937
|
+
var base64StrLength = base64Str.length;
|
|
6938
|
+
var map = urlSafe ? this._safe_map : this._map;
|
|
6939
|
+
var reverseMap = this._reverseMap;
|
|
6940
|
+
if (!reverseMap) {
|
|
6941
|
+
reverseMap = this._reverseMap = [];
|
|
6942
|
+
for (var j = 0; j < map.length; j++) {
|
|
6943
|
+
reverseMap[map.charCodeAt(j)] = j;
|
|
6944
|
+
}
|
|
6945
|
+
}
|
|
6946
|
+
var paddingChar = map.charAt(64);
|
|
6947
|
+
if (paddingChar) {
|
|
6948
|
+
var paddingIndex = base64Str.indexOf(paddingChar);
|
|
6949
|
+
if (paddingIndex !== -1) {
|
|
6950
|
+
base64StrLength = paddingIndex;
|
|
6951
|
+
}
|
|
6952
|
+
}
|
|
6953
|
+
return parseLoop(base64Str, base64StrLength, reverseMap);
|
|
6954
|
+
},
|
|
6955
|
+
_map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
|
|
6956
|
+
_safe_map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"
|
|
6957
|
+
};
|
|
6958
|
+
function parseLoop(base64Str, base64StrLength, reverseMap) {
|
|
6959
|
+
var words = [];
|
|
6960
|
+
var nBytes = 0;
|
|
6961
|
+
for (var i = 0; i < base64StrLength; i++) {
|
|
6962
|
+
if (i % 4) {
|
|
6963
|
+
var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << i % 4 * 2;
|
|
6964
|
+
var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> 6 - i % 4 * 2;
|
|
6965
|
+
var bitsCombined = bits1 | bits2;
|
|
6966
|
+
words[nBytes >>> 2] |= bitsCombined << 24 - nBytes % 4 * 8;
|
|
6967
|
+
nBytes++;
|
|
6968
|
+
}
|
|
6969
|
+
}
|
|
6970
|
+
return WordArray.create(words, nBytes);
|
|
6971
|
+
}
|
|
6972
|
+
})();
|
|
6973
|
+
return CryptoJS2.enc.Base64url;
|
|
6974
|
+
});
|
|
6975
|
+
})(encBase64url);
|
|
6976
|
+
return encBase64url.exports;
|
|
6977
|
+
}
|
|
6978
|
+
var sha256 = { exports: {} };
|
|
6979
|
+
var hasRequiredSha256;
|
|
6980
|
+
function requireSha256() {
|
|
6981
|
+
if (hasRequiredSha256)
|
|
6982
|
+
return sha256.exports;
|
|
6983
|
+
hasRequiredSha256 = 1;
|
|
6984
|
+
(function(module, exports) {
|
|
6985
|
+
(function(root, factory) {
|
|
6986
|
+
{
|
|
6987
|
+
module.exports = factory(requireCore());
|
|
6988
|
+
}
|
|
6989
|
+
})(commonjsGlobal, function(CryptoJS2) {
|
|
6990
|
+
(function(Math2) {
|
|
6991
|
+
var C = CryptoJS2;
|
|
6992
|
+
var C_lib = C.lib;
|
|
6993
|
+
var WordArray = C_lib.WordArray;
|
|
6994
|
+
var Hasher = C_lib.Hasher;
|
|
6995
|
+
var C_algo = C.algo;
|
|
6996
|
+
var H = [];
|
|
6997
|
+
var K = [];
|
|
6998
|
+
(function() {
|
|
6999
|
+
function isPrime(n2) {
|
|
7000
|
+
var sqrtN = Math2.sqrt(n2);
|
|
7001
|
+
for (var factor = 2; factor <= sqrtN; factor++) {
|
|
7002
|
+
if (!(n2 % factor)) {
|
|
7003
|
+
return false;
|
|
7004
|
+
}
|
|
7005
|
+
}
|
|
7006
|
+
return true;
|
|
7007
|
+
}
|
|
7008
|
+
function getFractionalBits(n2) {
|
|
7009
|
+
return (n2 - (n2 | 0)) * 4294967296 | 0;
|
|
7010
|
+
}
|
|
7011
|
+
var n = 2;
|
|
7012
|
+
var nPrime = 0;
|
|
7013
|
+
while (nPrime < 64) {
|
|
7014
|
+
if (isPrime(n)) {
|
|
7015
|
+
if (nPrime < 8) {
|
|
7016
|
+
H[nPrime] = getFractionalBits(Math2.pow(n, 1 / 2));
|
|
7017
|
+
}
|
|
7018
|
+
K[nPrime] = getFractionalBits(Math2.pow(n, 1 / 3));
|
|
7019
|
+
nPrime++;
|
|
7020
|
+
}
|
|
7021
|
+
n++;
|
|
7022
|
+
}
|
|
7023
|
+
})();
|
|
7024
|
+
var W = [];
|
|
7025
|
+
var SHA256 = C_algo.SHA256 = Hasher.extend({
|
|
7026
|
+
_doReset: function() {
|
|
7027
|
+
this._hash = new WordArray.init(H.slice(0));
|
|
7028
|
+
},
|
|
7029
|
+
_doProcessBlock: function(M, offset) {
|
|
7030
|
+
var H2 = this._hash.words;
|
|
7031
|
+
var a = H2[0];
|
|
7032
|
+
var b = H2[1];
|
|
7033
|
+
var c = H2[2];
|
|
7034
|
+
var d = H2[3];
|
|
7035
|
+
var e = H2[4];
|
|
7036
|
+
var f = H2[5];
|
|
7037
|
+
var g = H2[6];
|
|
7038
|
+
var h = H2[7];
|
|
7039
|
+
for (var i = 0; i < 64; i++) {
|
|
7040
|
+
if (i < 16) {
|
|
7041
|
+
W[i] = M[offset + i] | 0;
|
|
7042
|
+
} else {
|
|
7043
|
+
var gamma0x = W[i - 15];
|
|
7044
|
+
var gamma0 = (gamma0x << 25 | gamma0x >>> 7) ^ (gamma0x << 14 | gamma0x >>> 18) ^ gamma0x >>> 3;
|
|
7045
|
+
var gamma1x = W[i - 2];
|
|
7046
|
+
var gamma1 = (gamma1x << 15 | gamma1x >>> 17) ^ (gamma1x << 13 | gamma1x >>> 19) ^ gamma1x >>> 10;
|
|
7047
|
+
W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16];
|
|
7048
|
+
}
|
|
7049
|
+
var ch = e & f ^ ~e & g;
|
|
7050
|
+
var maj = a & b ^ a & c ^ b & c;
|
|
7051
|
+
var sigma0 = (a << 30 | a >>> 2) ^ (a << 19 | a >>> 13) ^ (a << 10 | a >>> 22);
|
|
7052
|
+
var sigma1 = (e << 26 | e >>> 6) ^ (e << 21 | e >>> 11) ^ (e << 7 | e >>> 25);
|
|
7053
|
+
var t1 = h + sigma1 + ch + K[i] + W[i];
|
|
7054
|
+
var t2 = sigma0 + maj;
|
|
7055
|
+
h = g;
|
|
7056
|
+
g = f;
|
|
7057
|
+
f = e;
|
|
7058
|
+
e = d + t1 | 0;
|
|
7059
|
+
d = c;
|
|
7060
|
+
c = b;
|
|
7061
|
+
b = a;
|
|
7062
|
+
a = t1 + t2 | 0;
|
|
7063
|
+
}
|
|
7064
|
+
H2[0] = H2[0] + a | 0;
|
|
7065
|
+
H2[1] = H2[1] + b | 0;
|
|
7066
|
+
H2[2] = H2[2] + c | 0;
|
|
7067
|
+
H2[3] = H2[3] + d | 0;
|
|
7068
|
+
H2[4] = H2[4] + e | 0;
|
|
7069
|
+
H2[5] = H2[5] + f | 0;
|
|
7070
|
+
H2[6] = H2[6] + g | 0;
|
|
7071
|
+
H2[7] = H2[7] + h | 0;
|
|
7072
|
+
},
|
|
7073
|
+
_doFinalize: function() {
|
|
7074
|
+
var data2 = this._data;
|
|
7075
|
+
var dataWords = data2.words;
|
|
7076
|
+
var nBitsTotal = this._nDataBytes * 8;
|
|
7077
|
+
var nBitsLeft = data2.sigBytes * 8;
|
|
7078
|
+
dataWords[nBitsLeft >>> 5] |= 128 << 24 - nBitsLeft % 32;
|
|
7079
|
+
dataWords[(nBitsLeft + 64 >>> 9 << 4) + 14] = Math2.floor(nBitsTotal / 4294967296);
|
|
7080
|
+
dataWords[(nBitsLeft + 64 >>> 9 << 4) + 15] = nBitsTotal;
|
|
7081
|
+
data2.sigBytes = dataWords.length * 4;
|
|
7082
|
+
this._process();
|
|
7083
|
+
return this._hash;
|
|
7084
|
+
},
|
|
7085
|
+
clone: function() {
|
|
7086
|
+
var clone = Hasher.clone.call(this);
|
|
7087
|
+
clone._hash = this._hash.clone();
|
|
7088
|
+
return clone;
|
|
7089
|
+
}
|
|
7090
|
+
});
|
|
7091
|
+
C.SHA256 = Hasher._createHelper(SHA256);
|
|
7092
|
+
C.HmacSHA256 = Hasher._createHmacHelper(SHA256);
|
|
7093
|
+
})(Math);
|
|
7094
|
+
return CryptoJS2.SHA256;
|
|
7095
|
+
});
|
|
7096
|
+
})(sha256);
|
|
7097
|
+
return sha256.exports;
|
|
7098
|
+
}
|
|
7099
|
+
var sha224 = { exports: {} };
|
|
7100
|
+
var hasRequiredSha224;
|
|
7101
|
+
function requireSha224() {
|
|
7102
|
+
if (hasRequiredSha224)
|
|
7103
|
+
return sha224.exports;
|
|
7104
|
+
hasRequiredSha224 = 1;
|
|
7105
|
+
(function(module, exports) {
|
|
7106
|
+
(function(root, factory, undef) {
|
|
7107
|
+
{
|
|
7108
|
+
module.exports = factory(requireCore(), requireSha256());
|
|
7109
|
+
}
|
|
7110
|
+
})(commonjsGlobal, function(CryptoJS2) {
|
|
7111
|
+
(function() {
|
|
7112
|
+
var C = CryptoJS2;
|
|
7113
|
+
var C_lib = C.lib;
|
|
7114
|
+
var WordArray = C_lib.WordArray;
|
|
7115
|
+
var C_algo = C.algo;
|
|
7116
|
+
var SHA256 = C_algo.SHA256;
|
|
7117
|
+
var SHA224 = C_algo.SHA224 = SHA256.extend({
|
|
7118
|
+
_doReset: function() {
|
|
7119
|
+
this._hash = new WordArray.init([
|
|
7120
|
+
3238371032,
|
|
7121
|
+
914150663,
|
|
7122
|
+
812702999,
|
|
7123
|
+
4144912697,
|
|
7124
|
+
4290775857,
|
|
7125
|
+
1750603025,
|
|
7126
|
+
1694076839,
|
|
7127
|
+
3204075428
|
|
7128
|
+
]);
|
|
7129
|
+
},
|
|
7130
|
+
_doFinalize: function() {
|
|
7131
|
+
var hash = SHA256._doFinalize.call(this);
|
|
7132
|
+
hash.sigBytes -= 4;
|
|
7133
|
+
return hash;
|
|
7134
|
+
}
|
|
7135
|
+
});
|
|
7136
|
+
C.SHA224 = SHA256._createHelper(SHA224);
|
|
7137
|
+
C.HmacSHA224 = SHA256._createHmacHelper(SHA224);
|
|
7138
|
+
})();
|
|
7139
|
+
return CryptoJS2.SHA224;
|
|
7140
|
+
});
|
|
7141
|
+
})(sha224);
|
|
7142
|
+
return sha224.exports;
|
|
7143
|
+
}
|
|
7144
|
+
var sha512 = { exports: {} };
|
|
7145
|
+
var hasRequiredSha512;
|
|
7146
|
+
function requireSha512() {
|
|
7147
|
+
if (hasRequiredSha512)
|
|
7148
|
+
return sha512.exports;
|
|
7149
|
+
hasRequiredSha512 = 1;
|
|
7150
|
+
(function(module, exports) {
|
|
7151
|
+
(function(root, factory, undef) {
|
|
7152
|
+
{
|
|
7153
|
+
module.exports = factory(requireCore(), requireX64Core());
|
|
7154
|
+
}
|
|
7155
|
+
})(commonjsGlobal, function(CryptoJS2) {
|
|
7156
|
+
(function() {
|
|
7157
|
+
var C = CryptoJS2;
|
|
7158
|
+
var C_lib = C.lib;
|
|
7159
|
+
var Hasher = C_lib.Hasher;
|
|
7160
|
+
var C_x64 = C.x64;
|
|
7161
|
+
var X64Word = C_x64.Word;
|
|
7162
|
+
var X64WordArray = C_x64.WordArray;
|
|
7163
|
+
var C_algo = C.algo;
|
|
7164
|
+
function X64Word_create() {
|
|
7165
|
+
return X64Word.create.apply(X64Word, arguments);
|
|
7166
|
+
}
|
|
7167
|
+
var K = [
|
|
7168
|
+
X64Word_create(1116352408, 3609767458),
|
|
7169
|
+
X64Word_create(1899447441, 602891725),
|
|
7170
|
+
X64Word_create(3049323471, 3964484399),
|
|
7171
|
+
X64Word_create(3921009573, 2173295548),
|
|
7172
|
+
X64Word_create(961987163, 4081628472),
|
|
7173
|
+
X64Word_create(1508970993, 3053834265),
|
|
7174
|
+
X64Word_create(2453635748, 2937671579),
|
|
7175
|
+
X64Word_create(2870763221, 3664609560),
|
|
7176
|
+
X64Word_create(3624381080, 2734883394),
|
|
7177
|
+
X64Word_create(310598401, 1164996542),
|
|
7178
|
+
X64Word_create(607225278, 1323610764),
|
|
7179
|
+
X64Word_create(1426881987, 3590304994),
|
|
7180
|
+
X64Word_create(1925078388, 4068182383),
|
|
7181
|
+
X64Word_create(2162078206, 991336113),
|
|
7182
|
+
X64Word_create(2614888103, 633803317),
|
|
7183
|
+
X64Word_create(3248222580, 3479774868),
|
|
7184
|
+
X64Word_create(3835390401, 2666613458),
|
|
7185
|
+
X64Word_create(4022224774, 944711139),
|
|
7186
|
+
X64Word_create(264347078, 2341262773),
|
|
7187
|
+
X64Word_create(604807628, 2007800933),
|
|
7188
|
+
X64Word_create(770255983, 1495990901),
|
|
7189
|
+
X64Word_create(1249150122, 1856431235),
|
|
7190
|
+
X64Word_create(1555081692, 3175218132),
|
|
7191
|
+
X64Word_create(1996064986, 2198950837),
|
|
7192
|
+
X64Word_create(2554220882, 3999719339),
|
|
7193
|
+
X64Word_create(2821834349, 766784016),
|
|
7194
|
+
X64Word_create(2952996808, 2566594879),
|
|
7195
|
+
X64Word_create(3210313671, 3203337956),
|
|
7196
|
+
X64Word_create(3336571891, 1034457026),
|
|
7197
|
+
X64Word_create(3584528711, 2466948901),
|
|
7198
|
+
X64Word_create(113926993, 3758326383),
|
|
7199
|
+
X64Word_create(338241895, 168717936),
|
|
7200
|
+
X64Word_create(666307205, 1188179964),
|
|
7201
|
+
X64Word_create(773529912, 1546045734),
|
|
7202
|
+
X64Word_create(1294757372, 1522805485),
|
|
7203
|
+
X64Word_create(1396182291, 2643833823),
|
|
7204
|
+
X64Word_create(1695183700, 2343527390),
|
|
7205
|
+
X64Word_create(1986661051, 1014477480),
|
|
7206
|
+
X64Word_create(2177026350, 1206759142),
|
|
7207
|
+
X64Word_create(2456956037, 344077627),
|
|
7208
|
+
X64Word_create(2730485921, 1290863460),
|
|
7209
|
+
X64Word_create(2820302411, 3158454273),
|
|
7210
|
+
X64Word_create(3259730800, 3505952657),
|
|
7211
|
+
X64Word_create(3345764771, 106217008),
|
|
7212
|
+
X64Word_create(3516065817, 3606008344),
|
|
7213
|
+
X64Word_create(3600352804, 1432725776),
|
|
7214
|
+
X64Word_create(4094571909, 1467031594),
|
|
7215
|
+
X64Word_create(275423344, 851169720),
|
|
7216
|
+
X64Word_create(430227734, 3100823752),
|
|
7217
|
+
X64Word_create(506948616, 1363258195),
|
|
7218
|
+
X64Word_create(659060556, 3750685593),
|
|
7219
|
+
X64Word_create(883997877, 3785050280),
|
|
7220
|
+
X64Word_create(958139571, 3318307427),
|
|
7221
|
+
X64Word_create(1322822218, 3812723403),
|
|
7222
|
+
X64Word_create(1537002063, 2003034995),
|
|
7223
|
+
X64Word_create(1747873779, 3602036899),
|
|
7224
|
+
X64Word_create(1955562222, 1575990012),
|
|
7225
|
+
X64Word_create(2024104815, 1125592928),
|
|
7226
|
+
X64Word_create(2227730452, 2716904306),
|
|
7227
|
+
X64Word_create(2361852424, 442776044),
|
|
7228
|
+
X64Word_create(2428436474, 593698344),
|
|
7229
|
+
X64Word_create(2756734187, 3733110249),
|
|
7230
|
+
X64Word_create(3204031479, 2999351573),
|
|
7231
|
+
X64Word_create(3329325298, 3815920427),
|
|
7232
|
+
X64Word_create(3391569614, 3928383900),
|
|
7233
|
+
X64Word_create(3515267271, 566280711),
|
|
7234
|
+
X64Word_create(3940187606, 3454069534),
|
|
7235
|
+
X64Word_create(4118630271, 4000239992),
|
|
7236
|
+
X64Word_create(116418474, 1914138554),
|
|
7237
|
+
X64Word_create(174292421, 2731055270),
|
|
7238
|
+
X64Word_create(289380356, 3203993006),
|
|
7239
|
+
X64Word_create(460393269, 320620315),
|
|
7240
|
+
X64Word_create(685471733, 587496836),
|
|
7241
|
+
X64Word_create(852142971, 1086792851),
|
|
7242
|
+
X64Word_create(1017036298, 365543100),
|
|
7243
|
+
X64Word_create(1126000580, 2618297676),
|
|
7244
|
+
X64Word_create(1288033470, 3409855158),
|
|
7245
|
+
X64Word_create(1501505948, 4234509866),
|
|
7246
|
+
X64Word_create(1607167915, 987167468),
|
|
7247
|
+
X64Word_create(1816402316, 1246189591)
|
|
7248
|
+
];
|
|
7249
|
+
var W = [];
|
|
7250
|
+
(function() {
|
|
7251
|
+
for (var i = 0; i < 80; i++) {
|
|
7252
|
+
W[i] = X64Word_create();
|
|
7253
|
+
}
|
|
7254
|
+
})();
|
|
7255
|
+
var SHA512 = C_algo.SHA512 = Hasher.extend({
|
|
7256
|
+
_doReset: function() {
|
|
7257
|
+
this._hash = new X64WordArray.init([
|
|
7258
|
+
new X64Word.init(1779033703, 4089235720),
|
|
7259
|
+
new X64Word.init(3144134277, 2227873595),
|
|
7260
|
+
new X64Word.init(1013904242, 4271175723),
|
|
7261
|
+
new X64Word.init(2773480762, 1595750129),
|
|
7262
|
+
new X64Word.init(1359893119, 2917565137),
|
|
7263
|
+
new X64Word.init(2600822924, 725511199),
|
|
7264
|
+
new X64Word.init(528734635, 4215389547),
|
|
7265
|
+
new X64Word.init(1541459225, 327033209)
|
|
7266
|
+
]);
|
|
7267
|
+
},
|
|
7268
|
+
_doProcessBlock: function(M, offset) {
|
|
7269
|
+
var H = this._hash.words;
|
|
7270
|
+
var H0 = H[0];
|
|
7271
|
+
var H1 = H[1];
|
|
7272
|
+
var H2 = H[2];
|
|
7273
|
+
var H3 = H[3];
|
|
7274
|
+
var H4 = H[4];
|
|
7275
|
+
var H5 = H[5];
|
|
7276
|
+
var H6 = H[6];
|
|
7277
|
+
var H7 = H[7];
|
|
7278
|
+
var H0h = H0.high;
|
|
7279
|
+
var H0l = H0.low;
|
|
7280
|
+
var H1h = H1.high;
|
|
7281
|
+
var H1l = H1.low;
|
|
7282
|
+
var H2h = H2.high;
|
|
7283
|
+
var H2l = H2.low;
|
|
7284
|
+
var H3h = H3.high;
|
|
7285
|
+
var H3l = H3.low;
|
|
7286
|
+
var H4h = H4.high;
|
|
7287
|
+
var H4l = H4.low;
|
|
7288
|
+
var H5h = H5.high;
|
|
7289
|
+
var H5l = H5.low;
|
|
7290
|
+
var H6h = H6.high;
|
|
7291
|
+
var H6l = H6.low;
|
|
7292
|
+
var H7h = H7.high;
|
|
7293
|
+
var H7l = H7.low;
|
|
7294
|
+
var ah = H0h;
|
|
7295
|
+
var al = H0l;
|
|
7296
|
+
var bh = H1h;
|
|
7297
|
+
var bl = H1l;
|
|
7298
|
+
var ch = H2h;
|
|
7299
|
+
var cl = H2l;
|
|
7300
|
+
var dh = H3h;
|
|
7301
|
+
var dl = H3l;
|
|
7302
|
+
var eh = H4h;
|
|
7303
|
+
var el = H4l;
|
|
7304
|
+
var fh = H5h;
|
|
7305
|
+
var fl = H5l;
|
|
7306
|
+
var gh = H6h;
|
|
7307
|
+
var gl = H6l;
|
|
7308
|
+
var hh = H7h;
|
|
7309
|
+
var hl = H7l;
|
|
7310
|
+
for (var i = 0; i < 80; i++) {
|
|
7311
|
+
var Wil;
|
|
7312
|
+
var Wih;
|
|
7313
|
+
var Wi = W[i];
|
|
7314
|
+
if (i < 16) {
|
|
7315
|
+
Wih = Wi.high = M[offset + i * 2] | 0;
|
|
7316
|
+
Wil = Wi.low = M[offset + i * 2 + 1] | 0;
|
|
7317
|
+
} else {
|
|
7318
|
+
var gamma0x = W[i - 15];
|
|
7319
|
+
var gamma0xh = gamma0x.high;
|
|
7320
|
+
var gamma0xl = gamma0x.low;
|
|
7321
|
+
var gamma0h = (gamma0xh >>> 1 | gamma0xl << 31) ^ (gamma0xh >>> 8 | gamma0xl << 24) ^ gamma0xh >>> 7;
|
|
7322
|
+
var gamma0l = (gamma0xl >>> 1 | gamma0xh << 31) ^ (gamma0xl >>> 8 | gamma0xh << 24) ^ (gamma0xl >>> 7 | gamma0xh << 25);
|
|
7323
|
+
var gamma1x = W[i - 2];
|
|
7324
|
+
var gamma1xh = gamma1x.high;
|
|
7325
|
+
var gamma1xl = gamma1x.low;
|
|
7326
|
+
var gamma1h = (gamma1xh >>> 19 | gamma1xl << 13) ^ (gamma1xh << 3 | gamma1xl >>> 29) ^ gamma1xh >>> 6;
|
|
7327
|
+
var gamma1l = (gamma1xl >>> 19 | gamma1xh << 13) ^ (gamma1xl << 3 | gamma1xh >>> 29) ^ (gamma1xl >>> 6 | gamma1xh << 26);
|
|
7328
|
+
var Wi7 = W[i - 7];
|
|
7329
|
+
var Wi7h = Wi7.high;
|
|
7330
|
+
var Wi7l = Wi7.low;
|
|
7331
|
+
var Wi16 = W[i - 16];
|
|
7332
|
+
var Wi16h = Wi16.high;
|
|
7333
|
+
var Wi16l = Wi16.low;
|
|
7334
|
+
Wil = gamma0l + Wi7l;
|
|
7335
|
+
Wih = gamma0h + Wi7h + (Wil >>> 0 < gamma0l >>> 0 ? 1 : 0);
|
|
7336
|
+
Wil = Wil + gamma1l;
|
|
7337
|
+
Wih = Wih + gamma1h + (Wil >>> 0 < gamma1l >>> 0 ? 1 : 0);
|
|
7338
|
+
Wil = Wil + Wi16l;
|
|
7339
|
+
Wih = Wih + Wi16h + (Wil >>> 0 < Wi16l >>> 0 ? 1 : 0);
|
|
7340
|
+
Wi.high = Wih;
|
|
7341
|
+
Wi.low = Wil;
|
|
7342
|
+
}
|
|
7343
|
+
var chh = eh & fh ^ ~eh & gh;
|
|
7344
|
+
var chl = el & fl ^ ~el & gl;
|
|
7345
|
+
var majh = ah & bh ^ ah & ch ^ bh & ch;
|
|
7346
|
+
var majl = al & bl ^ al & cl ^ bl & cl;
|
|
7347
|
+
var sigma0h = (ah >>> 28 | al << 4) ^ (ah << 30 | al >>> 2) ^ (ah << 25 | al >>> 7);
|
|
7348
|
+
var sigma0l = (al >>> 28 | ah << 4) ^ (al << 30 | ah >>> 2) ^ (al << 25 | ah >>> 7);
|
|
7349
|
+
var sigma1h = (eh >>> 14 | el << 18) ^ (eh >>> 18 | el << 14) ^ (eh << 23 | el >>> 9);
|
|
7350
|
+
var sigma1l = (el >>> 14 | eh << 18) ^ (el >>> 18 | eh << 14) ^ (el << 23 | eh >>> 9);
|
|
7351
|
+
var Ki = K[i];
|
|
7352
|
+
var Kih = Ki.high;
|
|
7353
|
+
var Kil = Ki.low;
|
|
7354
|
+
var t1l = hl + sigma1l;
|
|
7355
|
+
var t1h = hh + sigma1h + (t1l >>> 0 < hl >>> 0 ? 1 : 0);
|
|
7356
|
+
var t1l = t1l + chl;
|
|
7357
|
+
var t1h = t1h + chh + (t1l >>> 0 < chl >>> 0 ? 1 : 0);
|
|
7358
|
+
var t1l = t1l + Kil;
|
|
7359
|
+
var t1h = t1h + Kih + (t1l >>> 0 < Kil >>> 0 ? 1 : 0);
|
|
7360
|
+
var t1l = t1l + Wil;
|
|
7361
|
+
var t1h = t1h + Wih + (t1l >>> 0 < Wil >>> 0 ? 1 : 0);
|
|
7362
|
+
var t2l = sigma0l + majl;
|
|
7363
|
+
var t2h = sigma0h + majh + (t2l >>> 0 < sigma0l >>> 0 ? 1 : 0);
|
|
7364
|
+
hh = gh;
|
|
7365
|
+
hl = gl;
|
|
7366
|
+
gh = fh;
|
|
7367
|
+
gl = fl;
|
|
7368
|
+
fh = eh;
|
|
7369
|
+
fl = el;
|
|
7370
|
+
el = dl + t1l | 0;
|
|
7371
|
+
eh = dh + t1h + (el >>> 0 < dl >>> 0 ? 1 : 0) | 0;
|
|
7372
|
+
dh = ch;
|
|
7373
|
+
dl = cl;
|
|
7374
|
+
ch = bh;
|
|
7375
|
+
cl = bl;
|
|
7376
|
+
bh = ah;
|
|
7377
|
+
bl = al;
|
|
7378
|
+
al = t1l + t2l | 0;
|
|
7379
|
+
ah = t1h + t2h + (al >>> 0 < t1l >>> 0 ? 1 : 0) | 0;
|
|
7380
|
+
}
|
|
7381
|
+
H0l = H0.low = H0l + al;
|
|
7382
|
+
H0.high = H0h + ah + (H0l >>> 0 < al >>> 0 ? 1 : 0);
|
|
7383
|
+
H1l = H1.low = H1l + bl;
|
|
7384
|
+
H1.high = H1h + bh + (H1l >>> 0 < bl >>> 0 ? 1 : 0);
|
|
7385
|
+
H2l = H2.low = H2l + cl;
|
|
7386
|
+
H2.high = H2h + ch + (H2l >>> 0 < cl >>> 0 ? 1 : 0);
|
|
7387
|
+
H3l = H3.low = H3l + dl;
|
|
7388
|
+
H3.high = H3h + dh + (H3l >>> 0 < dl >>> 0 ? 1 : 0);
|
|
7389
|
+
H4l = H4.low = H4l + el;
|
|
7390
|
+
H4.high = H4h + eh + (H4l >>> 0 < el >>> 0 ? 1 : 0);
|
|
7391
|
+
H5l = H5.low = H5l + fl;
|
|
7392
|
+
H5.high = H5h + fh + (H5l >>> 0 < fl >>> 0 ? 1 : 0);
|
|
7393
|
+
H6l = H6.low = H6l + gl;
|
|
7394
|
+
H6.high = H6h + gh + (H6l >>> 0 < gl >>> 0 ? 1 : 0);
|
|
7395
|
+
H7l = H7.low = H7l + hl;
|
|
7396
|
+
H7.high = H7h + hh + (H7l >>> 0 < hl >>> 0 ? 1 : 0);
|
|
7397
|
+
},
|
|
7398
|
+
_doFinalize: function() {
|
|
7399
|
+
var data2 = this._data;
|
|
7400
|
+
var dataWords = data2.words;
|
|
7401
|
+
var nBitsTotal = this._nDataBytes * 8;
|
|
7402
|
+
var nBitsLeft = data2.sigBytes * 8;
|
|
7403
|
+
dataWords[nBitsLeft >>> 5] |= 128 << 24 - nBitsLeft % 32;
|
|
7404
|
+
dataWords[(nBitsLeft + 128 >>> 10 << 5) + 30] = Math.floor(nBitsTotal / 4294967296);
|
|
7405
|
+
dataWords[(nBitsLeft + 128 >>> 10 << 5) + 31] = nBitsTotal;
|
|
7406
|
+
data2.sigBytes = dataWords.length * 4;
|
|
7407
|
+
this._process();
|
|
7408
|
+
var hash = this._hash.toX32();
|
|
7409
|
+
return hash;
|
|
7410
|
+
},
|
|
7411
|
+
clone: function() {
|
|
7412
|
+
var clone = Hasher.clone.call(this);
|
|
7413
|
+
clone._hash = this._hash.clone();
|
|
7414
|
+
return clone;
|
|
7415
|
+
},
|
|
7416
|
+
blockSize: 1024 / 32
|
|
7417
|
+
});
|
|
7418
|
+
C.SHA512 = Hasher._createHelper(SHA512);
|
|
7419
|
+
C.HmacSHA512 = Hasher._createHmacHelper(SHA512);
|
|
7420
|
+
})();
|
|
7421
|
+
return CryptoJS2.SHA512;
|
|
7422
|
+
});
|
|
7423
|
+
})(sha512);
|
|
7424
|
+
return sha512.exports;
|
|
7425
|
+
}
|
|
7426
|
+
var sha384 = { exports: {} };
|
|
7427
|
+
var hasRequiredSha384;
|
|
7428
|
+
function requireSha384() {
|
|
7429
|
+
if (hasRequiredSha384)
|
|
7430
|
+
return sha384.exports;
|
|
7431
|
+
hasRequiredSha384 = 1;
|
|
7432
|
+
(function(module, exports) {
|
|
7433
|
+
(function(root, factory, undef) {
|
|
7434
|
+
{
|
|
7435
|
+
module.exports = factory(requireCore(), requireX64Core(), requireSha512());
|
|
7436
|
+
}
|
|
7437
|
+
})(commonjsGlobal, function(CryptoJS2) {
|
|
7438
|
+
(function() {
|
|
7439
|
+
var C = CryptoJS2;
|
|
7440
|
+
var C_x64 = C.x64;
|
|
7441
|
+
var X64Word = C_x64.Word;
|
|
7442
|
+
var X64WordArray = C_x64.WordArray;
|
|
7443
|
+
var C_algo = C.algo;
|
|
7444
|
+
var SHA512 = C_algo.SHA512;
|
|
7445
|
+
var SHA384 = C_algo.SHA384 = SHA512.extend({
|
|
7446
|
+
_doReset: function() {
|
|
7447
|
+
this._hash = new X64WordArray.init([
|
|
7448
|
+
new X64Word.init(3418070365, 3238371032),
|
|
7449
|
+
new X64Word.init(1654270250, 914150663),
|
|
7450
|
+
new X64Word.init(2438529370, 812702999),
|
|
7451
|
+
new X64Word.init(355462360, 4144912697),
|
|
7452
|
+
new X64Word.init(1731405415, 4290775857),
|
|
7453
|
+
new X64Word.init(2394180231, 1750603025),
|
|
7454
|
+
new X64Word.init(3675008525, 1694076839),
|
|
7455
|
+
new X64Word.init(1203062813, 3204075428)
|
|
7456
|
+
]);
|
|
7457
|
+
},
|
|
7458
|
+
_doFinalize: function() {
|
|
7459
|
+
var hash = SHA512._doFinalize.call(this);
|
|
7460
|
+
hash.sigBytes -= 16;
|
|
7461
|
+
return hash;
|
|
7462
|
+
}
|
|
7463
|
+
});
|
|
7464
|
+
C.SHA384 = SHA512._createHelper(SHA384);
|
|
7465
|
+
C.HmacSHA384 = SHA512._createHmacHelper(SHA384);
|
|
7466
|
+
})();
|
|
7467
|
+
return CryptoJS2.SHA384;
|
|
7468
|
+
});
|
|
7469
|
+
})(sha384);
|
|
7470
|
+
return sha384.exports;
|
|
7471
|
+
}
|
|
7472
|
+
var sha3 = { exports: {} };
|
|
7473
|
+
var hasRequiredSha3;
|
|
7474
|
+
function requireSha3() {
|
|
7475
|
+
if (hasRequiredSha3)
|
|
7476
|
+
return sha3.exports;
|
|
7477
|
+
hasRequiredSha3 = 1;
|
|
7478
|
+
(function(module, exports) {
|
|
7479
|
+
(function(root, factory, undef) {
|
|
7480
|
+
{
|
|
7481
|
+
module.exports = factory(requireCore(), requireX64Core());
|
|
7482
|
+
}
|
|
7483
|
+
})(commonjsGlobal, function(CryptoJS2) {
|
|
7484
|
+
(function(Math2) {
|
|
7485
|
+
var C = CryptoJS2;
|
|
7486
|
+
var C_lib = C.lib;
|
|
7487
|
+
var WordArray = C_lib.WordArray;
|
|
7488
|
+
var Hasher = C_lib.Hasher;
|
|
7489
|
+
var C_x64 = C.x64;
|
|
7490
|
+
var X64Word = C_x64.Word;
|
|
7491
|
+
var C_algo = C.algo;
|
|
7492
|
+
var RHO_OFFSETS = [];
|
|
7493
|
+
var PI_INDEXES = [];
|
|
7494
|
+
var ROUND_CONSTANTS = [];
|
|
7495
|
+
(function() {
|
|
7496
|
+
var x = 1, y = 0;
|
|
7497
|
+
for (var t = 0; t < 24; t++) {
|
|
7498
|
+
RHO_OFFSETS[x + 5 * y] = (t + 1) * (t + 2) / 2 % 64;
|
|
7499
|
+
var newX = y % 5;
|
|
7500
|
+
var newY = (2 * x + 3 * y) % 5;
|
|
7501
|
+
x = newX;
|
|
7502
|
+
y = newY;
|
|
7503
|
+
}
|
|
7504
|
+
for (var x = 0; x < 5; x++) {
|
|
7505
|
+
for (var y = 0; y < 5; y++) {
|
|
7506
|
+
PI_INDEXES[x + 5 * y] = y + (2 * x + 3 * y) % 5 * 5;
|
|
7507
|
+
}
|
|
7508
|
+
}
|
|
7509
|
+
var LFSR = 1;
|
|
7510
|
+
for (var i = 0; i < 24; i++) {
|
|
7511
|
+
var roundConstantMsw = 0;
|
|
7512
|
+
var roundConstantLsw = 0;
|
|
7513
|
+
for (var j = 0; j < 7; j++) {
|
|
7514
|
+
if (LFSR & 1) {
|
|
7515
|
+
var bitPosition = (1 << j) - 1;
|
|
7516
|
+
if (bitPosition < 32) {
|
|
7517
|
+
roundConstantLsw ^= 1 << bitPosition;
|
|
7518
|
+
} else {
|
|
7519
|
+
roundConstantMsw ^= 1 << bitPosition - 32;
|
|
7520
|
+
}
|
|
7521
|
+
}
|
|
7522
|
+
if (LFSR & 128) {
|
|
7523
|
+
LFSR = LFSR << 1 ^ 113;
|
|
7524
|
+
} else {
|
|
7525
|
+
LFSR <<= 1;
|
|
7526
|
+
}
|
|
7527
|
+
}
|
|
7528
|
+
ROUND_CONSTANTS[i] = X64Word.create(roundConstantMsw, roundConstantLsw);
|
|
7529
|
+
}
|
|
7530
|
+
})();
|
|
7531
|
+
var T = [];
|
|
7532
|
+
(function() {
|
|
7533
|
+
for (var i = 0; i < 25; i++) {
|
|
7534
|
+
T[i] = X64Word.create();
|
|
7535
|
+
}
|
|
7536
|
+
})();
|
|
7537
|
+
var SHA3 = C_algo.SHA3 = Hasher.extend({
|
|
7538
|
+
/**
|
|
7539
|
+
* Configuration options.
|
|
7540
|
+
*
|
|
7541
|
+
* @property {number} outputLength
|
|
7542
|
+
* The desired number of bits in the output hash.
|
|
7543
|
+
* Only values permitted are: 224, 256, 384, 512.
|
|
7544
|
+
* Default: 512
|
|
7545
|
+
*/
|
|
7546
|
+
cfg: Hasher.cfg.extend({
|
|
7547
|
+
outputLength: 512
|
|
7548
|
+
}),
|
|
7549
|
+
_doReset: function() {
|
|
7550
|
+
var state = this._state = [];
|
|
7551
|
+
for (var i = 0; i < 25; i++) {
|
|
7552
|
+
state[i] = new X64Word.init();
|
|
7553
|
+
}
|
|
7554
|
+
this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32;
|
|
7555
|
+
},
|
|
7556
|
+
_doProcessBlock: function(M, offset) {
|
|
7557
|
+
var state = this._state;
|
|
7558
|
+
var nBlockSizeLanes = this.blockSize / 2;
|
|
7559
|
+
for (var i = 0; i < nBlockSizeLanes; i++) {
|
|
7560
|
+
var M2i = M[offset + 2 * i];
|
|
7561
|
+
var M2i1 = M[offset + 2 * i + 1];
|
|
7562
|
+
M2i = (M2i << 8 | M2i >>> 24) & 16711935 | (M2i << 24 | M2i >>> 8) & 4278255360;
|
|
7563
|
+
M2i1 = (M2i1 << 8 | M2i1 >>> 24) & 16711935 | (M2i1 << 24 | M2i1 >>> 8) & 4278255360;
|
|
7564
|
+
var lane = state[i];
|
|
7565
|
+
lane.high ^= M2i1;
|
|
7566
|
+
lane.low ^= M2i;
|
|
7567
|
+
}
|
|
7568
|
+
for (var round = 0; round < 24; round++) {
|
|
7569
|
+
for (var x = 0; x < 5; x++) {
|
|
7570
|
+
var tMsw = 0, tLsw = 0;
|
|
7571
|
+
for (var y = 0; y < 5; y++) {
|
|
7572
|
+
var lane = state[x + 5 * y];
|
|
7573
|
+
tMsw ^= lane.high;
|
|
7574
|
+
tLsw ^= lane.low;
|
|
7575
|
+
}
|
|
7576
|
+
var Tx = T[x];
|
|
7577
|
+
Tx.high = tMsw;
|
|
7578
|
+
Tx.low = tLsw;
|
|
7579
|
+
}
|
|
7580
|
+
for (var x = 0; x < 5; x++) {
|
|
7581
|
+
var Tx4 = T[(x + 4) % 5];
|
|
7582
|
+
var Tx1 = T[(x + 1) % 5];
|
|
7583
|
+
var Tx1Msw = Tx1.high;
|
|
7584
|
+
var Tx1Lsw = Tx1.low;
|
|
7585
|
+
var tMsw = Tx4.high ^ (Tx1Msw << 1 | Tx1Lsw >>> 31);
|
|
7586
|
+
var tLsw = Tx4.low ^ (Tx1Lsw << 1 | Tx1Msw >>> 31);
|
|
7587
|
+
for (var y = 0; y < 5; y++) {
|
|
7588
|
+
var lane = state[x + 5 * y];
|
|
7589
|
+
lane.high ^= tMsw;
|
|
7590
|
+
lane.low ^= tLsw;
|
|
7591
|
+
}
|
|
7592
|
+
}
|
|
7593
|
+
for (var laneIndex = 1; laneIndex < 25; laneIndex++) {
|
|
7594
|
+
var tMsw;
|
|
7595
|
+
var tLsw;
|
|
7596
|
+
var lane = state[laneIndex];
|
|
7597
|
+
var laneMsw = lane.high;
|
|
7598
|
+
var laneLsw = lane.low;
|
|
7599
|
+
var rhoOffset = RHO_OFFSETS[laneIndex];
|
|
7600
|
+
if (rhoOffset < 32) {
|
|
7601
|
+
tMsw = laneMsw << rhoOffset | laneLsw >>> 32 - rhoOffset;
|
|
7602
|
+
tLsw = laneLsw << rhoOffset | laneMsw >>> 32 - rhoOffset;
|
|
7603
|
+
} else {
|
|
7604
|
+
tMsw = laneLsw << rhoOffset - 32 | laneMsw >>> 64 - rhoOffset;
|
|
7605
|
+
tLsw = laneMsw << rhoOffset - 32 | laneLsw >>> 64 - rhoOffset;
|
|
7606
|
+
}
|
|
7607
|
+
var TPiLane = T[PI_INDEXES[laneIndex]];
|
|
7608
|
+
TPiLane.high = tMsw;
|
|
7609
|
+
TPiLane.low = tLsw;
|
|
7610
|
+
}
|
|
7611
|
+
var T0 = T[0];
|
|
7612
|
+
var state0 = state[0];
|
|
7613
|
+
T0.high = state0.high;
|
|
7614
|
+
T0.low = state0.low;
|
|
7615
|
+
for (var x = 0; x < 5; x++) {
|
|
7616
|
+
for (var y = 0; y < 5; y++) {
|
|
7617
|
+
var laneIndex = x + 5 * y;
|
|
7618
|
+
var lane = state[laneIndex];
|
|
7619
|
+
var TLane = T[laneIndex];
|
|
7620
|
+
var Tx1Lane = T[(x + 1) % 5 + 5 * y];
|
|
7621
|
+
var Tx2Lane = T[(x + 2) % 5 + 5 * y];
|
|
7622
|
+
lane.high = TLane.high ^ ~Tx1Lane.high & Tx2Lane.high;
|
|
7623
|
+
lane.low = TLane.low ^ ~Tx1Lane.low & Tx2Lane.low;
|
|
7624
|
+
}
|
|
7625
|
+
}
|
|
7626
|
+
var lane = state[0];
|
|
7627
|
+
var roundConstant = ROUND_CONSTANTS[round];
|
|
7628
|
+
lane.high ^= roundConstant.high;
|
|
7629
|
+
lane.low ^= roundConstant.low;
|
|
7630
|
+
}
|
|
7631
|
+
},
|
|
7632
|
+
_doFinalize: function() {
|
|
7633
|
+
var data2 = this._data;
|
|
7634
|
+
var dataWords = data2.words;
|
|
7635
|
+
this._nDataBytes * 8;
|
|
7636
|
+
var nBitsLeft = data2.sigBytes * 8;
|
|
7637
|
+
var blockSizeBits = this.blockSize * 32;
|
|
7638
|
+
dataWords[nBitsLeft >>> 5] |= 1 << 24 - nBitsLeft % 32;
|
|
7639
|
+
dataWords[(Math2.ceil((nBitsLeft + 1) / blockSizeBits) * blockSizeBits >>> 5) - 1] |= 128;
|
|
7640
|
+
data2.sigBytes = dataWords.length * 4;
|
|
7641
|
+
this._process();
|
|
7642
|
+
var state = this._state;
|
|
7643
|
+
var outputLengthBytes = this.cfg.outputLength / 8;
|
|
7644
|
+
var outputLengthLanes = outputLengthBytes / 8;
|
|
7645
|
+
var hashWords = [];
|
|
7646
|
+
for (var i = 0; i < outputLengthLanes; i++) {
|
|
7647
|
+
var lane = state[i];
|
|
7648
|
+
var laneMsw = lane.high;
|
|
7649
|
+
var laneLsw = lane.low;
|
|
7650
|
+
laneMsw = (laneMsw << 8 | laneMsw >>> 24) & 16711935 | (laneMsw << 24 | laneMsw >>> 8) & 4278255360;
|
|
7651
|
+
laneLsw = (laneLsw << 8 | laneLsw >>> 24) & 16711935 | (laneLsw << 24 | laneLsw >>> 8) & 4278255360;
|
|
7652
|
+
hashWords.push(laneLsw);
|
|
7653
|
+
hashWords.push(laneMsw);
|
|
7654
|
+
}
|
|
7655
|
+
return new WordArray.init(hashWords, outputLengthBytes);
|
|
7656
|
+
},
|
|
7657
|
+
clone: function() {
|
|
7658
|
+
var clone = Hasher.clone.call(this);
|
|
7659
|
+
var state = clone._state = this._state.slice(0);
|
|
7660
|
+
for (var i = 0; i < 25; i++) {
|
|
7661
|
+
state[i] = state[i].clone();
|
|
7662
|
+
}
|
|
7663
|
+
return clone;
|
|
7664
|
+
}
|
|
7665
|
+
});
|
|
7666
|
+
C.SHA3 = Hasher._createHelper(SHA3);
|
|
7667
|
+
C.HmacSHA3 = Hasher._createHmacHelper(SHA3);
|
|
7668
|
+
})(Math);
|
|
7669
|
+
return CryptoJS2.SHA3;
|
|
7670
|
+
});
|
|
7671
|
+
})(sha3);
|
|
7672
|
+
return sha3.exports;
|
|
7673
|
+
}
|
|
7674
|
+
var ripemd160 = { exports: {} };
|
|
7675
|
+
var hasRequiredRipemd160;
|
|
7676
|
+
function requireRipemd160() {
|
|
7677
|
+
if (hasRequiredRipemd160)
|
|
7678
|
+
return ripemd160.exports;
|
|
7679
|
+
hasRequiredRipemd160 = 1;
|
|
7680
|
+
(function(module, exports) {
|
|
7681
|
+
(function(root, factory) {
|
|
7682
|
+
{
|
|
7683
|
+
module.exports = factory(requireCore());
|
|
7684
|
+
}
|
|
7685
|
+
})(commonjsGlobal, function(CryptoJS2) {
|
|
7686
|
+
/** @preserve
|
|
7687
|
+
(c) 2012 by Cédric Mesnil. All rights reserved.
|
|
7688
|
+
|
|
7689
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
7690
|
+
|
|
7691
|
+
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
7692
|
+
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
7693
|
+
|
|
7694
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
7695
|
+
*/
|
|
7696
|
+
(function(Math2) {
|
|
7697
|
+
var C = CryptoJS2;
|
|
7698
|
+
var C_lib = C.lib;
|
|
7699
|
+
var WordArray = C_lib.WordArray;
|
|
7700
|
+
var Hasher = C_lib.Hasher;
|
|
7701
|
+
var C_algo = C.algo;
|
|
7702
|
+
var _zl = WordArray.create([
|
|
7703
|
+
0,
|
|
7704
|
+
1,
|
|
7705
|
+
2,
|
|
7706
|
+
3,
|
|
7707
|
+
4,
|
|
7708
|
+
5,
|
|
7709
|
+
6,
|
|
7710
|
+
7,
|
|
7711
|
+
8,
|
|
7712
|
+
9,
|
|
7713
|
+
10,
|
|
7714
|
+
11,
|
|
7715
|
+
12,
|
|
7716
|
+
13,
|
|
7717
|
+
14,
|
|
7718
|
+
15,
|
|
7719
|
+
7,
|
|
7720
|
+
4,
|
|
7721
|
+
13,
|
|
7722
|
+
1,
|
|
7723
|
+
10,
|
|
7724
|
+
6,
|
|
7725
|
+
15,
|
|
7726
|
+
3,
|
|
7727
|
+
12,
|
|
7728
|
+
0,
|
|
7729
|
+
9,
|
|
7730
|
+
5,
|
|
7731
|
+
2,
|
|
7732
|
+
14,
|
|
7733
|
+
11,
|
|
7734
|
+
8,
|
|
7735
|
+
3,
|
|
7736
|
+
10,
|
|
7737
|
+
14,
|
|
7738
|
+
4,
|
|
7739
|
+
9,
|
|
7740
|
+
15,
|
|
7741
|
+
8,
|
|
7742
|
+
1,
|
|
7743
|
+
2,
|
|
7744
|
+
7,
|
|
7745
|
+
0,
|
|
7746
|
+
6,
|
|
7747
|
+
13,
|
|
7748
|
+
11,
|
|
7749
|
+
5,
|
|
7750
|
+
12,
|
|
7751
|
+
1,
|
|
7752
|
+
9,
|
|
7753
|
+
11,
|
|
7754
|
+
10,
|
|
7755
|
+
0,
|
|
7756
|
+
8,
|
|
7757
|
+
12,
|
|
7758
|
+
4,
|
|
7759
|
+
13,
|
|
7760
|
+
3,
|
|
7761
|
+
7,
|
|
7762
|
+
15,
|
|
7763
|
+
14,
|
|
7764
|
+
5,
|
|
7765
|
+
6,
|
|
7766
|
+
2,
|
|
7767
|
+
4,
|
|
7768
|
+
0,
|
|
7769
|
+
5,
|
|
7770
|
+
9,
|
|
7771
|
+
7,
|
|
7772
|
+
12,
|
|
7773
|
+
2,
|
|
7774
|
+
10,
|
|
7775
|
+
14,
|
|
7776
|
+
1,
|
|
7777
|
+
3,
|
|
7778
|
+
8,
|
|
7779
|
+
11,
|
|
7780
|
+
6,
|
|
7781
|
+
15,
|
|
7782
|
+
13
|
|
7783
|
+
]);
|
|
7784
|
+
var _zr = WordArray.create([
|
|
7785
|
+
5,
|
|
7786
|
+
14,
|
|
7787
|
+
7,
|
|
7788
|
+
0,
|
|
7789
|
+
9,
|
|
7790
|
+
2,
|
|
7791
|
+
11,
|
|
7792
|
+
4,
|
|
7793
|
+
13,
|
|
7794
|
+
6,
|
|
7795
|
+
15,
|
|
7796
|
+
8,
|
|
7797
|
+
1,
|
|
7798
|
+
10,
|
|
7799
|
+
3,
|
|
7800
|
+
12,
|
|
7801
|
+
6,
|
|
7802
|
+
11,
|
|
7803
|
+
3,
|
|
7804
|
+
7,
|
|
7805
|
+
0,
|
|
7806
|
+
13,
|
|
7807
|
+
5,
|
|
7808
|
+
10,
|
|
7809
|
+
14,
|
|
7810
|
+
15,
|
|
7811
|
+
8,
|
|
7812
|
+
12,
|
|
7813
|
+
4,
|
|
7814
|
+
9,
|
|
7815
|
+
1,
|
|
7816
|
+
2,
|
|
7817
|
+
15,
|
|
7818
|
+
5,
|
|
7819
|
+
1,
|
|
7820
|
+
3,
|
|
7821
|
+
7,
|
|
7822
|
+
14,
|
|
7823
|
+
6,
|
|
7824
|
+
9,
|
|
7825
|
+
11,
|
|
7826
|
+
8,
|
|
7827
|
+
12,
|
|
7828
|
+
2,
|
|
7829
|
+
10,
|
|
7830
|
+
0,
|
|
7831
|
+
4,
|
|
7832
|
+
13,
|
|
7833
|
+
8,
|
|
7834
|
+
6,
|
|
7835
|
+
4,
|
|
7836
|
+
1,
|
|
7837
|
+
3,
|
|
7838
|
+
11,
|
|
7839
|
+
15,
|
|
7840
|
+
0,
|
|
7841
|
+
5,
|
|
7842
|
+
12,
|
|
7843
|
+
2,
|
|
7844
|
+
13,
|
|
7845
|
+
9,
|
|
7846
|
+
7,
|
|
7847
|
+
10,
|
|
7848
|
+
14,
|
|
7849
|
+
12,
|
|
7850
|
+
15,
|
|
7851
|
+
10,
|
|
7852
|
+
4,
|
|
7853
|
+
1,
|
|
7854
|
+
5,
|
|
7855
|
+
8,
|
|
7856
|
+
7,
|
|
7857
|
+
6,
|
|
7858
|
+
2,
|
|
7859
|
+
13,
|
|
7860
|
+
14,
|
|
7861
|
+
0,
|
|
7862
|
+
3,
|
|
7863
|
+
9,
|
|
7864
|
+
11
|
|
7865
|
+
]);
|
|
7866
|
+
var _sl = WordArray.create([
|
|
7867
|
+
11,
|
|
7868
|
+
14,
|
|
7869
|
+
15,
|
|
7870
|
+
12,
|
|
7871
|
+
5,
|
|
7872
|
+
8,
|
|
7873
|
+
7,
|
|
7874
|
+
9,
|
|
7875
|
+
11,
|
|
7876
|
+
13,
|
|
7877
|
+
14,
|
|
7878
|
+
15,
|
|
7879
|
+
6,
|
|
7880
|
+
7,
|
|
7881
|
+
9,
|
|
7882
|
+
8,
|
|
7883
|
+
7,
|
|
7884
|
+
6,
|
|
7885
|
+
8,
|
|
7886
|
+
13,
|
|
7887
|
+
11,
|
|
7888
|
+
9,
|
|
7889
|
+
7,
|
|
7890
|
+
15,
|
|
7891
|
+
7,
|
|
7892
|
+
12,
|
|
7893
|
+
15,
|
|
7894
|
+
9,
|
|
7895
|
+
11,
|
|
7896
|
+
7,
|
|
7897
|
+
13,
|
|
7898
|
+
12,
|
|
7899
|
+
11,
|
|
7900
|
+
13,
|
|
7901
|
+
6,
|
|
7902
|
+
7,
|
|
7903
|
+
14,
|
|
7904
|
+
9,
|
|
7905
|
+
13,
|
|
7906
|
+
15,
|
|
7907
|
+
14,
|
|
7908
|
+
8,
|
|
7909
|
+
13,
|
|
7910
|
+
6,
|
|
7911
|
+
5,
|
|
7912
|
+
12,
|
|
7913
|
+
7,
|
|
7914
|
+
5,
|
|
7915
|
+
11,
|
|
7916
|
+
12,
|
|
7917
|
+
14,
|
|
7918
|
+
15,
|
|
7919
|
+
14,
|
|
7920
|
+
15,
|
|
7921
|
+
9,
|
|
7922
|
+
8,
|
|
7923
|
+
9,
|
|
7924
|
+
14,
|
|
7925
|
+
5,
|
|
7926
|
+
6,
|
|
7927
|
+
8,
|
|
7928
|
+
6,
|
|
7929
|
+
5,
|
|
7930
|
+
12,
|
|
7931
|
+
9,
|
|
7932
|
+
15,
|
|
7933
|
+
5,
|
|
7934
|
+
11,
|
|
7935
|
+
6,
|
|
7936
|
+
8,
|
|
7937
|
+
13,
|
|
7938
|
+
12,
|
|
7939
|
+
5,
|
|
7940
|
+
12,
|
|
7941
|
+
13,
|
|
7942
|
+
14,
|
|
7943
|
+
11,
|
|
7944
|
+
8,
|
|
7945
|
+
5,
|
|
7946
|
+
6
|
|
7947
|
+
]);
|
|
7948
|
+
var _sr = WordArray.create([
|
|
7949
|
+
8,
|
|
7950
|
+
9,
|
|
7951
|
+
9,
|
|
7952
|
+
11,
|
|
7953
|
+
13,
|
|
7954
|
+
15,
|
|
7955
|
+
15,
|
|
7956
|
+
5,
|
|
7957
|
+
7,
|
|
7958
|
+
7,
|
|
7959
|
+
8,
|
|
7960
|
+
11,
|
|
7961
|
+
14,
|
|
7962
|
+
14,
|
|
7963
|
+
12,
|
|
7964
|
+
6,
|
|
7965
|
+
9,
|
|
7966
|
+
13,
|
|
7967
|
+
15,
|
|
7968
|
+
7,
|
|
7969
|
+
12,
|
|
7970
|
+
8,
|
|
7971
|
+
9,
|
|
7972
|
+
11,
|
|
7973
|
+
7,
|
|
7974
|
+
7,
|
|
7975
|
+
12,
|
|
7976
|
+
7,
|
|
7977
|
+
6,
|
|
7978
|
+
15,
|
|
7979
|
+
13,
|
|
7980
|
+
11,
|
|
7981
|
+
9,
|
|
7982
|
+
7,
|
|
7983
|
+
15,
|
|
7984
|
+
11,
|
|
7985
|
+
8,
|
|
7986
|
+
6,
|
|
7987
|
+
6,
|
|
7988
|
+
14,
|
|
7989
|
+
12,
|
|
7990
|
+
13,
|
|
7991
|
+
5,
|
|
7992
|
+
14,
|
|
7993
|
+
13,
|
|
7994
|
+
13,
|
|
7995
|
+
7,
|
|
7996
|
+
5,
|
|
7997
|
+
15,
|
|
7998
|
+
5,
|
|
7999
|
+
8,
|
|
8000
|
+
11,
|
|
8001
|
+
14,
|
|
8002
|
+
14,
|
|
8003
|
+
6,
|
|
8004
|
+
14,
|
|
8005
|
+
6,
|
|
8006
|
+
9,
|
|
8007
|
+
12,
|
|
8008
|
+
9,
|
|
8009
|
+
12,
|
|
8010
|
+
5,
|
|
8011
|
+
15,
|
|
8012
|
+
8,
|
|
8013
|
+
8,
|
|
8014
|
+
5,
|
|
8015
|
+
12,
|
|
8016
|
+
9,
|
|
8017
|
+
12,
|
|
8018
|
+
5,
|
|
8019
|
+
14,
|
|
8020
|
+
6,
|
|
8021
|
+
8,
|
|
8022
|
+
13,
|
|
8023
|
+
6,
|
|
8024
|
+
5,
|
|
8025
|
+
15,
|
|
8026
|
+
13,
|
|
8027
|
+
11,
|
|
8028
|
+
11
|
|
8029
|
+
]);
|
|
8030
|
+
var _hl = WordArray.create([0, 1518500249, 1859775393, 2400959708, 2840853838]);
|
|
8031
|
+
var _hr = WordArray.create([1352829926, 1548603684, 1836072691, 2053994217, 0]);
|
|
8032
|
+
var RIPEMD160 = C_algo.RIPEMD160 = Hasher.extend({
|
|
8033
|
+
_doReset: function() {
|
|
8034
|
+
this._hash = WordArray.create([1732584193, 4023233417, 2562383102, 271733878, 3285377520]);
|
|
8035
|
+
},
|
|
8036
|
+
_doProcessBlock: function(M, offset) {
|
|
8037
|
+
for (var i = 0; i < 16; i++) {
|
|
8038
|
+
var offset_i = offset + i;
|
|
8039
|
+
var M_offset_i = M[offset_i];
|
|
8040
|
+
M[offset_i] = (M_offset_i << 8 | M_offset_i >>> 24) & 16711935 | (M_offset_i << 24 | M_offset_i >>> 8) & 4278255360;
|
|
8041
|
+
}
|
|
8042
|
+
var H = this._hash.words;
|
|
8043
|
+
var hl = _hl.words;
|
|
8044
|
+
var hr = _hr.words;
|
|
8045
|
+
var zl = _zl.words;
|
|
8046
|
+
var zr = _zr.words;
|
|
8047
|
+
var sl = _sl.words;
|
|
8048
|
+
var sr = _sr.words;
|
|
8049
|
+
var al, bl, cl, dl, el;
|
|
8050
|
+
var ar, br, cr, dr, er;
|
|
8051
|
+
ar = al = H[0];
|
|
8052
|
+
br = bl = H[1];
|
|
8053
|
+
cr = cl = H[2];
|
|
8054
|
+
dr = dl = H[3];
|
|
8055
|
+
er = el = H[4];
|
|
8056
|
+
var t;
|
|
8057
|
+
for (var i = 0; i < 80; i += 1) {
|
|
8058
|
+
t = al + M[offset + zl[i]] | 0;
|
|
8059
|
+
if (i < 16) {
|
|
8060
|
+
t += f1(bl, cl, dl) + hl[0];
|
|
8061
|
+
} else if (i < 32) {
|
|
8062
|
+
t += f2(bl, cl, dl) + hl[1];
|
|
8063
|
+
} else if (i < 48) {
|
|
8064
|
+
t += f3(bl, cl, dl) + hl[2];
|
|
8065
|
+
} else if (i < 64) {
|
|
8066
|
+
t += f4(bl, cl, dl) + hl[3];
|
|
8067
|
+
} else {
|
|
8068
|
+
t += f5(bl, cl, dl) + hl[4];
|
|
8069
|
+
}
|
|
8070
|
+
t = t | 0;
|
|
8071
|
+
t = rotl(t, sl[i]);
|
|
8072
|
+
t = t + el | 0;
|
|
8073
|
+
al = el;
|
|
8074
|
+
el = dl;
|
|
8075
|
+
dl = rotl(cl, 10);
|
|
8076
|
+
cl = bl;
|
|
8077
|
+
bl = t;
|
|
8078
|
+
t = ar + M[offset + zr[i]] | 0;
|
|
8079
|
+
if (i < 16) {
|
|
8080
|
+
t += f5(br, cr, dr) + hr[0];
|
|
8081
|
+
} else if (i < 32) {
|
|
8082
|
+
t += f4(br, cr, dr) + hr[1];
|
|
8083
|
+
} else if (i < 48) {
|
|
8084
|
+
t += f3(br, cr, dr) + hr[2];
|
|
8085
|
+
} else if (i < 64) {
|
|
8086
|
+
t += f2(br, cr, dr) + hr[3];
|
|
8087
|
+
} else {
|
|
8088
|
+
t += f1(br, cr, dr) + hr[4];
|
|
8089
|
+
}
|
|
8090
|
+
t = t | 0;
|
|
8091
|
+
t = rotl(t, sr[i]);
|
|
8092
|
+
t = t + er | 0;
|
|
8093
|
+
ar = er;
|
|
8094
|
+
er = dr;
|
|
8095
|
+
dr = rotl(cr, 10);
|
|
8096
|
+
cr = br;
|
|
8097
|
+
br = t;
|
|
8098
|
+
}
|
|
8099
|
+
t = H[1] + cl + dr | 0;
|
|
8100
|
+
H[1] = H[2] + dl + er | 0;
|
|
8101
|
+
H[2] = H[3] + el + ar | 0;
|
|
8102
|
+
H[3] = H[4] + al + br | 0;
|
|
8103
|
+
H[4] = H[0] + bl + cr | 0;
|
|
8104
|
+
H[0] = t;
|
|
8105
|
+
},
|
|
8106
|
+
_doFinalize: function() {
|
|
8107
|
+
var data2 = this._data;
|
|
8108
|
+
var dataWords = data2.words;
|
|
8109
|
+
var nBitsTotal = this._nDataBytes * 8;
|
|
8110
|
+
var nBitsLeft = data2.sigBytes * 8;
|
|
8111
|
+
dataWords[nBitsLeft >>> 5] |= 128 << 24 - nBitsLeft % 32;
|
|
8112
|
+
dataWords[(nBitsLeft + 64 >>> 9 << 4) + 14] = (nBitsTotal << 8 | nBitsTotal >>> 24) & 16711935 | (nBitsTotal << 24 | nBitsTotal >>> 8) & 4278255360;
|
|
8113
|
+
data2.sigBytes = (dataWords.length + 1) * 4;
|
|
8114
|
+
this._process();
|
|
8115
|
+
var hash = this._hash;
|
|
8116
|
+
var H = hash.words;
|
|
8117
|
+
for (var i = 0; i < 5; i++) {
|
|
8118
|
+
var H_i = H[i];
|
|
8119
|
+
H[i] = (H_i << 8 | H_i >>> 24) & 16711935 | (H_i << 24 | H_i >>> 8) & 4278255360;
|
|
8120
|
+
}
|
|
8121
|
+
return hash;
|
|
8122
|
+
},
|
|
8123
|
+
clone: function() {
|
|
8124
|
+
var clone = Hasher.clone.call(this);
|
|
8125
|
+
clone._hash = this._hash.clone();
|
|
8126
|
+
return clone;
|
|
8127
|
+
}
|
|
8128
|
+
});
|
|
8129
|
+
function f1(x, y, z) {
|
|
8130
|
+
return x ^ y ^ z;
|
|
8131
|
+
}
|
|
8132
|
+
function f2(x, y, z) {
|
|
8133
|
+
return x & y | ~x & z;
|
|
8134
|
+
}
|
|
8135
|
+
function f3(x, y, z) {
|
|
8136
|
+
return (x | ~y) ^ z;
|
|
8137
|
+
}
|
|
8138
|
+
function f4(x, y, z) {
|
|
8139
|
+
return x & z | y & ~z;
|
|
8140
|
+
}
|
|
8141
|
+
function f5(x, y, z) {
|
|
8142
|
+
return x ^ (y | ~z);
|
|
8143
|
+
}
|
|
8144
|
+
function rotl(x, n) {
|
|
8145
|
+
return x << n | x >>> 32 - n;
|
|
8146
|
+
}
|
|
8147
|
+
C.RIPEMD160 = Hasher._createHelper(RIPEMD160);
|
|
8148
|
+
C.HmacRIPEMD160 = Hasher._createHmacHelper(RIPEMD160);
|
|
8149
|
+
})();
|
|
8150
|
+
return CryptoJS2.RIPEMD160;
|
|
8151
|
+
});
|
|
8152
|
+
})(ripemd160);
|
|
8153
|
+
return ripemd160.exports;
|
|
8154
|
+
}
|
|
8155
|
+
var pbkdf2 = { exports: {} };
|
|
8156
|
+
var hasRequiredPbkdf2;
|
|
8157
|
+
function requirePbkdf2() {
|
|
8158
|
+
if (hasRequiredPbkdf2)
|
|
8159
|
+
return pbkdf2.exports;
|
|
8160
|
+
hasRequiredPbkdf2 = 1;
|
|
8161
|
+
(function(module, exports) {
|
|
8162
|
+
(function(root, factory, undef) {
|
|
8163
|
+
{
|
|
8164
|
+
module.exports = factory(requireCore(), requireSha1(), requireHmac());
|
|
8165
|
+
}
|
|
8166
|
+
})(commonjsGlobal, function(CryptoJS2) {
|
|
8167
|
+
(function() {
|
|
8168
|
+
var C = CryptoJS2;
|
|
8169
|
+
var C_lib = C.lib;
|
|
8170
|
+
var Base = C_lib.Base;
|
|
8171
|
+
var WordArray = C_lib.WordArray;
|
|
8172
|
+
var C_algo = C.algo;
|
|
8173
|
+
var SHA1 = C_algo.SHA1;
|
|
8174
|
+
var HMAC = C_algo.HMAC;
|
|
8175
|
+
var PBKDF2 = C_algo.PBKDF2 = Base.extend({
|
|
8176
|
+
/**
|
|
8177
|
+
* Configuration options.
|
|
8178
|
+
*
|
|
8179
|
+
* @property {number} keySize The key size in words to generate. Default: 4 (128 bits)
|
|
8180
|
+
* @property {Hasher} hasher The hasher to use. Default: SHA1
|
|
8181
|
+
* @property {number} iterations The number of iterations to perform. Default: 1
|
|
8182
|
+
*/
|
|
8183
|
+
cfg: Base.extend({
|
|
8184
|
+
keySize: 128 / 32,
|
|
8185
|
+
hasher: SHA1,
|
|
8186
|
+
iterations: 1
|
|
8187
|
+
}),
|
|
8188
|
+
/**
|
|
8189
|
+
* Initializes a newly created key derivation function.
|
|
8190
|
+
*
|
|
8191
|
+
* @param {Object} cfg (Optional) The configuration options to use for the derivation.
|
|
8192
|
+
*
|
|
8193
|
+
* @example
|
|
8194
|
+
*
|
|
8195
|
+
* var kdf = CryptoJS.algo.PBKDF2.create();
|
|
8196
|
+
* var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8 });
|
|
8197
|
+
* var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8, iterations: 1000 });
|
|
8198
|
+
*/
|
|
8199
|
+
init: function(cfg) {
|
|
8200
|
+
this.cfg = this.cfg.extend(cfg);
|
|
8201
|
+
},
|
|
8202
|
+
/**
|
|
8203
|
+
* Computes the Password-Based Key Derivation Function 2.
|
|
8204
|
+
*
|
|
8205
|
+
* @param {WordArray|string} password The password.
|
|
8206
|
+
* @param {WordArray|string} salt A salt.
|
|
8207
|
+
*
|
|
8208
|
+
* @return {WordArray} The derived key.
|
|
8209
|
+
*
|
|
8210
|
+
* @example
|
|
8211
|
+
*
|
|
8212
|
+
* var key = kdf.compute(password, salt);
|
|
8213
|
+
*/
|
|
8214
|
+
compute: function(password, salt) {
|
|
8215
|
+
var cfg = this.cfg;
|
|
8216
|
+
var hmac2 = HMAC.create(cfg.hasher, password);
|
|
8217
|
+
var derivedKey = WordArray.create();
|
|
8218
|
+
var blockIndex = WordArray.create([1]);
|
|
8219
|
+
var derivedKeyWords = derivedKey.words;
|
|
8220
|
+
var blockIndexWords = blockIndex.words;
|
|
8221
|
+
var keySize = cfg.keySize;
|
|
8222
|
+
var iterations = cfg.iterations;
|
|
8223
|
+
while (derivedKeyWords.length < keySize) {
|
|
8224
|
+
var block = hmac2.update(salt).finalize(blockIndex);
|
|
8225
|
+
hmac2.reset();
|
|
8226
|
+
var blockWords = block.words;
|
|
8227
|
+
var blockWordsLength = blockWords.length;
|
|
8228
|
+
var intermediate = block;
|
|
8229
|
+
for (var i = 1; i < iterations; i++) {
|
|
8230
|
+
intermediate = hmac2.finalize(intermediate);
|
|
8231
|
+
hmac2.reset();
|
|
8232
|
+
var intermediateWords = intermediate.words;
|
|
8233
|
+
for (var j = 0; j < blockWordsLength; j++) {
|
|
8234
|
+
blockWords[j] ^= intermediateWords[j];
|
|
8235
|
+
}
|
|
8236
|
+
}
|
|
8237
|
+
derivedKey.concat(block);
|
|
8238
|
+
blockIndexWords[0]++;
|
|
8239
|
+
}
|
|
8240
|
+
derivedKey.sigBytes = keySize * 4;
|
|
8241
|
+
return derivedKey;
|
|
8242
|
+
}
|
|
8243
|
+
});
|
|
8244
|
+
C.PBKDF2 = function(password, salt, cfg) {
|
|
8245
|
+
return PBKDF2.create(cfg).compute(password, salt);
|
|
8246
|
+
};
|
|
8247
|
+
})();
|
|
8248
|
+
return CryptoJS2.PBKDF2;
|
|
8249
|
+
});
|
|
8250
|
+
})(pbkdf2);
|
|
8251
|
+
return pbkdf2.exports;
|
|
8252
|
+
}
|
|
8253
|
+
var modeCfb = { exports: {} };
|
|
8254
|
+
var hasRequiredModeCfb;
|
|
8255
|
+
function requireModeCfb() {
|
|
8256
|
+
if (hasRequiredModeCfb)
|
|
8257
|
+
return modeCfb.exports;
|
|
8258
|
+
hasRequiredModeCfb = 1;
|
|
8259
|
+
(function(module, exports) {
|
|
8260
|
+
(function(root, factory, undef) {
|
|
8261
|
+
{
|
|
8262
|
+
module.exports = factory(requireCore(), requireCipherCore());
|
|
8263
|
+
}
|
|
8264
|
+
})(commonjsGlobal, function(CryptoJS2) {
|
|
8265
|
+
CryptoJS2.mode.CFB = function() {
|
|
8266
|
+
var CFB = CryptoJS2.lib.BlockCipherMode.extend();
|
|
8267
|
+
CFB.Encryptor = CFB.extend({
|
|
8268
|
+
processBlock: function(words, offset) {
|
|
8269
|
+
var cipher = this._cipher;
|
|
8270
|
+
var blockSize = cipher.blockSize;
|
|
8271
|
+
generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher);
|
|
8272
|
+
this._prevBlock = words.slice(offset, offset + blockSize);
|
|
8273
|
+
}
|
|
8274
|
+
});
|
|
8275
|
+
CFB.Decryptor = CFB.extend({
|
|
8276
|
+
processBlock: function(words, offset) {
|
|
8277
|
+
var cipher = this._cipher;
|
|
8278
|
+
var blockSize = cipher.blockSize;
|
|
8279
|
+
var thisBlock = words.slice(offset, offset + blockSize);
|
|
8280
|
+
generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher);
|
|
8281
|
+
this._prevBlock = thisBlock;
|
|
8282
|
+
}
|
|
8283
|
+
});
|
|
8284
|
+
function generateKeystreamAndEncrypt(words, offset, blockSize, cipher) {
|
|
8285
|
+
var keystream;
|
|
8286
|
+
var iv = this._iv;
|
|
8287
|
+
if (iv) {
|
|
8288
|
+
keystream = iv.slice(0);
|
|
8289
|
+
this._iv = void 0;
|
|
8290
|
+
} else {
|
|
8291
|
+
keystream = this._prevBlock;
|
|
8292
|
+
}
|
|
8293
|
+
cipher.encryptBlock(keystream, 0);
|
|
8294
|
+
for (var i = 0; i < blockSize; i++) {
|
|
8295
|
+
words[offset + i] ^= keystream[i];
|
|
8296
|
+
}
|
|
8297
|
+
}
|
|
8298
|
+
return CFB;
|
|
8299
|
+
}();
|
|
8300
|
+
return CryptoJS2.mode.CFB;
|
|
8301
|
+
});
|
|
8302
|
+
})(modeCfb);
|
|
8303
|
+
return modeCfb.exports;
|
|
8304
|
+
}
|
|
8305
|
+
var modeCtr = { exports: {} };
|
|
8306
|
+
var hasRequiredModeCtr;
|
|
8307
|
+
function requireModeCtr() {
|
|
8308
|
+
if (hasRequiredModeCtr)
|
|
8309
|
+
return modeCtr.exports;
|
|
8310
|
+
hasRequiredModeCtr = 1;
|
|
8311
|
+
(function(module, exports) {
|
|
8312
|
+
(function(root, factory, undef) {
|
|
8313
|
+
{
|
|
8314
|
+
module.exports = factory(requireCore(), requireCipherCore());
|
|
8315
|
+
}
|
|
8316
|
+
})(commonjsGlobal, function(CryptoJS2) {
|
|
8317
|
+
CryptoJS2.mode.CTR = function() {
|
|
8318
|
+
var CTR = CryptoJS2.lib.BlockCipherMode.extend();
|
|
8319
|
+
var Encryptor = CTR.Encryptor = CTR.extend({
|
|
8320
|
+
processBlock: function(words, offset) {
|
|
8321
|
+
var cipher = this._cipher;
|
|
8322
|
+
var blockSize = cipher.blockSize;
|
|
8323
|
+
var iv = this._iv;
|
|
8324
|
+
var counter = this._counter;
|
|
8325
|
+
if (iv) {
|
|
8326
|
+
counter = this._counter = iv.slice(0);
|
|
8327
|
+
this._iv = void 0;
|
|
8328
|
+
}
|
|
8329
|
+
var keystream = counter.slice(0);
|
|
8330
|
+
cipher.encryptBlock(keystream, 0);
|
|
8331
|
+
counter[blockSize - 1] = counter[blockSize - 1] + 1 | 0;
|
|
8332
|
+
for (var i = 0; i < blockSize; i++) {
|
|
8333
|
+
words[offset + i] ^= keystream[i];
|
|
8334
|
+
}
|
|
8335
|
+
}
|
|
8336
|
+
});
|
|
8337
|
+
CTR.Decryptor = Encryptor;
|
|
8338
|
+
return CTR;
|
|
8339
|
+
}();
|
|
8340
|
+
return CryptoJS2.mode.CTR;
|
|
8341
|
+
});
|
|
8342
|
+
})(modeCtr);
|
|
8343
|
+
return modeCtr.exports;
|
|
8344
|
+
}
|
|
8345
|
+
var modeCtrGladman = { exports: {} };
|
|
8346
|
+
var hasRequiredModeCtrGladman;
|
|
8347
|
+
function requireModeCtrGladman() {
|
|
8348
|
+
if (hasRequiredModeCtrGladman)
|
|
8349
|
+
return modeCtrGladman.exports;
|
|
8350
|
+
hasRequiredModeCtrGladman = 1;
|
|
8351
|
+
(function(module, exports) {
|
|
8352
|
+
(function(root, factory, undef) {
|
|
8353
|
+
{
|
|
8354
|
+
module.exports = factory(requireCore(), requireCipherCore());
|
|
8355
|
+
}
|
|
8356
|
+
})(commonjsGlobal, function(CryptoJS2) {
|
|
8357
|
+
/** @preserve
|
|
8358
|
+
* Counter block mode compatible with Dr Brian Gladman fileenc.c
|
|
8359
|
+
* derived from CryptoJS.mode.CTR
|
|
8360
|
+
* Jan Hruby jhruby.web@gmail.com
|
|
8361
|
+
*/
|
|
8362
|
+
CryptoJS2.mode.CTRGladman = function() {
|
|
8363
|
+
var CTRGladman = CryptoJS2.lib.BlockCipherMode.extend();
|
|
8364
|
+
function incWord(word) {
|
|
8365
|
+
if ((word >> 24 & 255) === 255) {
|
|
8366
|
+
var b1 = word >> 16 & 255;
|
|
8367
|
+
var b2 = word >> 8 & 255;
|
|
8368
|
+
var b3 = word & 255;
|
|
8369
|
+
if (b1 === 255) {
|
|
8370
|
+
b1 = 0;
|
|
8371
|
+
if (b2 === 255) {
|
|
8372
|
+
b2 = 0;
|
|
8373
|
+
if (b3 === 255) {
|
|
8374
|
+
b3 = 0;
|
|
8375
|
+
} else {
|
|
8376
|
+
++b3;
|
|
8377
|
+
}
|
|
8378
|
+
} else {
|
|
8379
|
+
++b2;
|
|
8380
|
+
}
|
|
8381
|
+
} else {
|
|
8382
|
+
++b1;
|
|
8383
|
+
}
|
|
8384
|
+
word = 0;
|
|
8385
|
+
word += b1 << 16;
|
|
8386
|
+
word += b2 << 8;
|
|
8387
|
+
word += b3;
|
|
8388
|
+
} else {
|
|
8389
|
+
word += 1 << 24;
|
|
8390
|
+
}
|
|
8391
|
+
return word;
|
|
8392
|
+
}
|
|
8393
|
+
function incCounter(counter) {
|
|
8394
|
+
if ((counter[0] = incWord(counter[0])) === 0) {
|
|
8395
|
+
counter[1] = incWord(counter[1]);
|
|
8396
|
+
}
|
|
8397
|
+
return counter;
|
|
8398
|
+
}
|
|
8399
|
+
var Encryptor = CTRGladman.Encryptor = CTRGladman.extend({
|
|
8400
|
+
processBlock: function(words, offset) {
|
|
8401
|
+
var cipher = this._cipher;
|
|
8402
|
+
var blockSize = cipher.blockSize;
|
|
8403
|
+
var iv = this._iv;
|
|
8404
|
+
var counter = this._counter;
|
|
8405
|
+
if (iv) {
|
|
8406
|
+
counter = this._counter = iv.slice(0);
|
|
8407
|
+
this._iv = void 0;
|
|
8408
|
+
}
|
|
8409
|
+
incCounter(counter);
|
|
8410
|
+
var keystream = counter.slice(0);
|
|
8411
|
+
cipher.encryptBlock(keystream, 0);
|
|
8412
|
+
for (var i = 0; i < blockSize; i++) {
|
|
8413
|
+
words[offset + i] ^= keystream[i];
|
|
8414
|
+
}
|
|
8415
|
+
}
|
|
8416
|
+
});
|
|
8417
|
+
CTRGladman.Decryptor = Encryptor;
|
|
8418
|
+
return CTRGladman;
|
|
8419
|
+
}();
|
|
8420
|
+
return CryptoJS2.mode.CTRGladman;
|
|
8421
|
+
});
|
|
8422
|
+
})(modeCtrGladman);
|
|
8423
|
+
return modeCtrGladman.exports;
|
|
8424
|
+
}
|
|
8425
|
+
var modeOfb = { exports: {} };
|
|
8426
|
+
var hasRequiredModeOfb;
|
|
8427
|
+
function requireModeOfb() {
|
|
8428
|
+
if (hasRequiredModeOfb)
|
|
8429
|
+
return modeOfb.exports;
|
|
8430
|
+
hasRequiredModeOfb = 1;
|
|
8431
|
+
(function(module, exports) {
|
|
8432
|
+
(function(root, factory, undef) {
|
|
8433
|
+
{
|
|
8434
|
+
module.exports = factory(requireCore(), requireCipherCore());
|
|
8435
|
+
}
|
|
8436
|
+
})(commonjsGlobal, function(CryptoJS2) {
|
|
8437
|
+
CryptoJS2.mode.OFB = function() {
|
|
8438
|
+
var OFB = CryptoJS2.lib.BlockCipherMode.extend();
|
|
8439
|
+
var Encryptor = OFB.Encryptor = OFB.extend({
|
|
8440
|
+
processBlock: function(words, offset) {
|
|
8441
|
+
var cipher = this._cipher;
|
|
8442
|
+
var blockSize = cipher.blockSize;
|
|
8443
|
+
var iv = this._iv;
|
|
8444
|
+
var keystream = this._keystream;
|
|
8445
|
+
if (iv) {
|
|
8446
|
+
keystream = this._keystream = iv.slice(0);
|
|
8447
|
+
this._iv = void 0;
|
|
8448
|
+
}
|
|
8449
|
+
cipher.encryptBlock(keystream, 0);
|
|
8450
|
+
for (var i = 0; i < blockSize; i++) {
|
|
8451
|
+
words[offset + i] ^= keystream[i];
|
|
8452
|
+
}
|
|
8453
|
+
}
|
|
8454
|
+
});
|
|
8455
|
+
OFB.Decryptor = Encryptor;
|
|
8456
|
+
return OFB;
|
|
8457
|
+
}();
|
|
8458
|
+
return CryptoJS2.mode.OFB;
|
|
8459
|
+
});
|
|
8460
|
+
})(modeOfb);
|
|
8461
|
+
return modeOfb.exports;
|
|
8462
|
+
}
|
|
8463
|
+
var modeEcb = { exports: {} };
|
|
8464
|
+
var hasRequiredModeEcb;
|
|
8465
|
+
function requireModeEcb() {
|
|
8466
|
+
if (hasRequiredModeEcb)
|
|
8467
|
+
return modeEcb.exports;
|
|
8468
|
+
hasRequiredModeEcb = 1;
|
|
8469
|
+
(function(module, exports) {
|
|
8470
|
+
(function(root, factory, undef) {
|
|
8471
|
+
{
|
|
8472
|
+
module.exports = factory(requireCore(), requireCipherCore());
|
|
8473
|
+
}
|
|
8474
|
+
})(commonjsGlobal, function(CryptoJS2) {
|
|
8475
|
+
CryptoJS2.mode.ECB = function() {
|
|
8476
|
+
var ECB = CryptoJS2.lib.BlockCipherMode.extend();
|
|
8477
|
+
ECB.Encryptor = ECB.extend({
|
|
8478
|
+
processBlock: function(words, offset) {
|
|
8479
|
+
this._cipher.encryptBlock(words, offset);
|
|
8480
|
+
}
|
|
8481
|
+
});
|
|
8482
|
+
ECB.Decryptor = ECB.extend({
|
|
8483
|
+
processBlock: function(words, offset) {
|
|
8484
|
+
this._cipher.decryptBlock(words, offset);
|
|
8485
|
+
}
|
|
8486
|
+
});
|
|
8487
|
+
return ECB;
|
|
8488
|
+
}();
|
|
8489
|
+
return CryptoJS2.mode.ECB;
|
|
8490
|
+
});
|
|
8491
|
+
})(modeEcb);
|
|
8492
|
+
return modeEcb.exports;
|
|
8493
|
+
}
|
|
8494
|
+
var padAnsix923 = { exports: {} };
|
|
8495
|
+
var hasRequiredPadAnsix923;
|
|
8496
|
+
function requirePadAnsix923() {
|
|
8497
|
+
if (hasRequiredPadAnsix923)
|
|
8498
|
+
return padAnsix923.exports;
|
|
8499
|
+
hasRequiredPadAnsix923 = 1;
|
|
8500
|
+
(function(module, exports) {
|
|
8501
|
+
(function(root, factory, undef) {
|
|
8502
|
+
{
|
|
8503
|
+
module.exports = factory(requireCore(), requireCipherCore());
|
|
8504
|
+
}
|
|
8505
|
+
})(commonjsGlobal, function(CryptoJS2) {
|
|
8506
|
+
CryptoJS2.pad.AnsiX923 = {
|
|
8507
|
+
pad: function(data2, blockSize) {
|
|
8508
|
+
var dataSigBytes = data2.sigBytes;
|
|
8509
|
+
var blockSizeBytes = blockSize * 4;
|
|
8510
|
+
var nPaddingBytes = blockSizeBytes - dataSigBytes % blockSizeBytes;
|
|
8511
|
+
var lastBytePos = dataSigBytes + nPaddingBytes - 1;
|
|
8512
|
+
data2.clamp();
|
|
8513
|
+
data2.words[lastBytePos >>> 2] |= nPaddingBytes << 24 - lastBytePos % 4 * 8;
|
|
8514
|
+
data2.sigBytes += nPaddingBytes;
|
|
8515
|
+
},
|
|
8516
|
+
unpad: function(data2) {
|
|
8517
|
+
var nPaddingBytes = data2.words[data2.sigBytes - 1 >>> 2] & 255;
|
|
8518
|
+
data2.sigBytes -= nPaddingBytes;
|
|
8519
|
+
}
|
|
8520
|
+
};
|
|
8521
|
+
return CryptoJS2.pad.Ansix923;
|
|
8522
|
+
});
|
|
8523
|
+
})(padAnsix923);
|
|
8524
|
+
return padAnsix923.exports;
|
|
8525
|
+
}
|
|
8526
|
+
var padIso10126 = { exports: {} };
|
|
8527
|
+
var hasRequiredPadIso10126;
|
|
8528
|
+
function requirePadIso10126() {
|
|
8529
|
+
if (hasRequiredPadIso10126)
|
|
8530
|
+
return padIso10126.exports;
|
|
8531
|
+
hasRequiredPadIso10126 = 1;
|
|
8532
|
+
(function(module, exports) {
|
|
8533
|
+
(function(root, factory, undef) {
|
|
8534
|
+
{
|
|
8535
|
+
module.exports = factory(requireCore(), requireCipherCore());
|
|
8536
|
+
}
|
|
8537
|
+
})(commonjsGlobal, function(CryptoJS2) {
|
|
8538
|
+
CryptoJS2.pad.Iso10126 = {
|
|
8539
|
+
pad: function(data2, blockSize) {
|
|
8540
|
+
var blockSizeBytes = blockSize * 4;
|
|
8541
|
+
var nPaddingBytes = blockSizeBytes - data2.sigBytes % blockSizeBytes;
|
|
8542
|
+
data2.concat(CryptoJS2.lib.WordArray.random(nPaddingBytes - 1)).concat(CryptoJS2.lib.WordArray.create([nPaddingBytes << 24], 1));
|
|
8543
|
+
},
|
|
8544
|
+
unpad: function(data2) {
|
|
8545
|
+
var nPaddingBytes = data2.words[data2.sigBytes - 1 >>> 2] & 255;
|
|
8546
|
+
data2.sigBytes -= nPaddingBytes;
|
|
8547
|
+
}
|
|
8548
|
+
};
|
|
8549
|
+
return CryptoJS2.pad.Iso10126;
|
|
8550
|
+
});
|
|
8551
|
+
})(padIso10126);
|
|
8552
|
+
return padIso10126.exports;
|
|
8553
|
+
}
|
|
8554
|
+
var padIso97971 = { exports: {} };
|
|
8555
|
+
var hasRequiredPadIso97971;
|
|
8556
|
+
function requirePadIso97971() {
|
|
8557
|
+
if (hasRequiredPadIso97971)
|
|
8558
|
+
return padIso97971.exports;
|
|
8559
|
+
hasRequiredPadIso97971 = 1;
|
|
8560
|
+
(function(module, exports) {
|
|
8561
|
+
(function(root, factory, undef) {
|
|
8562
|
+
{
|
|
8563
|
+
module.exports = factory(requireCore(), requireCipherCore());
|
|
8564
|
+
}
|
|
8565
|
+
})(commonjsGlobal, function(CryptoJS2) {
|
|
8566
|
+
CryptoJS2.pad.Iso97971 = {
|
|
8567
|
+
pad: function(data2, blockSize) {
|
|
8568
|
+
data2.concat(CryptoJS2.lib.WordArray.create([2147483648], 1));
|
|
8569
|
+
CryptoJS2.pad.ZeroPadding.pad(data2, blockSize);
|
|
8570
|
+
},
|
|
8571
|
+
unpad: function(data2) {
|
|
8572
|
+
CryptoJS2.pad.ZeroPadding.unpad(data2);
|
|
8573
|
+
data2.sigBytes--;
|
|
8574
|
+
}
|
|
8575
|
+
};
|
|
8576
|
+
return CryptoJS2.pad.Iso97971;
|
|
8577
|
+
});
|
|
8578
|
+
})(padIso97971);
|
|
8579
|
+
return padIso97971.exports;
|
|
8580
|
+
}
|
|
8581
|
+
var padZeropadding = { exports: {} };
|
|
8582
|
+
var hasRequiredPadZeropadding;
|
|
8583
|
+
function requirePadZeropadding() {
|
|
8584
|
+
if (hasRequiredPadZeropadding)
|
|
8585
|
+
return padZeropadding.exports;
|
|
8586
|
+
hasRequiredPadZeropadding = 1;
|
|
8587
|
+
(function(module, exports) {
|
|
8588
|
+
(function(root, factory, undef) {
|
|
8589
|
+
{
|
|
8590
|
+
module.exports = factory(requireCore(), requireCipherCore());
|
|
8591
|
+
}
|
|
8592
|
+
})(commonjsGlobal, function(CryptoJS2) {
|
|
8593
|
+
CryptoJS2.pad.ZeroPadding = {
|
|
8594
|
+
pad: function(data2, blockSize) {
|
|
8595
|
+
var blockSizeBytes = blockSize * 4;
|
|
8596
|
+
data2.clamp();
|
|
8597
|
+
data2.sigBytes += blockSizeBytes - (data2.sigBytes % blockSizeBytes || blockSizeBytes);
|
|
8598
|
+
},
|
|
8599
|
+
unpad: function(data2) {
|
|
8600
|
+
var dataWords = data2.words;
|
|
8601
|
+
var i = data2.sigBytes - 1;
|
|
8602
|
+
for (var i = data2.sigBytes - 1; i >= 0; i--) {
|
|
8603
|
+
if (dataWords[i >>> 2] >>> 24 - i % 4 * 8 & 255) {
|
|
8604
|
+
data2.sigBytes = i + 1;
|
|
8605
|
+
break;
|
|
8606
|
+
}
|
|
8607
|
+
}
|
|
8608
|
+
}
|
|
8609
|
+
};
|
|
8610
|
+
return CryptoJS2.pad.ZeroPadding;
|
|
8611
|
+
});
|
|
8612
|
+
})(padZeropadding);
|
|
8613
|
+
return padZeropadding.exports;
|
|
8614
|
+
}
|
|
8615
|
+
var padNopadding = { exports: {} };
|
|
8616
|
+
var hasRequiredPadNopadding;
|
|
8617
|
+
function requirePadNopadding() {
|
|
8618
|
+
if (hasRequiredPadNopadding)
|
|
8619
|
+
return padNopadding.exports;
|
|
8620
|
+
hasRequiredPadNopadding = 1;
|
|
8621
|
+
(function(module, exports) {
|
|
8622
|
+
(function(root, factory, undef) {
|
|
8623
|
+
{
|
|
8624
|
+
module.exports = factory(requireCore(), requireCipherCore());
|
|
8625
|
+
}
|
|
8626
|
+
})(commonjsGlobal, function(CryptoJS2) {
|
|
8627
|
+
CryptoJS2.pad.NoPadding = {
|
|
8628
|
+
pad: function() {
|
|
8629
|
+
},
|
|
8630
|
+
unpad: function() {
|
|
8631
|
+
}
|
|
8632
|
+
};
|
|
8633
|
+
return CryptoJS2.pad.NoPadding;
|
|
8634
|
+
});
|
|
8635
|
+
})(padNopadding);
|
|
8636
|
+
return padNopadding.exports;
|
|
8637
|
+
}
|
|
8638
|
+
var formatHex = { exports: {} };
|
|
8639
|
+
var hasRequiredFormatHex;
|
|
8640
|
+
function requireFormatHex() {
|
|
8641
|
+
if (hasRequiredFormatHex)
|
|
8642
|
+
return formatHex.exports;
|
|
8643
|
+
hasRequiredFormatHex = 1;
|
|
8644
|
+
(function(module, exports) {
|
|
8645
|
+
(function(root, factory, undef) {
|
|
8646
|
+
{
|
|
8647
|
+
module.exports = factory(requireCore(), requireCipherCore());
|
|
8648
|
+
}
|
|
8649
|
+
})(commonjsGlobal, function(CryptoJS2) {
|
|
8650
|
+
(function(undefined$1) {
|
|
8651
|
+
var C = CryptoJS2;
|
|
8652
|
+
var C_lib = C.lib;
|
|
8653
|
+
var CipherParams = C_lib.CipherParams;
|
|
8654
|
+
var C_enc = C.enc;
|
|
8655
|
+
var Hex = C_enc.Hex;
|
|
8656
|
+
var C_format = C.format;
|
|
8657
|
+
C_format.Hex = {
|
|
8658
|
+
/**
|
|
8659
|
+
* Converts the ciphertext of a cipher params object to a hexadecimally encoded string.
|
|
8660
|
+
*
|
|
8661
|
+
* @param {CipherParams} cipherParams The cipher params object.
|
|
8662
|
+
*
|
|
8663
|
+
* @return {string} The hexadecimally encoded string.
|
|
8664
|
+
*
|
|
8665
|
+
* @static
|
|
8666
|
+
*
|
|
8667
|
+
* @example
|
|
8668
|
+
*
|
|
8669
|
+
* var hexString = CryptoJS.format.Hex.stringify(cipherParams);
|
|
8670
|
+
*/
|
|
8671
|
+
stringify: function(cipherParams) {
|
|
8672
|
+
return cipherParams.ciphertext.toString(Hex);
|
|
8673
|
+
},
|
|
8674
|
+
/**
|
|
8675
|
+
* Converts a hexadecimally encoded ciphertext string to a cipher params object.
|
|
8676
|
+
*
|
|
8677
|
+
* @param {string} input The hexadecimally encoded string.
|
|
8678
|
+
*
|
|
8679
|
+
* @return {CipherParams} The cipher params object.
|
|
8680
|
+
*
|
|
8681
|
+
* @static
|
|
8682
|
+
*
|
|
8683
|
+
* @example
|
|
8684
|
+
*
|
|
8685
|
+
* var cipherParams = CryptoJS.format.Hex.parse(hexString);
|
|
8686
|
+
*/
|
|
8687
|
+
parse: function(input) {
|
|
8688
|
+
var ciphertext = Hex.parse(input);
|
|
8689
|
+
return CipherParams.create({ ciphertext });
|
|
8690
|
+
}
|
|
8691
|
+
};
|
|
8692
|
+
})();
|
|
8693
|
+
return CryptoJS2.format.Hex;
|
|
8694
|
+
});
|
|
8695
|
+
})(formatHex);
|
|
8696
|
+
return formatHex.exports;
|
|
8697
|
+
}
|
|
8698
|
+
var tripledes = { exports: {} };
|
|
8699
|
+
var hasRequiredTripledes;
|
|
8700
|
+
function requireTripledes() {
|
|
8701
|
+
if (hasRequiredTripledes)
|
|
8702
|
+
return tripledes.exports;
|
|
8703
|
+
hasRequiredTripledes = 1;
|
|
8704
|
+
(function(module, exports) {
|
|
8705
|
+
(function(root, factory, undef) {
|
|
8706
|
+
{
|
|
8707
|
+
module.exports = factory(requireCore(), encBase64Exports, requireMd5(), requireEvpkdf(), requireCipherCore());
|
|
8708
|
+
}
|
|
8709
|
+
})(commonjsGlobal, function(CryptoJS2) {
|
|
8710
|
+
(function() {
|
|
8711
|
+
var C = CryptoJS2;
|
|
8712
|
+
var C_lib = C.lib;
|
|
8713
|
+
var WordArray = C_lib.WordArray;
|
|
8714
|
+
var BlockCipher = C_lib.BlockCipher;
|
|
8715
|
+
var C_algo = C.algo;
|
|
8716
|
+
var PC1 = [
|
|
8717
|
+
57,
|
|
8718
|
+
49,
|
|
8719
|
+
41,
|
|
8720
|
+
33,
|
|
8721
|
+
25,
|
|
8722
|
+
17,
|
|
8723
|
+
9,
|
|
8724
|
+
1,
|
|
8725
|
+
58,
|
|
8726
|
+
50,
|
|
8727
|
+
42,
|
|
8728
|
+
34,
|
|
8729
|
+
26,
|
|
8730
|
+
18,
|
|
8731
|
+
10,
|
|
8732
|
+
2,
|
|
8733
|
+
59,
|
|
8734
|
+
51,
|
|
8735
|
+
43,
|
|
8736
|
+
35,
|
|
8737
|
+
27,
|
|
8738
|
+
19,
|
|
8739
|
+
11,
|
|
8740
|
+
3,
|
|
8741
|
+
60,
|
|
8742
|
+
52,
|
|
8743
|
+
44,
|
|
8744
|
+
36,
|
|
8745
|
+
63,
|
|
8746
|
+
55,
|
|
8747
|
+
47,
|
|
8748
|
+
39,
|
|
8749
|
+
31,
|
|
8750
|
+
23,
|
|
8751
|
+
15,
|
|
8752
|
+
7,
|
|
8753
|
+
62,
|
|
8754
|
+
54,
|
|
8755
|
+
46,
|
|
8756
|
+
38,
|
|
8757
|
+
30,
|
|
8758
|
+
22,
|
|
8759
|
+
14,
|
|
8760
|
+
6,
|
|
8761
|
+
61,
|
|
8762
|
+
53,
|
|
8763
|
+
45,
|
|
8764
|
+
37,
|
|
8765
|
+
29,
|
|
8766
|
+
21,
|
|
8767
|
+
13,
|
|
8768
|
+
5,
|
|
8769
|
+
28,
|
|
8770
|
+
20,
|
|
8771
|
+
12,
|
|
8772
|
+
4
|
|
8773
|
+
];
|
|
8774
|
+
var PC2 = [
|
|
8775
|
+
14,
|
|
8776
|
+
17,
|
|
8777
|
+
11,
|
|
8778
|
+
24,
|
|
8779
|
+
1,
|
|
8780
|
+
5,
|
|
8781
|
+
3,
|
|
8782
|
+
28,
|
|
8783
|
+
15,
|
|
8784
|
+
6,
|
|
8785
|
+
21,
|
|
8786
|
+
10,
|
|
8787
|
+
23,
|
|
8788
|
+
19,
|
|
8789
|
+
12,
|
|
8790
|
+
4,
|
|
8791
|
+
26,
|
|
8792
|
+
8,
|
|
8793
|
+
16,
|
|
8794
|
+
7,
|
|
8795
|
+
27,
|
|
8796
|
+
20,
|
|
8797
|
+
13,
|
|
8798
|
+
2,
|
|
8799
|
+
41,
|
|
8800
|
+
52,
|
|
8801
|
+
31,
|
|
8802
|
+
37,
|
|
8803
|
+
47,
|
|
8804
|
+
55,
|
|
8805
|
+
30,
|
|
8806
|
+
40,
|
|
8807
|
+
51,
|
|
8808
|
+
45,
|
|
8809
|
+
33,
|
|
8810
|
+
48,
|
|
8811
|
+
44,
|
|
8812
|
+
49,
|
|
8813
|
+
39,
|
|
8814
|
+
56,
|
|
8815
|
+
34,
|
|
8816
|
+
53,
|
|
8817
|
+
46,
|
|
8818
|
+
42,
|
|
8819
|
+
50,
|
|
8820
|
+
36,
|
|
8821
|
+
29,
|
|
8822
|
+
32
|
|
8823
|
+
];
|
|
8824
|
+
var BIT_SHIFTS = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28];
|
|
8825
|
+
var SBOX_P = [
|
|
8826
|
+
{
|
|
8827
|
+
0: 8421888,
|
|
8828
|
+
268435456: 32768,
|
|
8829
|
+
536870912: 8421378,
|
|
8830
|
+
805306368: 2,
|
|
8831
|
+
1073741824: 512,
|
|
8832
|
+
1342177280: 8421890,
|
|
8833
|
+
1610612736: 8389122,
|
|
8834
|
+
1879048192: 8388608,
|
|
8835
|
+
2147483648: 514,
|
|
8836
|
+
2415919104: 8389120,
|
|
8837
|
+
2684354560: 33280,
|
|
8838
|
+
2952790016: 8421376,
|
|
8839
|
+
3221225472: 32770,
|
|
8840
|
+
3489660928: 8388610,
|
|
8841
|
+
3758096384: 0,
|
|
8842
|
+
4026531840: 33282,
|
|
8843
|
+
134217728: 0,
|
|
8844
|
+
402653184: 8421890,
|
|
8845
|
+
671088640: 33282,
|
|
8846
|
+
939524096: 32768,
|
|
8847
|
+
1207959552: 8421888,
|
|
8848
|
+
1476395008: 512,
|
|
8849
|
+
1744830464: 8421378,
|
|
8850
|
+
2013265920: 2,
|
|
8851
|
+
2281701376: 8389120,
|
|
8852
|
+
2550136832: 33280,
|
|
8853
|
+
2818572288: 8421376,
|
|
8854
|
+
3087007744: 8389122,
|
|
8855
|
+
3355443200: 8388610,
|
|
8856
|
+
3623878656: 32770,
|
|
8857
|
+
3892314112: 514,
|
|
8858
|
+
4160749568: 8388608,
|
|
8859
|
+
1: 32768,
|
|
8860
|
+
268435457: 2,
|
|
8861
|
+
536870913: 8421888,
|
|
8862
|
+
805306369: 8388608,
|
|
8863
|
+
1073741825: 8421378,
|
|
8864
|
+
1342177281: 33280,
|
|
8865
|
+
1610612737: 512,
|
|
8866
|
+
1879048193: 8389122,
|
|
8867
|
+
2147483649: 8421890,
|
|
8868
|
+
2415919105: 8421376,
|
|
8869
|
+
2684354561: 8388610,
|
|
8870
|
+
2952790017: 33282,
|
|
8871
|
+
3221225473: 514,
|
|
8872
|
+
3489660929: 8389120,
|
|
8873
|
+
3758096385: 32770,
|
|
8874
|
+
4026531841: 0,
|
|
8875
|
+
134217729: 8421890,
|
|
8876
|
+
402653185: 8421376,
|
|
8877
|
+
671088641: 8388608,
|
|
8878
|
+
939524097: 512,
|
|
8879
|
+
1207959553: 32768,
|
|
8880
|
+
1476395009: 8388610,
|
|
8881
|
+
1744830465: 2,
|
|
8882
|
+
2013265921: 33282,
|
|
8883
|
+
2281701377: 32770,
|
|
8884
|
+
2550136833: 8389122,
|
|
8885
|
+
2818572289: 514,
|
|
8886
|
+
3087007745: 8421888,
|
|
8887
|
+
3355443201: 8389120,
|
|
8888
|
+
3623878657: 0,
|
|
8889
|
+
3892314113: 33280,
|
|
8890
|
+
4160749569: 8421378
|
|
8891
|
+
},
|
|
8892
|
+
{
|
|
8893
|
+
0: 1074282512,
|
|
8894
|
+
16777216: 16384,
|
|
8895
|
+
33554432: 524288,
|
|
8896
|
+
50331648: 1074266128,
|
|
8897
|
+
67108864: 1073741840,
|
|
8898
|
+
83886080: 1074282496,
|
|
8899
|
+
100663296: 1073758208,
|
|
8900
|
+
117440512: 16,
|
|
8901
|
+
134217728: 540672,
|
|
8902
|
+
150994944: 1073758224,
|
|
8903
|
+
167772160: 1073741824,
|
|
8904
|
+
184549376: 540688,
|
|
8905
|
+
201326592: 524304,
|
|
8906
|
+
218103808: 0,
|
|
8907
|
+
234881024: 16400,
|
|
8908
|
+
251658240: 1074266112,
|
|
8909
|
+
8388608: 1073758208,
|
|
8910
|
+
25165824: 540688,
|
|
8911
|
+
41943040: 16,
|
|
8912
|
+
58720256: 1073758224,
|
|
8913
|
+
75497472: 1074282512,
|
|
8914
|
+
92274688: 1073741824,
|
|
8915
|
+
109051904: 524288,
|
|
8916
|
+
125829120: 1074266128,
|
|
8917
|
+
142606336: 524304,
|
|
8918
|
+
159383552: 0,
|
|
8919
|
+
176160768: 16384,
|
|
8920
|
+
192937984: 1074266112,
|
|
8921
|
+
209715200: 1073741840,
|
|
8922
|
+
226492416: 540672,
|
|
8923
|
+
243269632: 1074282496,
|
|
8924
|
+
260046848: 16400,
|
|
8925
|
+
268435456: 0,
|
|
8926
|
+
285212672: 1074266128,
|
|
8927
|
+
301989888: 1073758224,
|
|
8928
|
+
318767104: 1074282496,
|
|
8929
|
+
335544320: 1074266112,
|
|
8930
|
+
352321536: 16,
|
|
8931
|
+
369098752: 540688,
|
|
8932
|
+
385875968: 16384,
|
|
8933
|
+
402653184: 16400,
|
|
8934
|
+
419430400: 524288,
|
|
8935
|
+
436207616: 524304,
|
|
8936
|
+
452984832: 1073741840,
|
|
8937
|
+
469762048: 540672,
|
|
8938
|
+
486539264: 1073758208,
|
|
8939
|
+
503316480: 1073741824,
|
|
8940
|
+
520093696: 1074282512,
|
|
8941
|
+
276824064: 540688,
|
|
8942
|
+
293601280: 524288,
|
|
8943
|
+
310378496: 1074266112,
|
|
8944
|
+
327155712: 16384,
|
|
8945
|
+
343932928: 1073758208,
|
|
8946
|
+
360710144: 1074282512,
|
|
8947
|
+
377487360: 16,
|
|
8948
|
+
394264576: 1073741824,
|
|
8949
|
+
411041792: 1074282496,
|
|
8950
|
+
427819008: 1073741840,
|
|
8951
|
+
444596224: 1073758224,
|
|
8952
|
+
461373440: 524304,
|
|
8953
|
+
478150656: 0,
|
|
8954
|
+
494927872: 16400,
|
|
8955
|
+
511705088: 1074266128,
|
|
8956
|
+
528482304: 540672
|
|
8957
|
+
},
|
|
8958
|
+
{
|
|
8959
|
+
0: 260,
|
|
8960
|
+
1048576: 0,
|
|
8961
|
+
2097152: 67109120,
|
|
8962
|
+
3145728: 65796,
|
|
8963
|
+
4194304: 65540,
|
|
8964
|
+
5242880: 67108868,
|
|
8965
|
+
6291456: 67174660,
|
|
8966
|
+
7340032: 67174400,
|
|
8967
|
+
8388608: 67108864,
|
|
8968
|
+
9437184: 67174656,
|
|
8969
|
+
10485760: 65792,
|
|
8970
|
+
11534336: 67174404,
|
|
8971
|
+
12582912: 67109124,
|
|
8972
|
+
13631488: 65536,
|
|
8973
|
+
14680064: 4,
|
|
8974
|
+
15728640: 256,
|
|
8975
|
+
524288: 67174656,
|
|
8976
|
+
1572864: 67174404,
|
|
8977
|
+
2621440: 0,
|
|
8978
|
+
3670016: 67109120,
|
|
8979
|
+
4718592: 67108868,
|
|
8980
|
+
5767168: 65536,
|
|
8981
|
+
6815744: 65540,
|
|
8982
|
+
7864320: 260,
|
|
8983
|
+
8912896: 4,
|
|
8984
|
+
9961472: 256,
|
|
8985
|
+
11010048: 67174400,
|
|
8986
|
+
12058624: 65796,
|
|
8987
|
+
13107200: 65792,
|
|
8988
|
+
14155776: 67109124,
|
|
8989
|
+
15204352: 67174660,
|
|
8990
|
+
16252928: 67108864,
|
|
8991
|
+
16777216: 67174656,
|
|
8992
|
+
17825792: 65540,
|
|
8993
|
+
18874368: 65536,
|
|
8994
|
+
19922944: 67109120,
|
|
8995
|
+
20971520: 256,
|
|
8996
|
+
22020096: 67174660,
|
|
8997
|
+
23068672: 67108868,
|
|
8998
|
+
24117248: 0,
|
|
8999
|
+
25165824: 67109124,
|
|
9000
|
+
26214400: 67108864,
|
|
9001
|
+
27262976: 4,
|
|
9002
|
+
28311552: 65792,
|
|
9003
|
+
29360128: 67174400,
|
|
9004
|
+
30408704: 260,
|
|
9005
|
+
31457280: 65796,
|
|
9006
|
+
32505856: 67174404,
|
|
9007
|
+
17301504: 67108864,
|
|
9008
|
+
18350080: 260,
|
|
9009
|
+
19398656: 67174656,
|
|
9010
|
+
20447232: 0,
|
|
9011
|
+
21495808: 65540,
|
|
9012
|
+
22544384: 67109120,
|
|
9013
|
+
23592960: 256,
|
|
9014
|
+
24641536: 67174404,
|
|
9015
|
+
25690112: 65536,
|
|
9016
|
+
26738688: 67174660,
|
|
9017
|
+
27787264: 65796,
|
|
9018
|
+
28835840: 67108868,
|
|
9019
|
+
29884416: 67109124,
|
|
9020
|
+
30932992: 67174400,
|
|
9021
|
+
31981568: 4,
|
|
9022
|
+
33030144: 65792
|
|
9023
|
+
},
|
|
9024
|
+
{
|
|
9025
|
+
0: 2151682048,
|
|
9026
|
+
65536: 2147487808,
|
|
9027
|
+
131072: 4198464,
|
|
9028
|
+
196608: 2151677952,
|
|
9029
|
+
262144: 0,
|
|
9030
|
+
327680: 4198400,
|
|
9031
|
+
393216: 2147483712,
|
|
9032
|
+
458752: 4194368,
|
|
9033
|
+
524288: 2147483648,
|
|
9034
|
+
589824: 4194304,
|
|
9035
|
+
655360: 64,
|
|
9036
|
+
720896: 2147487744,
|
|
9037
|
+
786432: 2151678016,
|
|
9038
|
+
851968: 4160,
|
|
9039
|
+
917504: 4096,
|
|
9040
|
+
983040: 2151682112,
|
|
9041
|
+
32768: 2147487808,
|
|
9042
|
+
98304: 64,
|
|
9043
|
+
163840: 2151678016,
|
|
9044
|
+
229376: 2147487744,
|
|
9045
|
+
294912: 4198400,
|
|
9046
|
+
360448: 2151682112,
|
|
9047
|
+
425984: 0,
|
|
9048
|
+
491520: 2151677952,
|
|
9049
|
+
557056: 4096,
|
|
9050
|
+
622592: 2151682048,
|
|
9051
|
+
688128: 4194304,
|
|
9052
|
+
753664: 4160,
|
|
9053
|
+
819200: 2147483648,
|
|
9054
|
+
884736: 4194368,
|
|
9055
|
+
950272: 4198464,
|
|
9056
|
+
1015808: 2147483712,
|
|
9057
|
+
1048576: 4194368,
|
|
9058
|
+
1114112: 4198400,
|
|
9059
|
+
1179648: 2147483712,
|
|
9060
|
+
1245184: 0,
|
|
9061
|
+
1310720: 4160,
|
|
9062
|
+
1376256: 2151678016,
|
|
9063
|
+
1441792: 2151682048,
|
|
9064
|
+
1507328: 2147487808,
|
|
9065
|
+
1572864: 2151682112,
|
|
9066
|
+
1638400: 2147483648,
|
|
9067
|
+
1703936: 2151677952,
|
|
9068
|
+
1769472: 4198464,
|
|
9069
|
+
1835008: 2147487744,
|
|
9070
|
+
1900544: 4194304,
|
|
9071
|
+
1966080: 64,
|
|
9072
|
+
2031616: 4096,
|
|
9073
|
+
1081344: 2151677952,
|
|
9074
|
+
1146880: 2151682112,
|
|
9075
|
+
1212416: 0,
|
|
9076
|
+
1277952: 4198400,
|
|
9077
|
+
1343488: 4194368,
|
|
9078
|
+
1409024: 2147483648,
|
|
9079
|
+
1474560: 2147487808,
|
|
9080
|
+
1540096: 64,
|
|
9081
|
+
1605632: 2147483712,
|
|
9082
|
+
1671168: 4096,
|
|
9083
|
+
1736704: 2147487744,
|
|
9084
|
+
1802240: 2151678016,
|
|
9085
|
+
1867776: 4160,
|
|
9086
|
+
1933312: 2151682048,
|
|
9087
|
+
1998848: 4194304,
|
|
9088
|
+
2064384: 4198464
|
|
9089
|
+
},
|
|
9090
|
+
{
|
|
9091
|
+
0: 128,
|
|
9092
|
+
4096: 17039360,
|
|
9093
|
+
8192: 262144,
|
|
9094
|
+
12288: 536870912,
|
|
9095
|
+
16384: 537133184,
|
|
9096
|
+
20480: 16777344,
|
|
9097
|
+
24576: 553648256,
|
|
9098
|
+
28672: 262272,
|
|
9099
|
+
32768: 16777216,
|
|
9100
|
+
36864: 537133056,
|
|
9101
|
+
40960: 536871040,
|
|
9102
|
+
45056: 553910400,
|
|
9103
|
+
49152: 553910272,
|
|
9104
|
+
53248: 0,
|
|
9105
|
+
57344: 17039488,
|
|
9106
|
+
61440: 553648128,
|
|
9107
|
+
2048: 17039488,
|
|
9108
|
+
6144: 553648256,
|
|
9109
|
+
10240: 128,
|
|
9110
|
+
14336: 17039360,
|
|
9111
|
+
18432: 262144,
|
|
9112
|
+
22528: 537133184,
|
|
9113
|
+
26624: 553910272,
|
|
9114
|
+
30720: 536870912,
|
|
9115
|
+
34816: 537133056,
|
|
9116
|
+
38912: 0,
|
|
9117
|
+
43008: 553910400,
|
|
9118
|
+
47104: 16777344,
|
|
9119
|
+
51200: 536871040,
|
|
9120
|
+
55296: 553648128,
|
|
9121
|
+
59392: 16777216,
|
|
9122
|
+
63488: 262272,
|
|
9123
|
+
65536: 262144,
|
|
9124
|
+
69632: 128,
|
|
9125
|
+
73728: 536870912,
|
|
9126
|
+
77824: 553648256,
|
|
9127
|
+
81920: 16777344,
|
|
9128
|
+
86016: 553910272,
|
|
9129
|
+
90112: 537133184,
|
|
9130
|
+
94208: 16777216,
|
|
9131
|
+
98304: 553910400,
|
|
9132
|
+
102400: 553648128,
|
|
9133
|
+
106496: 17039360,
|
|
9134
|
+
110592: 537133056,
|
|
9135
|
+
114688: 262272,
|
|
9136
|
+
118784: 536871040,
|
|
9137
|
+
122880: 0,
|
|
9138
|
+
126976: 17039488,
|
|
9139
|
+
67584: 553648256,
|
|
9140
|
+
71680: 16777216,
|
|
9141
|
+
75776: 17039360,
|
|
9142
|
+
79872: 537133184,
|
|
9143
|
+
83968: 536870912,
|
|
9144
|
+
88064: 17039488,
|
|
9145
|
+
92160: 128,
|
|
9146
|
+
96256: 553910272,
|
|
9147
|
+
100352: 262272,
|
|
9148
|
+
104448: 553910400,
|
|
9149
|
+
108544: 0,
|
|
9150
|
+
112640: 553648128,
|
|
9151
|
+
116736: 16777344,
|
|
9152
|
+
120832: 262144,
|
|
9153
|
+
124928: 537133056,
|
|
9154
|
+
129024: 536871040
|
|
9155
|
+
},
|
|
9156
|
+
{
|
|
9157
|
+
0: 268435464,
|
|
9158
|
+
256: 8192,
|
|
9159
|
+
512: 270532608,
|
|
9160
|
+
768: 270540808,
|
|
9161
|
+
1024: 268443648,
|
|
9162
|
+
1280: 2097152,
|
|
9163
|
+
1536: 2097160,
|
|
9164
|
+
1792: 268435456,
|
|
9165
|
+
2048: 0,
|
|
9166
|
+
2304: 268443656,
|
|
9167
|
+
2560: 2105344,
|
|
9168
|
+
2816: 8,
|
|
9169
|
+
3072: 270532616,
|
|
9170
|
+
3328: 2105352,
|
|
9171
|
+
3584: 8200,
|
|
9172
|
+
3840: 270540800,
|
|
9173
|
+
128: 270532608,
|
|
9174
|
+
384: 270540808,
|
|
9175
|
+
640: 8,
|
|
9176
|
+
896: 2097152,
|
|
9177
|
+
1152: 2105352,
|
|
9178
|
+
1408: 268435464,
|
|
9179
|
+
1664: 268443648,
|
|
9180
|
+
1920: 8200,
|
|
9181
|
+
2176: 2097160,
|
|
9182
|
+
2432: 8192,
|
|
9183
|
+
2688: 268443656,
|
|
9184
|
+
2944: 270532616,
|
|
9185
|
+
3200: 0,
|
|
9186
|
+
3456: 270540800,
|
|
9187
|
+
3712: 2105344,
|
|
9188
|
+
3968: 268435456,
|
|
9189
|
+
4096: 268443648,
|
|
9190
|
+
4352: 270532616,
|
|
9191
|
+
4608: 270540808,
|
|
9192
|
+
4864: 8200,
|
|
9193
|
+
5120: 2097152,
|
|
9194
|
+
5376: 268435456,
|
|
9195
|
+
5632: 268435464,
|
|
9196
|
+
5888: 2105344,
|
|
9197
|
+
6144: 2105352,
|
|
9198
|
+
6400: 0,
|
|
9199
|
+
6656: 8,
|
|
9200
|
+
6912: 270532608,
|
|
9201
|
+
7168: 8192,
|
|
9202
|
+
7424: 268443656,
|
|
9203
|
+
7680: 270540800,
|
|
9204
|
+
7936: 2097160,
|
|
9205
|
+
4224: 8,
|
|
9206
|
+
4480: 2105344,
|
|
9207
|
+
4736: 2097152,
|
|
9208
|
+
4992: 268435464,
|
|
9209
|
+
5248: 268443648,
|
|
9210
|
+
5504: 8200,
|
|
9211
|
+
5760: 270540808,
|
|
9212
|
+
6016: 270532608,
|
|
9213
|
+
6272: 270540800,
|
|
9214
|
+
6528: 270532616,
|
|
9215
|
+
6784: 8192,
|
|
9216
|
+
7040: 2105352,
|
|
9217
|
+
7296: 2097160,
|
|
9218
|
+
7552: 0,
|
|
9219
|
+
7808: 268435456,
|
|
9220
|
+
8064: 268443656
|
|
9221
|
+
},
|
|
9222
|
+
{
|
|
9223
|
+
0: 1048576,
|
|
9224
|
+
16: 33555457,
|
|
9225
|
+
32: 1024,
|
|
9226
|
+
48: 1049601,
|
|
9227
|
+
64: 34604033,
|
|
9228
|
+
80: 0,
|
|
9229
|
+
96: 1,
|
|
9230
|
+
112: 34603009,
|
|
9231
|
+
128: 33555456,
|
|
9232
|
+
144: 1048577,
|
|
9233
|
+
160: 33554433,
|
|
9234
|
+
176: 34604032,
|
|
9235
|
+
192: 34603008,
|
|
9236
|
+
208: 1025,
|
|
9237
|
+
224: 1049600,
|
|
9238
|
+
240: 33554432,
|
|
9239
|
+
8: 34603009,
|
|
9240
|
+
24: 0,
|
|
9241
|
+
40: 33555457,
|
|
9242
|
+
56: 34604032,
|
|
9243
|
+
72: 1048576,
|
|
9244
|
+
88: 33554433,
|
|
9245
|
+
104: 33554432,
|
|
9246
|
+
120: 1025,
|
|
9247
|
+
136: 1049601,
|
|
9248
|
+
152: 33555456,
|
|
9249
|
+
168: 34603008,
|
|
9250
|
+
184: 1048577,
|
|
9251
|
+
200: 1024,
|
|
9252
|
+
216: 34604033,
|
|
9253
|
+
232: 1,
|
|
9254
|
+
248: 1049600,
|
|
9255
|
+
256: 33554432,
|
|
9256
|
+
272: 1048576,
|
|
9257
|
+
288: 33555457,
|
|
9258
|
+
304: 34603009,
|
|
9259
|
+
320: 1048577,
|
|
9260
|
+
336: 33555456,
|
|
9261
|
+
352: 34604032,
|
|
9262
|
+
368: 1049601,
|
|
9263
|
+
384: 1025,
|
|
9264
|
+
400: 34604033,
|
|
9265
|
+
416: 1049600,
|
|
9266
|
+
432: 1,
|
|
9267
|
+
448: 0,
|
|
9268
|
+
464: 34603008,
|
|
9269
|
+
480: 33554433,
|
|
9270
|
+
496: 1024,
|
|
9271
|
+
264: 1049600,
|
|
9272
|
+
280: 33555457,
|
|
9273
|
+
296: 34603009,
|
|
9274
|
+
312: 1,
|
|
9275
|
+
328: 33554432,
|
|
9276
|
+
344: 1048576,
|
|
9277
|
+
360: 1025,
|
|
9278
|
+
376: 34604032,
|
|
9279
|
+
392: 33554433,
|
|
9280
|
+
408: 34603008,
|
|
9281
|
+
424: 0,
|
|
9282
|
+
440: 34604033,
|
|
9283
|
+
456: 1049601,
|
|
9284
|
+
472: 1024,
|
|
9285
|
+
488: 33555456,
|
|
9286
|
+
504: 1048577
|
|
9287
|
+
},
|
|
9288
|
+
{
|
|
9289
|
+
0: 134219808,
|
|
9290
|
+
1: 131072,
|
|
9291
|
+
2: 134217728,
|
|
9292
|
+
3: 32,
|
|
9293
|
+
4: 131104,
|
|
9294
|
+
5: 134350880,
|
|
9295
|
+
6: 134350848,
|
|
9296
|
+
7: 2048,
|
|
9297
|
+
8: 134348800,
|
|
9298
|
+
9: 134219776,
|
|
9299
|
+
10: 133120,
|
|
9300
|
+
11: 134348832,
|
|
9301
|
+
12: 2080,
|
|
9302
|
+
13: 0,
|
|
9303
|
+
14: 134217760,
|
|
9304
|
+
15: 133152,
|
|
9305
|
+
2147483648: 2048,
|
|
9306
|
+
2147483649: 134350880,
|
|
9307
|
+
2147483650: 134219808,
|
|
9308
|
+
2147483651: 134217728,
|
|
9309
|
+
2147483652: 134348800,
|
|
9310
|
+
2147483653: 133120,
|
|
9311
|
+
2147483654: 133152,
|
|
9312
|
+
2147483655: 32,
|
|
9313
|
+
2147483656: 134217760,
|
|
9314
|
+
2147483657: 2080,
|
|
9315
|
+
2147483658: 131104,
|
|
9316
|
+
2147483659: 134350848,
|
|
9317
|
+
2147483660: 0,
|
|
9318
|
+
2147483661: 134348832,
|
|
9319
|
+
2147483662: 134219776,
|
|
9320
|
+
2147483663: 131072,
|
|
9321
|
+
16: 133152,
|
|
9322
|
+
17: 134350848,
|
|
9323
|
+
18: 32,
|
|
9324
|
+
19: 2048,
|
|
9325
|
+
20: 134219776,
|
|
9326
|
+
21: 134217760,
|
|
9327
|
+
22: 134348832,
|
|
9328
|
+
23: 131072,
|
|
9329
|
+
24: 0,
|
|
9330
|
+
25: 131104,
|
|
9331
|
+
26: 134348800,
|
|
9332
|
+
27: 134219808,
|
|
9333
|
+
28: 134350880,
|
|
9334
|
+
29: 133120,
|
|
9335
|
+
30: 2080,
|
|
9336
|
+
31: 134217728,
|
|
9337
|
+
2147483664: 131072,
|
|
9338
|
+
2147483665: 2048,
|
|
9339
|
+
2147483666: 134348832,
|
|
9340
|
+
2147483667: 133152,
|
|
9341
|
+
2147483668: 32,
|
|
9342
|
+
2147483669: 134348800,
|
|
9343
|
+
2147483670: 134217728,
|
|
9344
|
+
2147483671: 134219808,
|
|
9345
|
+
2147483672: 134350880,
|
|
9346
|
+
2147483673: 134217760,
|
|
9347
|
+
2147483674: 134219776,
|
|
9348
|
+
2147483675: 0,
|
|
9349
|
+
2147483676: 133120,
|
|
9350
|
+
2147483677: 2080,
|
|
9351
|
+
2147483678: 131104,
|
|
9352
|
+
2147483679: 134350848
|
|
9353
|
+
}
|
|
9354
|
+
];
|
|
9355
|
+
var SBOX_MASK = [
|
|
9356
|
+
4160749569,
|
|
9357
|
+
528482304,
|
|
9358
|
+
33030144,
|
|
9359
|
+
2064384,
|
|
9360
|
+
129024,
|
|
9361
|
+
8064,
|
|
9362
|
+
504,
|
|
9363
|
+
2147483679
|
|
9364
|
+
];
|
|
9365
|
+
var DES = C_algo.DES = BlockCipher.extend({
|
|
9366
|
+
_doReset: function() {
|
|
9367
|
+
var key = this._key;
|
|
9368
|
+
var keyWords = key.words;
|
|
9369
|
+
var keyBits = [];
|
|
9370
|
+
for (var i = 0; i < 56; i++) {
|
|
9371
|
+
var keyBitPos = PC1[i] - 1;
|
|
9372
|
+
keyBits[i] = keyWords[keyBitPos >>> 5] >>> 31 - keyBitPos % 32 & 1;
|
|
9373
|
+
}
|
|
9374
|
+
var subKeys = this._subKeys = [];
|
|
9375
|
+
for (var nSubKey = 0; nSubKey < 16; nSubKey++) {
|
|
9376
|
+
var subKey = subKeys[nSubKey] = [];
|
|
9377
|
+
var bitShift = BIT_SHIFTS[nSubKey];
|
|
9378
|
+
for (var i = 0; i < 24; i++) {
|
|
9379
|
+
subKey[i / 6 | 0] |= keyBits[(PC2[i] - 1 + bitShift) % 28] << 31 - i % 6;
|
|
9380
|
+
subKey[4 + (i / 6 | 0)] |= keyBits[28 + (PC2[i + 24] - 1 + bitShift) % 28] << 31 - i % 6;
|
|
9381
|
+
}
|
|
9382
|
+
subKey[0] = subKey[0] << 1 | subKey[0] >>> 31;
|
|
9383
|
+
for (var i = 1; i < 7; i++) {
|
|
9384
|
+
subKey[i] = subKey[i] >>> (i - 1) * 4 + 3;
|
|
9385
|
+
}
|
|
9386
|
+
subKey[7] = subKey[7] << 5 | subKey[7] >>> 27;
|
|
9387
|
+
}
|
|
9388
|
+
var invSubKeys = this._invSubKeys = [];
|
|
9389
|
+
for (var i = 0; i < 16; i++) {
|
|
9390
|
+
invSubKeys[i] = subKeys[15 - i];
|
|
9391
|
+
}
|
|
9392
|
+
},
|
|
9393
|
+
encryptBlock: function(M, offset) {
|
|
9394
|
+
this._doCryptBlock(M, offset, this._subKeys);
|
|
9395
|
+
},
|
|
9396
|
+
decryptBlock: function(M, offset) {
|
|
9397
|
+
this._doCryptBlock(M, offset, this._invSubKeys);
|
|
9398
|
+
},
|
|
9399
|
+
_doCryptBlock: function(M, offset, subKeys) {
|
|
9400
|
+
this._lBlock = M[offset];
|
|
9401
|
+
this._rBlock = M[offset + 1];
|
|
9402
|
+
exchangeLR.call(this, 4, 252645135);
|
|
9403
|
+
exchangeLR.call(this, 16, 65535);
|
|
9404
|
+
exchangeRL.call(this, 2, 858993459);
|
|
9405
|
+
exchangeRL.call(this, 8, 16711935);
|
|
9406
|
+
exchangeLR.call(this, 1, 1431655765);
|
|
9407
|
+
for (var round = 0; round < 16; round++) {
|
|
9408
|
+
var subKey = subKeys[round];
|
|
9409
|
+
var lBlock = this._lBlock;
|
|
9410
|
+
var rBlock = this._rBlock;
|
|
9411
|
+
var f = 0;
|
|
9412
|
+
for (var i = 0; i < 8; i++) {
|
|
9413
|
+
f |= SBOX_P[i][((rBlock ^ subKey[i]) & SBOX_MASK[i]) >>> 0];
|
|
9414
|
+
}
|
|
9415
|
+
this._lBlock = rBlock;
|
|
9416
|
+
this._rBlock = lBlock ^ f;
|
|
9417
|
+
}
|
|
9418
|
+
var t = this._lBlock;
|
|
9419
|
+
this._lBlock = this._rBlock;
|
|
9420
|
+
this._rBlock = t;
|
|
9421
|
+
exchangeLR.call(this, 1, 1431655765);
|
|
9422
|
+
exchangeRL.call(this, 8, 16711935);
|
|
9423
|
+
exchangeRL.call(this, 2, 858993459);
|
|
9424
|
+
exchangeLR.call(this, 16, 65535);
|
|
9425
|
+
exchangeLR.call(this, 4, 252645135);
|
|
9426
|
+
M[offset] = this._lBlock;
|
|
9427
|
+
M[offset + 1] = this._rBlock;
|
|
9428
|
+
},
|
|
9429
|
+
keySize: 64 / 32,
|
|
9430
|
+
ivSize: 64 / 32,
|
|
9431
|
+
blockSize: 64 / 32
|
|
9432
|
+
});
|
|
9433
|
+
function exchangeLR(offset, mask) {
|
|
9434
|
+
var t = (this._lBlock >>> offset ^ this._rBlock) & mask;
|
|
9435
|
+
this._rBlock ^= t;
|
|
9436
|
+
this._lBlock ^= t << offset;
|
|
9437
|
+
}
|
|
9438
|
+
function exchangeRL(offset, mask) {
|
|
9439
|
+
var t = (this._rBlock >>> offset ^ this._lBlock) & mask;
|
|
9440
|
+
this._lBlock ^= t;
|
|
9441
|
+
this._rBlock ^= t << offset;
|
|
9442
|
+
}
|
|
9443
|
+
C.DES = BlockCipher._createHelper(DES);
|
|
9444
|
+
var TripleDES = C_algo.TripleDES = BlockCipher.extend({
|
|
9445
|
+
_doReset: function() {
|
|
9446
|
+
var key = this._key;
|
|
9447
|
+
var keyWords = key.words;
|
|
9448
|
+
if (keyWords.length !== 2 && keyWords.length !== 4 && keyWords.length < 6) {
|
|
9449
|
+
throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");
|
|
9450
|
+
}
|
|
9451
|
+
var key1 = keyWords.slice(0, 2);
|
|
9452
|
+
var key2 = keyWords.length < 4 ? keyWords.slice(0, 2) : keyWords.slice(2, 4);
|
|
9453
|
+
var key3 = keyWords.length < 6 ? keyWords.slice(0, 2) : keyWords.slice(4, 6);
|
|
9454
|
+
this._des1 = DES.createEncryptor(WordArray.create(key1));
|
|
9455
|
+
this._des2 = DES.createEncryptor(WordArray.create(key2));
|
|
9456
|
+
this._des3 = DES.createEncryptor(WordArray.create(key3));
|
|
9457
|
+
},
|
|
9458
|
+
encryptBlock: function(M, offset) {
|
|
9459
|
+
this._des1.encryptBlock(M, offset);
|
|
9460
|
+
this._des2.decryptBlock(M, offset);
|
|
9461
|
+
this._des3.encryptBlock(M, offset);
|
|
9462
|
+
},
|
|
9463
|
+
decryptBlock: function(M, offset) {
|
|
9464
|
+
this._des3.decryptBlock(M, offset);
|
|
9465
|
+
this._des2.encryptBlock(M, offset);
|
|
9466
|
+
this._des1.decryptBlock(M, offset);
|
|
9467
|
+
},
|
|
9468
|
+
keySize: 192 / 32,
|
|
9469
|
+
ivSize: 64 / 32,
|
|
9470
|
+
blockSize: 64 / 32
|
|
9471
|
+
});
|
|
9472
|
+
C.TripleDES = BlockCipher._createHelper(TripleDES);
|
|
9473
|
+
})();
|
|
9474
|
+
return CryptoJS2.TripleDES;
|
|
9475
|
+
});
|
|
9476
|
+
})(tripledes);
|
|
9477
|
+
return tripledes.exports;
|
|
9478
|
+
}
|
|
9479
|
+
var rc4 = { exports: {} };
|
|
9480
|
+
var hasRequiredRc4;
|
|
9481
|
+
function requireRc4() {
|
|
9482
|
+
if (hasRequiredRc4)
|
|
9483
|
+
return rc4.exports;
|
|
9484
|
+
hasRequiredRc4 = 1;
|
|
9485
|
+
(function(module, exports) {
|
|
9486
|
+
(function(root, factory, undef) {
|
|
9487
|
+
{
|
|
9488
|
+
module.exports = factory(requireCore(), encBase64Exports, requireMd5(), requireEvpkdf(), requireCipherCore());
|
|
9489
|
+
}
|
|
9490
|
+
})(commonjsGlobal, function(CryptoJS2) {
|
|
9491
|
+
(function() {
|
|
9492
|
+
var C = CryptoJS2;
|
|
9493
|
+
var C_lib = C.lib;
|
|
9494
|
+
var StreamCipher = C_lib.StreamCipher;
|
|
9495
|
+
var C_algo = C.algo;
|
|
9496
|
+
var RC4 = C_algo.RC4 = StreamCipher.extend({
|
|
9497
|
+
_doReset: function() {
|
|
9498
|
+
var key = this._key;
|
|
9499
|
+
var keyWords = key.words;
|
|
9500
|
+
var keySigBytes = key.sigBytes;
|
|
9501
|
+
var S = this._S = [];
|
|
9502
|
+
for (var i = 0; i < 256; i++) {
|
|
9503
|
+
S[i] = i;
|
|
9504
|
+
}
|
|
9505
|
+
for (var i = 0, j = 0; i < 256; i++) {
|
|
9506
|
+
var keyByteIndex = i % keySigBytes;
|
|
9507
|
+
var keyByte = keyWords[keyByteIndex >>> 2] >>> 24 - keyByteIndex % 4 * 8 & 255;
|
|
9508
|
+
j = (j + S[i] + keyByte) % 256;
|
|
9509
|
+
var t = S[i];
|
|
9510
|
+
S[i] = S[j];
|
|
9511
|
+
S[j] = t;
|
|
9512
|
+
}
|
|
9513
|
+
this._i = this._j = 0;
|
|
9514
|
+
},
|
|
9515
|
+
_doProcessBlock: function(M, offset) {
|
|
9516
|
+
M[offset] ^= generateKeystreamWord.call(this);
|
|
9517
|
+
},
|
|
9518
|
+
keySize: 256 / 32,
|
|
9519
|
+
ivSize: 0
|
|
9520
|
+
});
|
|
9521
|
+
function generateKeystreamWord() {
|
|
9522
|
+
var S = this._S;
|
|
9523
|
+
var i = this._i;
|
|
9524
|
+
var j = this._j;
|
|
9525
|
+
var keystreamWord = 0;
|
|
9526
|
+
for (var n = 0; n < 4; n++) {
|
|
9527
|
+
i = (i + 1) % 256;
|
|
9528
|
+
j = (j + S[i]) % 256;
|
|
9529
|
+
var t = S[i];
|
|
9530
|
+
S[i] = S[j];
|
|
9531
|
+
S[j] = t;
|
|
9532
|
+
keystreamWord |= S[(S[i] + S[j]) % 256] << 24 - n * 8;
|
|
9533
|
+
}
|
|
9534
|
+
this._i = i;
|
|
9535
|
+
this._j = j;
|
|
9536
|
+
return keystreamWord;
|
|
9537
|
+
}
|
|
9538
|
+
C.RC4 = StreamCipher._createHelper(RC4);
|
|
9539
|
+
var RC4Drop = C_algo.RC4Drop = RC4.extend({
|
|
9540
|
+
/**
|
|
9541
|
+
* Configuration options.
|
|
9542
|
+
*
|
|
9543
|
+
* @property {number} drop The number of keystream words to drop. Default 192
|
|
9544
|
+
*/
|
|
9545
|
+
cfg: RC4.cfg.extend({
|
|
9546
|
+
drop: 192
|
|
9547
|
+
}),
|
|
9548
|
+
_doReset: function() {
|
|
9549
|
+
RC4._doReset.call(this);
|
|
9550
|
+
for (var i = this.cfg.drop; i > 0; i--) {
|
|
9551
|
+
generateKeystreamWord.call(this);
|
|
9552
|
+
}
|
|
9553
|
+
}
|
|
9554
|
+
});
|
|
9555
|
+
C.RC4Drop = StreamCipher._createHelper(RC4Drop);
|
|
9556
|
+
})();
|
|
9557
|
+
return CryptoJS2.RC4;
|
|
9558
|
+
});
|
|
9559
|
+
})(rc4);
|
|
9560
|
+
return rc4.exports;
|
|
9561
|
+
}
|
|
9562
|
+
var rabbit = { exports: {} };
|
|
9563
|
+
var hasRequiredRabbit;
|
|
9564
|
+
function requireRabbit() {
|
|
9565
|
+
if (hasRequiredRabbit)
|
|
9566
|
+
return rabbit.exports;
|
|
9567
|
+
hasRequiredRabbit = 1;
|
|
9568
|
+
(function(module, exports) {
|
|
9569
|
+
(function(root, factory, undef) {
|
|
9570
|
+
{
|
|
9571
|
+
module.exports = factory(requireCore(), encBase64Exports, requireMd5(), requireEvpkdf(), requireCipherCore());
|
|
9572
|
+
}
|
|
9573
|
+
})(commonjsGlobal, function(CryptoJS2) {
|
|
9574
|
+
(function() {
|
|
9575
|
+
var C = CryptoJS2;
|
|
9576
|
+
var C_lib = C.lib;
|
|
9577
|
+
var StreamCipher = C_lib.StreamCipher;
|
|
9578
|
+
var C_algo = C.algo;
|
|
9579
|
+
var S = [];
|
|
9580
|
+
var C_ = [];
|
|
9581
|
+
var G = [];
|
|
9582
|
+
var Rabbit = C_algo.Rabbit = StreamCipher.extend({
|
|
9583
|
+
_doReset: function() {
|
|
9584
|
+
var K = this._key.words;
|
|
9585
|
+
var iv = this.cfg.iv;
|
|
9586
|
+
for (var i = 0; i < 4; i++) {
|
|
9587
|
+
K[i] = (K[i] << 8 | K[i] >>> 24) & 16711935 | (K[i] << 24 | K[i] >>> 8) & 4278255360;
|
|
9588
|
+
}
|
|
9589
|
+
var X = this._X = [
|
|
9590
|
+
K[0],
|
|
9591
|
+
K[3] << 16 | K[2] >>> 16,
|
|
9592
|
+
K[1],
|
|
9593
|
+
K[0] << 16 | K[3] >>> 16,
|
|
9594
|
+
K[2],
|
|
9595
|
+
K[1] << 16 | K[0] >>> 16,
|
|
9596
|
+
K[3],
|
|
9597
|
+
K[2] << 16 | K[1] >>> 16
|
|
9598
|
+
];
|
|
9599
|
+
var C2 = this._C = [
|
|
9600
|
+
K[2] << 16 | K[2] >>> 16,
|
|
9601
|
+
K[0] & 4294901760 | K[1] & 65535,
|
|
9602
|
+
K[3] << 16 | K[3] >>> 16,
|
|
9603
|
+
K[1] & 4294901760 | K[2] & 65535,
|
|
9604
|
+
K[0] << 16 | K[0] >>> 16,
|
|
9605
|
+
K[2] & 4294901760 | K[3] & 65535,
|
|
9606
|
+
K[1] << 16 | K[1] >>> 16,
|
|
9607
|
+
K[3] & 4294901760 | K[0] & 65535
|
|
9608
|
+
];
|
|
9609
|
+
this._b = 0;
|
|
9610
|
+
for (var i = 0; i < 4; i++) {
|
|
9611
|
+
nextState.call(this);
|
|
9612
|
+
}
|
|
9613
|
+
for (var i = 0; i < 8; i++) {
|
|
9614
|
+
C2[i] ^= X[i + 4 & 7];
|
|
9615
|
+
}
|
|
9616
|
+
if (iv) {
|
|
9617
|
+
var IV = iv.words;
|
|
9618
|
+
var IV_0 = IV[0];
|
|
9619
|
+
var IV_1 = IV[1];
|
|
9620
|
+
var i0 = (IV_0 << 8 | IV_0 >>> 24) & 16711935 | (IV_0 << 24 | IV_0 >>> 8) & 4278255360;
|
|
9621
|
+
var i2 = (IV_1 << 8 | IV_1 >>> 24) & 16711935 | (IV_1 << 24 | IV_1 >>> 8) & 4278255360;
|
|
9622
|
+
var i1 = i0 >>> 16 | i2 & 4294901760;
|
|
9623
|
+
var i3 = i2 << 16 | i0 & 65535;
|
|
9624
|
+
C2[0] ^= i0;
|
|
9625
|
+
C2[1] ^= i1;
|
|
9626
|
+
C2[2] ^= i2;
|
|
9627
|
+
C2[3] ^= i3;
|
|
9628
|
+
C2[4] ^= i0;
|
|
9629
|
+
C2[5] ^= i1;
|
|
9630
|
+
C2[6] ^= i2;
|
|
9631
|
+
C2[7] ^= i3;
|
|
9632
|
+
for (var i = 0; i < 4; i++) {
|
|
9633
|
+
nextState.call(this);
|
|
9634
|
+
}
|
|
9635
|
+
}
|
|
9636
|
+
},
|
|
9637
|
+
_doProcessBlock: function(M, offset) {
|
|
9638
|
+
var X = this._X;
|
|
9639
|
+
nextState.call(this);
|
|
9640
|
+
S[0] = X[0] ^ X[5] >>> 16 ^ X[3] << 16;
|
|
9641
|
+
S[1] = X[2] ^ X[7] >>> 16 ^ X[5] << 16;
|
|
9642
|
+
S[2] = X[4] ^ X[1] >>> 16 ^ X[7] << 16;
|
|
9643
|
+
S[3] = X[6] ^ X[3] >>> 16 ^ X[1] << 16;
|
|
9644
|
+
for (var i = 0; i < 4; i++) {
|
|
9645
|
+
S[i] = (S[i] << 8 | S[i] >>> 24) & 16711935 | (S[i] << 24 | S[i] >>> 8) & 4278255360;
|
|
9646
|
+
M[offset + i] ^= S[i];
|
|
9647
|
+
}
|
|
9648
|
+
},
|
|
9649
|
+
blockSize: 128 / 32,
|
|
9650
|
+
ivSize: 64 / 32
|
|
9651
|
+
});
|
|
9652
|
+
function nextState() {
|
|
9653
|
+
var X = this._X;
|
|
9654
|
+
var C2 = this._C;
|
|
9655
|
+
for (var i = 0; i < 8; i++) {
|
|
9656
|
+
C_[i] = C2[i];
|
|
9657
|
+
}
|
|
9658
|
+
C2[0] = C2[0] + 1295307597 + this._b | 0;
|
|
9659
|
+
C2[1] = C2[1] + 3545052371 + (C2[0] >>> 0 < C_[0] >>> 0 ? 1 : 0) | 0;
|
|
9660
|
+
C2[2] = C2[2] + 886263092 + (C2[1] >>> 0 < C_[1] >>> 0 ? 1 : 0) | 0;
|
|
9661
|
+
C2[3] = C2[3] + 1295307597 + (C2[2] >>> 0 < C_[2] >>> 0 ? 1 : 0) | 0;
|
|
9662
|
+
C2[4] = C2[4] + 3545052371 + (C2[3] >>> 0 < C_[3] >>> 0 ? 1 : 0) | 0;
|
|
9663
|
+
C2[5] = C2[5] + 886263092 + (C2[4] >>> 0 < C_[4] >>> 0 ? 1 : 0) | 0;
|
|
9664
|
+
C2[6] = C2[6] + 1295307597 + (C2[5] >>> 0 < C_[5] >>> 0 ? 1 : 0) | 0;
|
|
9665
|
+
C2[7] = C2[7] + 3545052371 + (C2[6] >>> 0 < C_[6] >>> 0 ? 1 : 0) | 0;
|
|
9666
|
+
this._b = C2[7] >>> 0 < C_[7] >>> 0 ? 1 : 0;
|
|
9667
|
+
for (var i = 0; i < 8; i++) {
|
|
9668
|
+
var gx = X[i] + C2[i];
|
|
9669
|
+
var ga = gx & 65535;
|
|
9670
|
+
var gb = gx >>> 16;
|
|
9671
|
+
var gh = ((ga * ga >>> 17) + ga * gb >>> 15) + gb * gb;
|
|
9672
|
+
var gl = ((gx & 4294901760) * gx | 0) + ((gx & 65535) * gx | 0);
|
|
9673
|
+
G[i] = gh ^ gl;
|
|
9674
|
+
}
|
|
9675
|
+
X[0] = G[0] + (G[7] << 16 | G[7] >>> 16) + (G[6] << 16 | G[6] >>> 16) | 0;
|
|
9676
|
+
X[1] = G[1] + (G[0] << 8 | G[0] >>> 24) + G[7] | 0;
|
|
9677
|
+
X[2] = G[2] + (G[1] << 16 | G[1] >>> 16) + (G[0] << 16 | G[0] >>> 16) | 0;
|
|
9678
|
+
X[3] = G[3] + (G[2] << 8 | G[2] >>> 24) + G[1] | 0;
|
|
9679
|
+
X[4] = G[4] + (G[3] << 16 | G[3] >>> 16) + (G[2] << 16 | G[2] >>> 16) | 0;
|
|
9680
|
+
X[5] = G[5] + (G[4] << 8 | G[4] >>> 24) + G[3] | 0;
|
|
9681
|
+
X[6] = G[6] + (G[5] << 16 | G[5] >>> 16) + (G[4] << 16 | G[4] >>> 16) | 0;
|
|
9682
|
+
X[7] = G[7] + (G[6] << 8 | G[6] >>> 24) + G[5] | 0;
|
|
9683
|
+
}
|
|
9684
|
+
C.Rabbit = StreamCipher._createHelper(Rabbit);
|
|
9685
|
+
})();
|
|
9686
|
+
return CryptoJS2.Rabbit;
|
|
9687
|
+
});
|
|
9688
|
+
})(rabbit);
|
|
9689
|
+
return rabbit.exports;
|
|
9690
|
+
}
|
|
9691
|
+
var rabbitLegacy = { exports: {} };
|
|
9692
|
+
var hasRequiredRabbitLegacy;
|
|
9693
|
+
function requireRabbitLegacy() {
|
|
9694
|
+
if (hasRequiredRabbitLegacy)
|
|
9695
|
+
return rabbitLegacy.exports;
|
|
9696
|
+
hasRequiredRabbitLegacy = 1;
|
|
9697
|
+
(function(module, exports) {
|
|
9698
|
+
(function(root, factory, undef) {
|
|
9699
|
+
{
|
|
9700
|
+
module.exports = factory(requireCore(), encBase64Exports, requireMd5(), requireEvpkdf(), requireCipherCore());
|
|
9701
|
+
}
|
|
9702
|
+
})(commonjsGlobal, function(CryptoJS2) {
|
|
9703
|
+
(function() {
|
|
9704
|
+
var C = CryptoJS2;
|
|
9705
|
+
var C_lib = C.lib;
|
|
9706
|
+
var StreamCipher = C_lib.StreamCipher;
|
|
9707
|
+
var C_algo = C.algo;
|
|
9708
|
+
var S = [];
|
|
9709
|
+
var C_ = [];
|
|
9710
|
+
var G = [];
|
|
9711
|
+
var RabbitLegacy = C_algo.RabbitLegacy = StreamCipher.extend({
|
|
9712
|
+
_doReset: function() {
|
|
9713
|
+
var K = this._key.words;
|
|
9714
|
+
var iv = this.cfg.iv;
|
|
9715
|
+
var X = this._X = [
|
|
9716
|
+
K[0],
|
|
9717
|
+
K[3] << 16 | K[2] >>> 16,
|
|
9718
|
+
K[1],
|
|
9719
|
+
K[0] << 16 | K[3] >>> 16,
|
|
9720
|
+
K[2],
|
|
9721
|
+
K[1] << 16 | K[0] >>> 16,
|
|
9722
|
+
K[3],
|
|
9723
|
+
K[2] << 16 | K[1] >>> 16
|
|
9724
|
+
];
|
|
9725
|
+
var C2 = this._C = [
|
|
9726
|
+
K[2] << 16 | K[2] >>> 16,
|
|
9727
|
+
K[0] & 4294901760 | K[1] & 65535,
|
|
9728
|
+
K[3] << 16 | K[3] >>> 16,
|
|
9729
|
+
K[1] & 4294901760 | K[2] & 65535,
|
|
9730
|
+
K[0] << 16 | K[0] >>> 16,
|
|
9731
|
+
K[2] & 4294901760 | K[3] & 65535,
|
|
9732
|
+
K[1] << 16 | K[1] >>> 16,
|
|
9733
|
+
K[3] & 4294901760 | K[0] & 65535
|
|
9734
|
+
];
|
|
9735
|
+
this._b = 0;
|
|
9736
|
+
for (var i = 0; i < 4; i++) {
|
|
9737
|
+
nextState.call(this);
|
|
9738
|
+
}
|
|
9739
|
+
for (var i = 0; i < 8; i++) {
|
|
9740
|
+
C2[i] ^= X[i + 4 & 7];
|
|
9741
|
+
}
|
|
9742
|
+
if (iv) {
|
|
9743
|
+
var IV = iv.words;
|
|
9744
|
+
var IV_0 = IV[0];
|
|
9745
|
+
var IV_1 = IV[1];
|
|
9746
|
+
var i0 = (IV_0 << 8 | IV_0 >>> 24) & 16711935 | (IV_0 << 24 | IV_0 >>> 8) & 4278255360;
|
|
9747
|
+
var i2 = (IV_1 << 8 | IV_1 >>> 24) & 16711935 | (IV_1 << 24 | IV_1 >>> 8) & 4278255360;
|
|
9748
|
+
var i1 = i0 >>> 16 | i2 & 4294901760;
|
|
9749
|
+
var i3 = i2 << 16 | i0 & 65535;
|
|
9750
|
+
C2[0] ^= i0;
|
|
9751
|
+
C2[1] ^= i1;
|
|
9752
|
+
C2[2] ^= i2;
|
|
9753
|
+
C2[3] ^= i3;
|
|
9754
|
+
C2[4] ^= i0;
|
|
9755
|
+
C2[5] ^= i1;
|
|
9756
|
+
C2[6] ^= i2;
|
|
9757
|
+
C2[7] ^= i3;
|
|
9758
|
+
for (var i = 0; i < 4; i++) {
|
|
9759
|
+
nextState.call(this);
|
|
9760
|
+
}
|
|
9761
|
+
}
|
|
9762
|
+
},
|
|
9763
|
+
_doProcessBlock: function(M, offset) {
|
|
9764
|
+
var X = this._X;
|
|
9765
|
+
nextState.call(this);
|
|
9766
|
+
S[0] = X[0] ^ X[5] >>> 16 ^ X[3] << 16;
|
|
9767
|
+
S[1] = X[2] ^ X[7] >>> 16 ^ X[5] << 16;
|
|
9768
|
+
S[2] = X[4] ^ X[1] >>> 16 ^ X[7] << 16;
|
|
9769
|
+
S[3] = X[6] ^ X[3] >>> 16 ^ X[1] << 16;
|
|
9770
|
+
for (var i = 0; i < 4; i++) {
|
|
9771
|
+
S[i] = (S[i] << 8 | S[i] >>> 24) & 16711935 | (S[i] << 24 | S[i] >>> 8) & 4278255360;
|
|
9772
|
+
M[offset + i] ^= S[i];
|
|
9773
|
+
}
|
|
9774
|
+
},
|
|
9775
|
+
blockSize: 128 / 32,
|
|
9776
|
+
ivSize: 64 / 32
|
|
9777
|
+
});
|
|
9778
|
+
function nextState() {
|
|
9779
|
+
var X = this._X;
|
|
9780
|
+
var C2 = this._C;
|
|
9781
|
+
for (var i = 0; i < 8; i++) {
|
|
9782
|
+
C_[i] = C2[i];
|
|
9783
|
+
}
|
|
9784
|
+
C2[0] = C2[0] + 1295307597 + this._b | 0;
|
|
9785
|
+
C2[1] = C2[1] + 3545052371 + (C2[0] >>> 0 < C_[0] >>> 0 ? 1 : 0) | 0;
|
|
9786
|
+
C2[2] = C2[2] + 886263092 + (C2[1] >>> 0 < C_[1] >>> 0 ? 1 : 0) | 0;
|
|
9787
|
+
C2[3] = C2[3] + 1295307597 + (C2[2] >>> 0 < C_[2] >>> 0 ? 1 : 0) | 0;
|
|
9788
|
+
C2[4] = C2[4] + 3545052371 + (C2[3] >>> 0 < C_[3] >>> 0 ? 1 : 0) | 0;
|
|
9789
|
+
C2[5] = C2[5] + 886263092 + (C2[4] >>> 0 < C_[4] >>> 0 ? 1 : 0) | 0;
|
|
9790
|
+
C2[6] = C2[6] + 1295307597 + (C2[5] >>> 0 < C_[5] >>> 0 ? 1 : 0) | 0;
|
|
9791
|
+
C2[7] = C2[7] + 3545052371 + (C2[6] >>> 0 < C_[6] >>> 0 ? 1 : 0) | 0;
|
|
9792
|
+
this._b = C2[7] >>> 0 < C_[7] >>> 0 ? 1 : 0;
|
|
9793
|
+
for (var i = 0; i < 8; i++) {
|
|
9794
|
+
var gx = X[i] + C2[i];
|
|
9795
|
+
var ga = gx & 65535;
|
|
9796
|
+
var gb = gx >>> 16;
|
|
9797
|
+
var gh = ((ga * ga >>> 17) + ga * gb >>> 15) + gb * gb;
|
|
9798
|
+
var gl = ((gx & 4294901760) * gx | 0) + ((gx & 65535) * gx | 0);
|
|
9799
|
+
G[i] = gh ^ gl;
|
|
9800
|
+
}
|
|
9801
|
+
X[0] = G[0] + (G[7] << 16 | G[7] >>> 16) + (G[6] << 16 | G[6] >>> 16) | 0;
|
|
9802
|
+
X[1] = G[1] + (G[0] << 8 | G[0] >>> 24) + G[7] | 0;
|
|
9803
|
+
X[2] = G[2] + (G[1] << 16 | G[1] >>> 16) + (G[0] << 16 | G[0] >>> 16) | 0;
|
|
9804
|
+
X[3] = G[3] + (G[2] << 8 | G[2] >>> 24) + G[1] | 0;
|
|
9805
|
+
X[4] = G[4] + (G[3] << 16 | G[3] >>> 16) + (G[2] << 16 | G[2] >>> 16) | 0;
|
|
9806
|
+
X[5] = G[5] + (G[4] << 8 | G[4] >>> 24) + G[3] | 0;
|
|
9807
|
+
X[6] = G[6] + (G[5] << 16 | G[5] >>> 16) + (G[4] << 16 | G[4] >>> 16) | 0;
|
|
9808
|
+
X[7] = G[7] + (G[6] << 8 | G[6] >>> 24) + G[5] | 0;
|
|
9809
|
+
}
|
|
9810
|
+
C.RabbitLegacy = StreamCipher._createHelper(RabbitLegacy);
|
|
9811
|
+
})();
|
|
9812
|
+
return CryptoJS2.RabbitLegacy;
|
|
9813
|
+
});
|
|
9814
|
+
})(rabbitLegacy);
|
|
9815
|
+
return rabbitLegacy.exports;
|
|
9816
|
+
}
|
|
9817
|
+
(function(module, exports) {
|
|
9818
|
+
(function(root, factory, undef) {
|
|
9819
|
+
{
|
|
9820
|
+
module.exports = factory(requireCore(), requireX64Core(), requireLibTypedarrays(), requireEncUtf16(), encBase64Exports, requireEncBase64url(), requireMd5(), requireSha1(), requireSha256(), requireSha224(), requireSha512(), requireSha384(), requireSha3(), requireRipemd160(), requireHmac(), requirePbkdf2(), requireEvpkdf(), requireCipherCore(), requireModeCfb(), requireModeCtr(), requireModeCtrGladman(), requireModeOfb(), requireModeEcb(), requirePadAnsix923(), requirePadIso10126(), requirePadIso97971(), requirePadZeropadding(), requirePadNopadding(), requireFormatHex(), aesExports, requireTripledes(), requireRc4(), requireRabbit(), requireRabbitLegacy());
|
|
9821
|
+
}
|
|
9822
|
+
})(commonjsGlobal, function(CryptoJS2) {
|
|
9823
|
+
return CryptoJS2;
|
|
9824
|
+
});
|
|
9825
|
+
})(cryptoJs);
|
|
9826
|
+
var cryptoJsExports = cryptoJs.exports;
|
|
9827
|
+
const CryptoJS = /* @__PURE__ */ getDefaultExportFromCjs(cryptoJsExports);
|
|
6444
9828
|
const WidgetStore = {
|
|
6445
9829
|
el: void 0,
|
|
6446
9830
|
applicationId: void 0,
|
|
@@ -6457,6 +9841,7 @@ const WidgetStore = {
|
|
|
6457
9841
|
termsPassed: false,
|
|
6458
9842
|
useTerms: true,
|
|
6459
9843
|
sandbox: false,
|
|
9844
|
+
useBootpayInAppSdk: false,
|
|
6460
9845
|
widgetKey: void 0,
|
|
6461
9846
|
externalTerms: [],
|
|
6462
9847
|
widgetExtra: {
|
|
@@ -6478,6 +9863,7 @@ const WidgetStore = {
|
|
|
6478
9863
|
this.widgetExtra = data2.widget_extra;
|
|
6479
9864
|
this.widgetKey = data2.widget_key;
|
|
6480
9865
|
this.sandbox = data2.sandbox === true;
|
|
9866
|
+
this.useBootpayInAppSdk = data2.use_bootpay_inapp_sdk === true;
|
|
6481
9867
|
this.termsPassed = false;
|
|
6482
9868
|
this.extra = {};
|
|
6483
9869
|
},
|
|
@@ -6514,9 +9900,61 @@ const WidgetStore = {
|
|
|
6514
9900
|
if (data2.external_terms !== void 0) {
|
|
6515
9901
|
this.externalTerms = data2.external_terms;
|
|
6516
9902
|
}
|
|
9903
|
+
if (data2.use_bootpay_inapp_sdk !== void 0) {
|
|
9904
|
+
this.useBootpayInAppSdk = data2.use_bootpay_inapp_sdk;
|
|
9905
|
+
}
|
|
6517
9906
|
if (data2.widget_key !== void 0) {
|
|
6518
9907
|
this.widgetKey = data2.widget_key;
|
|
6519
9908
|
}
|
|
9909
|
+
},
|
|
9910
|
+
encryptParameters() {
|
|
9911
|
+
return encodeURIComponent(
|
|
9912
|
+
this.encrypt({
|
|
9913
|
+
use_only_oopay: this.useOnlyOOpay,
|
|
9914
|
+
user_token: this.userToken,
|
|
9915
|
+
sandbox: this.sandbox,
|
|
9916
|
+
use_terms: this.useTerms,
|
|
9917
|
+
external_terms: this.externalTerms,
|
|
9918
|
+
key: this.widgetKey,
|
|
9919
|
+
use_bootpay_inapp_sdk: this.useBootpayInAppSdk,
|
|
9920
|
+
extra: this.extra,
|
|
9921
|
+
log_level: Logger.level
|
|
9922
|
+
})
|
|
9923
|
+
);
|
|
9924
|
+
},
|
|
9925
|
+
encrypt(data2) {
|
|
9926
|
+
if (isBlank(this.applicationId)) {
|
|
9927
|
+
throw new Error("privateKey is not set");
|
|
9928
|
+
}
|
|
9929
|
+
const payload = typeof data2 === "string" ? data2 : JSON.stringify(data2);
|
|
9930
|
+
const encrypted = AES.encrypt(
|
|
9931
|
+
payload,
|
|
9932
|
+
CryptoJS.enc.Utf8.parse(this.applicationId.substring(0, 16)),
|
|
9933
|
+
{
|
|
9934
|
+
mode: CryptoJS.mode.ECB,
|
|
9935
|
+
padding: CryptoJS.pad.Pkcs7
|
|
9936
|
+
}
|
|
9937
|
+
);
|
|
9938
|
+
return Base64.stringify(encrypted.ciphertext);
|
|
9939
|
+
},
|
|
9940
|
+
decrypt(data2) {
|
|
9941
|
+
if (isBlank(this.applicationId)) {
|
|
9942
|
+
throw new Error("privateKey is not set");
|
|
9943
|
+
}
|
|
9944
|
+
const decrypted = AES.decrypt(
|
|
9945
|
+
data2,
|
|
9946
|
+
CryptoJS.enc.Utf8.parse(this.applicationId.substring(0, 16)),
|
|
9947
|
+
{
|
|
9948
|
+
mode: CryptoJS.mode.ECB,
|
|
9949
|
+
padding: CryptoJS.pad.Pkcs7
|
|
9950
|
+
}
|
|
9951
|
+
);
|
|
9952
|
+
const decryptedString = decrypted.toString(CryptoJS.enc.Utf8);
|
|
9953
|
+
try {
|
|
9954
|
+
return JSON.parse(decryptedString);
|
|
9955
|
+
} catch (e) {
|
|
9956
|
+
return decryptedString;
|
|
9957
|
+
}
|
|
6520
9958
|
}
|
|
6521
9959
|
};
|
|
6522
9960
|
class TemplateWidgetManager extends TemplateManager {
|
|
@@ -6553,7 +9991,7 @@ class TemplateWidgetManager extends TemplateManager {
|
|
|
6553
9991
|
iFrame.setAttribute(
|
|
6554
9992
|
"src",
|
|
6555
9993
|
Environment.toWidget(
|
|
6556
|
-
`p/${this.$widgetStore.applicationId}`
|
|
9994
|
+
`p/${this.$widgetStore.applicationId}/${this.$widgetStore.encryptParameters()}`
|
|
6557
9995
|
)
|
|
6558
9996
|
);
|
|
6559
9997
|
}
|
|
@@ -6720,6 +10158,8 @@ class ConfirmModalManager extends TemplateManager {
|
|
|
6720
10158
|
this.$modalWindowId = "__bootpay-confirm-modal-window";
|
|
6721
10159
|
this.$additionalClass = "rounded-iframe";
|
|
6722
10160
|
this.$title = "알림";
|
|
10161
|
+
this.$confirmButtonText = "확인";
|
|
10162
|
+
this.$cancelButtonText = "취소";
|
|
6723
10163
|
this.$template = this.template();
|
|
6724
10164
|
this.$message = "";
|
|
6725
10165
|
}
|
|
@@ -6729,21 +10169,24 @@ class ConfirmModalManager extends TemplateManager {
|
|
|
6729
10169
|
<div class="bootpay-confirm-window fade-in" id="${this.$modalWindowId}">
|
|
6730
10170
|
<div class="bootpay__alert-header">
|
|
6731
10171
|
${this.$title}
|
|
10172
|
+
<button class="bootpay-close-btn" onClick="window.BootpayWidget.alertCancel()"></button>
|
|
6732
10173
|
</div>
|
|
6733
10174
|
<div class="bootpay__alert-body">
|
|
6734
10175
|
${this.$message}
|
|
6735
10176
|
</div>
|
|
6736
10177
|
<div class="bootpay__alert-footer">
|
|
6737
|
-
<button class="bootpay__alert-close" onClick="window.BootpayWidget.alertCancel()"
|
|
6738
|
-
<button class="bootpay__alert-close bootpay-primary" onClick="window.BootpayWidget.alertConfirm()"
|
|
10178
|
+
<button class="bootpay__alert-close border-right" onClick="window.BootpayWidget.alertCancel()">${this.$cancelButtonText}</button>
|
|
10179
|
+
<button class="bootpay__alert-close bootpay-primary" onClick="window.BootpayWidget.alertConfirm()">${this.$confirmButtonText}</button>
|
|
6739
10180
|
</div>
|
|
6740
10181
|
</div>
|
|
6741
10182
|
</div>
|
|
6742
10183
|
`;
|
|
6743
10184
|
}
|
|
6744
|
-
show(message, title = "알림") {
|
|
10185
|
+
show(message, title = "알림", confirmButton = "확인", cancelButton = "취소") {
|
|
6745
10186
|
this.$title = title;
|
|
6746
10187
|
this.$message = message;
|
|
10188
|
+
this.$confirmButtonText = confirmButton;
|
|
10189
|
+
this.$cancelButtonText = cancelButton;
|
|
6747
10190
|
this.$template = this.template();
|
|
6748
10191
|
this.createTemplateHtml();
|
|
6749
10192
|
this.bodyOpen();
|
|
@@ -6759,7 +10202,7 @@ class ConfirmModalManager extends TemplateManager {
|
|
|
6759
10202
|
element.remove();
|
|
6760
10203
|
}
|
|
6761
10204
|
this.bodyClose();
|
|
6762
|
-
},
|
|
10205
|
+
}, 100);
|
|
6763
10206
|
}
|
|
6764
10207
|
}
|
|
6765
10208
|
const ConfirmModal = new ConfirmModalManager();
|
|
@@ -6797,6 +10240,7 @@ class BootpayWidgetEventManager extends BootpayWindowEvent {
|
|
|
6797
10240
|
use_terms: TemplateWidget.$widgetStore.useTerms,
|
|
6798
10241
|
external_terms: TemplateWidget.$widgetStore.externalTerms,
|
|
6799
10242
|
key: TemplateWidget.$widgetStore.widgetKey,
|
|
10243
|
+
use_bootpay_inapp_sdk: TemplateWidget.$widgetStore.useBootpayInAppSdk,
|
|
6800
10244
|
log_level: Logger.level
|
|
6801
10245
|
});
|
|
6802
10246
|
case "bootpayRequestGetEnvironmentWidget":
|
|
@@ -6889,7 +10333,9 @@ class BootpayWidgetEventManager extends BootpayWindowEvent {
|
|
|
6889
10333
|
case "bootpayWidgetShowModal":
|
|
6890
10334
|
return ConfirmModal.show(
|
|
6891
10335
|
response.data.message,
|
|
6892
|
-
response.data.title
|
|
10336
|
+
response.data.title,
|
|
10337
|
+
response.data.confirmButtonText,
|
|
10338
|
+
response.data.cancelButtonText
|
|
6893
10339
|
);
|
|
6894
10340
|
default:
|
|
6895
10341
|
return this.reject(response);
|
|
@@ -6965,6 +10411,7 @@ class BootpayWidgetWindowManager extends BootpayManager {
|
|
|
6965
10411
|
user_token: data2.user_token,
|
|
6966
10412
|
use_only_oopay: data2.use_only_oopay,
|
|
6967
10413
|
external_terms: data2.external_terms,
|
|
10414
|
+
use_bootpay_inapp_sdk: data2.use_bootpay_inapp_sdk,
|
|
6968
10415
|
widget_extra: data2.extra,
|
|
6969
10416
|
use_terms: data2.use_terms,
|
|
6970
10417
|
sandbox: data2.sandbox,
|