Showing preview only (339K chars total). Download the full file or copy to clipboard to get everything.
Repository: ellermister/shorturl
Branch: master
Commit: 2a9bd61529a7
Files: 42
Total size: 319.5 KB
Directory structure:
gitextract_ov9t1mtt/
├── .github/
│ └── workflows/
│ └── docker-image.yml
├── .gitignore
├── Dockerfile
├── README.md
├── cache/
│ └── .gitignore
├── chnroutes.txt
├── crypto-js.js
├── helper.php
├── index.php
├── lang.php
├── libs/
│ ├── AAEncode.php
│ ├── Cache/
│ │ ├── Cache.php
│ │ ├── CacheManager.php
│ │ ├── FileCache.php
│ │ └── RedisCache.php
│ ├── EncryptTool.php
│ ├── Languages.php
│ ├── Redirects/
│ │ ├── BanChinaBrowser.php
│ │ ├── ChinaOnlyHandler.php
│ │ ├── DynamicHandler.php
│ │ ├── EncryptHandler.php
│ │ ├── FakePageHandler.php
│ │ ├── Handler.php
│ │ ├── MessageException.php
│ │ ├── MobileOnlyHandler.php
│ │ ├── NonChinaOnlyHandler.php
│ │ ├── NormalHandler.php
│ │ ├── OnceHandler.php
│ │ ├── PCOnlyHandler.php
│ │ ├── PasswordHandler.php
│ │ ├── RedirectRequest.php
│ │ ├── UserClient.php
│ │ └── WhisperHandler.php
│ └── ShortURL.php
├── static/
│ └── basic.js
└── view/
├── ban_china_browser.php
├── client.php
├── dynamic.php
├── encrypt.php
├── password.php
├── welcome.php
└── whisper2.php
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/workflows/docker-image.yml
================================================
name: Docker Image CI
on:
workflow_dispatch:
env:
UPLOAD_IMAGES: true
PUSH_IMAGES: true
RELEASE_IMAGE_TAG: ellermister/shourturl:latest
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build the Docker image
id: compile
run: |
docker build . --file Dockerfile --tag ${{ env.RELEASE_IMAGE_TAG }}
echo "status=success" >> $GITHUB_OUTPUT
echo "FILE_DATE=_$(date +"%Y%m%d%H%M")" >> $GITHUB_ENV
docker save ${{ env.RELEASE_IMAGE_TAG }} > docker.tar
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Push images to regitry
if: steps.compile.outputs.status == 'success' && env.PUSH_IMAGES == 'true'
run: docker push ${{ env.RELEASE_IMAGE_TAG }}
- name: Upload images
uses: actions/upload-artifact@main
if: steps.compile.outputs.status == 'success' && env.UPLOAD_IMAGES == 'true'
with:
name: ShortURL_Images${{ env.FILE_DATE }}
path: docker.tar
================================================
FILE: .gitignore
================================================
.idea
.project
================================================
FILE: Dockerfile
================================================
FROM kooldev/php:8.2-nginx
WORKDIR /app/public
COPY . /app/public
RUN wget https://raw.githubusercontent.com/ym/chnroutes2/master/chnroutes.txt -O /app/public/chnroutes.txt \
&& chmod -R 775 /app/public && chown -R kool:kool /app/public
================================================
FILE: README.md
================================================
# 🔗PHP轻量短链接
PHP轻量短链接是一个简单而强大的工具,用于生成短链接,并提供多种定制化的功能,使链接管理变得更加灵活和便捷。通过使用这个工具,您可以快速生成短链接,支持API方式和在线网页方式生成。该项目提供了丰富的功能,包括密码访问、附加图文信息、仅限特定地区访问等,以满足不同需求场景的链接管理。
## 体验预览
<https://x007.in/>
[](preview.png)
## 支持功能
- 🌵API快速生成短链接
- 🌱在线网页生成短链接
- 🍄支持Redis、File缓存控制
- 🏄🏼♀️ 原始: 直接跳转到目标网站
- 🐸无Referer: 无 Referer 参数,目标网站无法获取来源站地址
- 🕷 加密跳转 : 加密跳转参数信息,反大部分爬虫抓取探测
- 👺 伪装页面 : 使用随机信息、论坛、商品来骗过机器人爬虫
- 🔥 阅后即焚: 一次性跳转(阅后即焚)
- 🔑 密码访问: 将为你生成密码,访问时需要密码验证
- 📝 附加图文: 附加富文本信息,您可以在此留言并分享给您的其他社交媒体用户
- 💻 仅限PC访问
- 📱 仅限手机访问
- 🇨🇳 仅限中国大陆用户访问
- 🗺️ 仅限非中国大陆用户访问
## 安装
采用传统 php 项目方式部署安装,以下介绍两种方式进行部署安装,线上推荐使用 Docker。
### Docker 部署
运行命令之后访问 80 端口即可, 容器内部采用 php-fpm 与 nginx 并行提供服务。
```bash
docker run -d -p 80:80 ellermister/shourturl:latest
```
### 手动安装
**下载本程序到网站根目录**
```bash
php -S 127.0.0.1:12138
```
**访问浏览**
http://127.0.0.1:12138
**nginx 配置**
```nginx
location / {
try_files $uri $uri/ /index.php?$query_string;
}
```
**二级目录配置**
比如,`/shorturl/`以 `/` 结尾,实际访问 `http://ip/shorturl/`
```php
define('SUB_PATH', '/shorturl/');
```
同样,这里 nginx 要做配置
```nginx
location /shorturl {
try_files $uri $uri/ /shorturl/index.php?$query_string;
}
```
### API
**生成短链接**
```bash
curl -s http://127.0.0.1:12138/api/link?url=https://map.baidu.com/poi/%E4%B9%9D%E9%BE%99%E5%85%AC%E5%9B%AD/@12713897.395906774,2531599.1717763273,15.45z
```
Response
```json
{"msg":"ok","code":200,"data":"http://127.0.0.1:12138/s/aFdlm"}
```
================================================
FILE: cache/.gitignore
================================================
*
!.gitignore
================================================
FILE: chnroutes.txt
================================================
# 14166332 routes were dumped from us-iad01-rs01cn-b at Wed Nov 15 04:00:03 UTC 2023.
# Found 46493 routes matching, aggregated to 3447.
1.1.8.0/24
1.2.4.0/24
1.8.1.0/24
1.8.8.0/24
1.12.0.0/14
1.18.128.0/24
1.24.0.0/13
1.45.0.0/16
1.48.0.0/14
1.56.0.0/13
1.68.0.0/14
1.80.0.0/13
1.88.0.0/14
1.92.0.0/17
1.92.128.0/19
1.92.192.0/18
1.93.0.0/16
1.94.0.0/17
1.116.0.0/15
1.119.0.0/17
1.119.128.0/18
1.119.192.0/20
1.119.208.0/22
1.180.0.0/14
1.184.0.0/15
1.188.0.0/14
1.192.0.0/13
1.202.0.0/15
1.204.0.0/14
8.129.0.0/16
8.130.0.0/15
8.132.0.0/14
8.136.0.0/13
8.144.0.0/14
8.148.0.0/19
14.16.0.0/12
14.103.0.0/18
14.103.64.0/19
14.103.96.0/20
14.104.0.0/13
14.112.0.0/12
14.134.0.0/15
14.144.0.0/12
14.204.0.0/15
14.208.0.0/12
27.0.128.0/24
27.0.130.0/23
27.0.132.0/22
27.0.160.0/21
27.0.204.0/22
27.0.208.0/21
27.8.0.0/13
27.16.0.0/12
27.36.0.0/14
27.40.0.0/13
27.50.128.0/17
27.54.224.0/19
27.98.224.0/19
27.106.128.0/18
27.106.204.0/22
27.109.124.0/22
27.112.0.0/21
27.112.80.0/23
27.112.82.0/24
27.112.84.0/22
27.115.0.0/17
27.128.0.0/15
27.148.0.0/14
27.152.0.0/13
27.184.0.0/13
27.192.0.0/11
27.224.0.0/14
36.1.0.0/16
36.4.0.0/14
36.16.0.0/12
36.32.0.0/14
36.36.0.0/16
36.40.0.0/13
36.48.0.0/15
36.51.253.0/24
36.56.0.0/13
36.96.0.0/12
36.112.0.0/15
36.114.0.0/16
36.128.0.0/10
36.192.0.0/11
36.248.0.0/14
36.255.116.0/22
36.255.128.0/22
36.255.164.0/24
39.64.0.0/11
39.96.0.0/13
39.104.0.0/14
39.108.0.0/16
39.128.0.0/10
40.0.176.0/20
40.0.248.0/21
40.72.0.0/15
40.125.128.0/17
40.126.64.0/18
40.198.10.0/24
40.198.16.0/21
40.198.24.0/23
40.251.225.0/24
40.251.227.0/24
42.4.0.0/14
42.48.0.0/15
42.51.0.0/16
42.52.0.0/14
42.56.0.0/14
42.62.0.0/17
42.63.0.0/16
42.80.0.0/15
42.83.128.0/23
42.83.133.0/24
42.83.134.0/24
42.83.144.0/22
42.83.189.0/24
42.83.190.0/24
42.83.200.0/23
42.83.255.0/24
42.84.0.0/14
42.88.0.0/13
42.96.128.0/17
42.97.0.0/16
42.99.0.0/18
42.100.0.0/14
42.120.0.0/15
42.122.0.0/16
42.123.64.0/18
42.156.128.0/17
42.157.128.0/21
42.157.160.0/19
42.157.192.0/21
42.158.0.0/15
42.176.0.0/13
42.184.0.0/15
42.186.0.0/16
42.187.120.0/22
42.187.128.0/17
42.192.0.0/15
42.194.12.0/24
42.194.128.0/17
42.201.32.0/19
42.201.64.0/22
42.201.68.0/23
42.201.70.0/24
42.202.0.0/15
42.224.0.0/12
42.240.0.0/21
42.240.8.0/22
42.240.12.0/24
42.240.16.0/24
42.240.128.0/17
42.242.0.0/15
42.244.0.0/14
42.248.0.0/15
43.136.0.0/13
43.144.0.0/15
43.192.0.0/16
43.193.0.0/18
43.196.0.0/16
43.224.12.0/22
43.224.24.0/22
43.224.52.0/23
43.224.56.0/22
43.224.80.0/22
43.224.208.0/22
43.225.84.0/23
43.225.180.0/22
43.225.208.0/22
43.225.216.0/22
43.226.32.0/20
43.226.49.0/24
43.226.50.0/23
43.226.53.0/24
43.226.54.0/24
43.226.64.0/21
43.226.72.0/22
43.226.76.0/23
43.226.116.0/22
43.226.120.0/22
43.226.144.0/20
43.226.160.0/21
43.226.236.0/22
43.227.64.0/22
43.227.68.0/24
43.227.104.0/22
43.227.140.0/22
43.227.152.0/21
43.227.160.0/20
43.227.176.0/21
43.227.192.0/19
43.227.252.0/22
43.228.0.0/19
43.228.36.0/22
43.228.40.0/21
43.228.48.0/20
43.228.64.0/21
43.228.76.0/22
43.228.116.0/22
43.228.204.0/22
43.228.240.0/22
43.229.48.0/23
43.229.51.0/24
43.229.185.0/24
43.229.186.0/23
43.229.216.0/22
43.230.220.0/22
43.230.224.0/23
43.231.32.0/20
43.231.80.0/20
43.231.96.0/20
43.231.144.0/20
43.231.160.0/21
43.231.168.0/22
43.231.172.0/23
43.231.174.0/24
43.239.120.0/22
43.240.0.0/22
43.240.56.0/22
43.240.72.0/22
43.240.124.0/22
43.240.128.0/22
43.240.136.0/22
43.240.156.0/22
43.240.192.0/21
43.240.200.0/23
43.240.204.0/22
43.240.220.0/22
43.241.16.0/22
43.241.48.0/22
43.241.76.0/22
43.241.180.0/22
43.241.208.0/20
43.241.224.0/20
43.242.64.0/22
43.242.72.0/22
43.242.84.0/22
43.242.96.0/22
43.242.152.0/21
43.242.164.0/22
43.242.180.0/22
43.242.192.0/21
43.242.204.0/22
43.242.252.0/22
43.243.4.0/22
43.243.12.0/22
43.243.16.0/22
43.243.88.0/22
43.243.128.0/22
43.243.136.0/22
43.243.148.0/22
43.243.156.0/22
43.243.228.0/22
43.243.232.0/22
43.243.244.0/22
43.246.228.0/23
43.247.4.0/24
43.247.68.0/22
43.247.88.0/22
43.247.100.0/22
43.247.176.0/20
43.247.196.0/22
43.247.240.0/21
43.247.248.0/22
43.248.48.0/22
43.248.76.0/22
43.248.96.0/21
43.248.108.0/22
43.248.112.0/21
43.248.128.0/20
43.248.184.0/21
43.248.192.0/20
43.248.244.0/22
43.249.136.0/22
43.249.144.0/22
43.249.192.0/22
43.249.236.0/22
43.250.4.0/22
43.250.32.0/22
43.250.112.0/22
43.250.144.0/22
43.250.168.0/22
43.250.200.0/22
43.250.236.0/22
43.250.244.0/22
43.251.4.0/22
43.251.36.0/22
43.251.244.0/22
43.252.48.0/24
43.254.0.0/22
43.254.8.0/22
43.254.24.0/22
43.254.44.0/22
43.254.52.0/22
43.254.88.0/22
43.254.100.0/22
43.254.104.0/23
43.254.106.0/24
43.254.116.0/22
43.254.128.0/22
43.254.136.0/22
43.254.140.0/23
43.254.144.0/20
43.254.192.0/22
43.254.200.0/22
43.254.220.0/22
43.254.224.0/22
43.254.232.0/21
43.255.4.0/22
43.255.68.0/22
43.255.84.0/22
43.255.96.0/22
43.255.212.0/22
43.255.224.0/21
45.40.192.0/18
45.65.20.0/22
45.65.24.0/22
45.113.20.0/22
45.113.24.0/22
45.113.40.0/22
45.113.200.0/22
45.113.240.0/23
45.113.252.0/22
45.115.44.0/22
45.115.144.0/22
45.115.164.0/22
45.115.200.0/22
45.116.32.0/22
45.116.52.0/22
45.116.100.0/22
45.116.140.0/22
45.116.152.0/22
45.116.208.0/22
45.117.8.0/22
45.119.60.0/22
45.119.64.0/24
45.119.68.0/22
45.119.104.0/22
45.119.116.0/22
45.120.100.0/22
45.120.164.0/22
45.120.243.0/24
45.121.52.0/24
45.121.55.0/24
45.123.128.0/22
45.123.168.0/21
45.123.176.0/21
45.124.20.0/22
45.124.68.0/22
45.124.76.0/22
45.124.80.0/22
45.124.124.0/22
45.125.44.0/22
45.125.56.0/22
45.126.112.0/22
45.126.120.0/22
45.127.128.0/22
45.127.144.0/21
45.248.8.0/22
45.248.108.0/22
45.249.212.0/22
45.250.32.0/21
45.250.40.0/22
45.250.180.0/23
45.250.188.0/24
45.251.20.0/22
45.251.88.0/21
45.251.96.0/21
45.252.0.0/22
45.252.104.0/22
45.253.24.0/22
45.253.32.0/24
45.253.64.0/22
45.253.96.0/20
45.253.112.0/21
45.253.132.0/22
45.253.136.0/21
45.253.144.0/20
45.253.160.0/19
45.253.192.0/19
45.253.224.0/20
45.253.240.0/22
45.254.20.0/22
45.254.48.0/23
45.254.50.0/24
45.254.64.0/20
47.92.0.0/14
47.96.0.0/12
47.112.0.0/13
47.120.0.0/15
47.122.0.0/17
47.122.128.0/18
47.122.192.0/19
47.123.0.0/16
49.4.0.0/18
49.4.64.0/19
49.4.96.0/21
49.4.104.0/22
49.4.108.0/23
49.4.110.0/24
49.4.112.0/20
49.5.0.0/17
49.7.0.0/16
49.52.0.0/14
49.64.0.0/11
49.112.0.0/13
49.120.0.0/14
49.140.0.0/15
49.208.0.0/15
49.221.26.0/23
49.221.64.0/19
49.221.128.0/19
49.232.0.0/14
49.239.192.0/18
52.80.0.0/15
52.82.0.0/17
52.82.128.0/23
52.82.131.0/24
52.82.132.0/24
52.82.134.0/23
52.82.136.0/24
52.82.144.0/23
52.82.148.0/22
52.82.160.0/21
52.82.168.0/24
52.82.170.0/23
52.82.172.0/22
52.82.176.0/21
52.82.187.0/24
52.82.188.0/23
52.82.190.0/24
52.82.192.0/18
52.83.0.0/16
52.130.0.0/15
54.222.0.0/19
54.222.32.0/21
54.222.45.0/24
54.222.48.0/21
54.222.57.0/24
54.222.59.0/24
54.222.60.0/22
54.222.70.0/23
54.222.72.0/21
54.222.80.0/21
54.222.88.0/22
54.222.96.0/23
54.222.112.0/22
54.222.116.0/23
54.222.128.0/17
54.223.0.0/16
58.16.0.0/13
58.24.0.0/15
58.30.0.0/15
58.32.0.0/11
58.66.192.0/18
58.67.128.0/17
58.68.234.0/24
58.68.236.0/24
58.68.247.0/24
58.82.0.0/17
58.83.0.0/16
58.87.64.0/18
58.99.128.0/17
58.100.0.0/15
58.116.0.0/14
58.128.0.0/13
58.144.0.0/16
58.154.0.0/15
58.192.0.0/11
58.240.0.0/12
59.32.0.0/13
59.40.0.0/15
59.42.0.0/16
59.44.0.0/14
59.48.0.0/12
59.64.0.0/12
59.80.0.0/17
59.81.8.0/23
59.81.12.0/23
59.81.20.0/23
59.81.24.0/23
59.81.36.0/23
59.81.40.0/23
59.81.46.0/24
59.81.64.0/23
59.81.68.0/23
59.81.72.0/23
59.81.82.0/23
59.81.86.0/23
59.81.92.0/22
59.81.98.0/23
59.81.102.0/23
59.81.104.0/22
59.82.0.0/18
59.82.64.0/19
59.82.96.0/22
59.82.104.0/21
59.82.112.0/20
59.82.128.0/21
59.83.192.0/19
59.83.224.0/21
59.83.232.0/22
59.107.0.0/17
59.108.0.0/14
59.151.0.0/17
59.152.36.0/24
59.152.38.0/23
59.153.4.0/22
59.153.32.0/22
59.153.92.0/22
59.153.168.0/23
59.172.0.0/14
59.191.0.0/17
60.0.0.0/11
60.63.0.0/16
60.160.0.0/11
60.194.0.0/15
60.204.0.0/14
60.208.0.0/12
60.232.128.0/17
60.235.0.0/16
60.245.128.0/17
60.247.0.0/16
60.252.0.0/16
60.253.128.0/17
60.255.0.0/16
61.4.176.0/20
61.28.20.0/24
61.28.22.0/24
61.28.49.0/24
61.28.108.0/24
61.28.112.0/20
61.29.128.0/18
61.47.128.0/18
61.48.0.0/13
61.87.192.0/18
61.128.0.0/10
61.232.0.0/14
61.236.0.0/15
61.240.0.0/16
61.241.0.0/17
61.241.128.0/18
61.241.192.0/19
61.242.0.0/15
62.234.0.0/16
63.140.0.0/24
64.188.38.0/23
64.188.40.0/22
64.188.44.0/23
66.102.240.0/21
66.102.248.0/22
66.102.255.0/24
68.79.0.0/18
69.230.192.0/18
69.231.128.0/18
69.234.192.0/18
69.235.128.0/18
71.131.192.0/18
71.132.0.0/18
71.136.64.0/18
71.137.0.0/18
72.163.240.0/23
72.163.248.0/22
81.68.0.0/14
81.173.18.0/23
81.173.20.0/22
82.156.0.0/15
87.254.207.0/24
93.183.14.0/24
93.183.18.0/24
94.191.0.0/17
98.126.78.0/24
101.1.0.0/22
101.2.172.0/22
101.4.0.0/14
101.16.0.0/12
101.33.128.0/17
101.34.0.0/15
101.36.0.0/18
101.36.64.0/20
101.36.128.0/17
101.37.0.0/16
101.38.0.0/15
101.40.0.0/14
101.49.206.0/23
101.50.8.0/21
101.50.56.0/22
101.52.4.0/24
101.52.6.0/24
101.52.112.0/21
101.52.124.0/22
101.52.128.0/20
101.52.212.0/22
101.52.216.0/21
101.52.236.0/22
101.52.240.0/20
101.53.100.0/22
101.64.0.0/13
101.72.0.0/14
101.76.0.0/15
101.78.0.0/22
101.80.0.0/12
101.96.10.0/23
101.96.128.0/19
101.104.144.0/20
101.104.160.0/20
101.106.0.0/19
101.124.0.0/16
101.125.0.0/22
101.125.4.0/23
101.125.6.0/24
101.125.130.0/24
101.125.250.0/23
101.125.252.0/22
101.126.0.0/18
101.126.64.0/19
101.126.96.0/20
101.126.172.0/22
101.126.176.0/20
101.126.192.0/19
101.126.228.0/22
101.126.232.0/21
101.126.240.0/20
101.128.0.0/22
101.129.0.0/16
101.132.0.0/15
101.144.0.0/12
101.198.0.0/22
101.198.196.0/22
101.199.48.0/20
101.199.97.0/24
101.199.112.0/23
101.199.114.0/24
101.199.125.0/24
101.199.128.0/23
101.199.196.0/22
101.199.252.0/22
101.200.0.0/15
101.203.172.0/22
101.204.0.0/14
101.224.0.0/13
101.234.76.0/22
101.236.0.0/16
101.237.0.0/19
101.237.33.0/24
101.237.34.0/23
101.237.36.0/22
101.237.40.0/24
101.240.0.0/14
101.246.172.0/22
101.246.176.0/20
101.248.0.0/15
101.251.0.0/22
101.251.80.0/20
101.251.128.0/19
101.251.160.0/21
101.251.192.0/18
101.252.0.0/15
101.254.0.0/20
101.254.32.0/19
101.254.64.0/18
101.254.128.0/17
103.1.10.0/23
103.1.168.0/22
103.2.108.0/22
103.2.208.0/22
103.3.96.0/22
103.3.112.0/20
103.3.128.0/22
103.3.136.0/21
103.3.152.0/21
103.4.56.0/22
103.5.168.0/22
103.5.192.0/22
103.6.220.0/22
103.7.140.0/22
103.7.212.0/22
103.8.33.0/24
103.8.34.0/23
103.8.52.0/22
103.8.68.0/22
103.8.204.0/22
103.8.220.0/22
103.9.8.0/22
103.9.248.0/21
103.10.2.0/23
103.10.84.0/22
103.12.184.0/22
103.12.232.0/22
103.13.12.0/23
103.13.244.0/22
103.14.132.0/23
103.14.136.0/22
103.15.4.0/22
103.15.96.0/22
103.16.124.0/22
103.17.40.0/22
103.18.186.0/23
103.18.224.0/22
103.19.46.0/23
103.19.64.0/22
103.19.232.0/22
103.20.32.0/24
103.20.34.0/23
103.20.112.0/22
103.20.128.0/22
103.20.248.0/22
103.21.116.0/22
103.21.140.0/22
103.21.176.0/22
103.22.188.0/22
103.22.252.0/22
103.23.8.0/22
103.23.160.0/22
103.24.116.0/22
103.24.176.0/22
103.24.228.0/22
103.25.20.0/22
103.25.24.0/22
103.25.36.0/22
103.25.64.0/23
103.25.148.0/23
103.25.156.0/24
103.26.0.0/22
103.26.64.0/22
103.26.76.0/22
103.27.4.0/22
103.27.24.0/22
103.27.240.0/22
103.28.8.0/24
103.28.204.0/22
103.28.212.0/22
103.29.16.0/22
103.29.29.0/24
103.29.136.0/22
103.30.106.0/23
103.30.148.0/24
103.30.151.0/24
103.31.48.0/22
103.31.72.0/24
103.31.200.0/22
103.35.104.0/22
103.35.220.0/23
103.35.254.0/24
103.36.28.0/22
103.36.36.0/22
103.36.60.0/22
103.36.96.0/22
103.36.132.0/22
103.36.136.0/22
103.36.164.0/22
103.36.168.0/23
103.36.172.0/22
103.36.192.0/20
103.36.208.0/22
103.36.220.0/22
103.37.12.0/22
103.37.16.0/22
103.37.44.0/22
103.37.72.0/22
103.37.136.0/21
103.37.144.0/20
103.37.160.0/21
103.38.40.0/22
103.38.76.0/22
103.38.84.0/22
103.38.92.0/23
103.38.116.0/22
103.38.224.0/22
103.38.232.0/22
103.38.252.0/23
103.39.204.0/22
103.39.208.0/20
103.39.224.0/21
103.39.232.0/22
103.40.12.0/22
103.40.192.0/22
103.40.232.0/22
103.40.240.0/20
103.41.0.0/23
103.41.3.0/24
103.41.116.0/22
103.41.164.0/22
103.41.232.0/23
103.42.76.0/22
103.43.133.0/24
103.43.184.0/22
103.44.58.0/23
103.44.80.0/22
103.44.144.0/22
103.44.168.0/22
103.44.176.0/22
103.44.236.0/22
103.44.240.0/20
103.45.72.0/21
103.45.97.0/24
103.45.98.0/23
103.45.100.0/22
103.45.104.0/21
103.45.112.0/20
103.45.128.0/19
103.45.160.0/22
103.45.172.0/22
103.45.176.0/20
103.45.248.0/22
103.46.12.0/22
103.46.16.0/20
103.46.32.0/19
103.46.64.0/18
103.46.128.0/21
103.46.136.0/22
103.46.168.0/22
103.47.48.0/22
103.47.80.0/22
103.48.232.0/23
103.49.12.0/22
103.49.180.0/22
103.50.36.0/22
103.52.104.0/23
103.52.172.0/22
103.52.176.0/22
103.52.196.0/22
103.53.124.0/22
103.53.204.0/22
103.53.208.0/22
103.55.172.0/22
103.55.228.0/22
103.56.32.0/22
103.56.60.0/22
103.56.76.0/22
103.56.100.0/22
103.56.104.0/22
103.56.152.0/22
103.56.184.0/22
103.57.12.0/22
103.57.139.0/24
103.59.112.0/22
103.59.118.0/23
103.59.124.0/22
103.59.148.0/22
103.59.164.0/22
103.60.32.0/22
103.60.164.0/22
103.60.228.0/23
103.61.60.0/22
103.61.104.0/23
103.61.143.0/24
103.61.153.0/24
103.61.154.0/23
103.61.188.0/23
103.61.190.0/24
103.63.160.0/20
103.63.176.0/21
103.63.244.0/22
103.64.156.0/22
103.64.212.0/22
103.65.8.0/22
103.66.32.0/22
103.68.128.0/22
103.69.16.0/22
103.71.68.0/22
103.71.120.0/21
103.71.128.0/22
103.71.196.0/22
103.71.200.0/22
103.71.232.0/22
103.72.12.0/22
103.72.16.0/20
103.72.32.0/20
103.72.48.0/21
103.72.112.0/23
103.72.128.0/21
103.72.172.0/24
103.73.48.0/24
103.73.116.0/22
103.73.136.0/21
103.73.204.0/22
103.74.24.0/21
103.74.32.0/20
103.74.48.0/22
103.74.125.0/24
103.75.104.0/22
103.75.152.0/22
103.76.60.0/22
103.76.220.0/22
103.76.224.0/22
103.77.28.0/22
103.77.132.0/22
103.78.64.0/22
103.78.126.0/23
103.78.228.0/22
103.79.24.0/22
103.79.200.0/22
103.81.4.0/22
103.81.48.0/22
103.81.123.0/24
103.81.200.0/22
103.82.224.0/22
103.83.44.0/22
103.83.72.0/22
103.84.170.0/23
103.85.84.0/22
103.85.164.0/22
103.85.168.0/21
103.85.176.0/22
103.87.132.0/22
103.87.180.0/22
103.88.32.0/21
103.88.64.0/22
103.89.184.0/21
103.89.192.0/19
103.89.224.0/21
103.90.92.0/22
103.90.152.0/22
103.90.173.0/24
103.90.176.0/22
103.90.188.0/22
103.91.176.0/22
103.91.208.0/22
103.93.180.0/22
103.94.12.0/22
103.94.20.0/23
103.95.68.0/22
103.95.220.0/23
103.95.222.0/24
103.95.252.0/22
103.96.8.0/22
103.96.214.0/23
103.96.224.0/23
103.97.60.0/24
103.97.112.0/24
103.98.0.0/24
103.98.44.0/22
103.98.125.0/24
103.98.127.0/24
103.98.168.0/22
103.98.220.0/22
103.98.248.0/23
103.98.252.0/22
103.99.152.0/22
103.100.64.0/22
103.101.124.0/23
103.101.180.0/22
103.102.192.0/22
103.102.196.0/24
103.102.200.0/22
103.103.12.0/24
103.103.36.0/24
103.103.200.0/22
103.105.12.0/22
103.107.188.0/22
103.107.216.0/22
103.108.244.0/24
103.108.247.0/24
103.110.92.0/22
103.110.132.0/22
103.110.156.0/22
103.111.64.0/24
103.113.4.0/22
103.114.100.0/22
103.114.156.0/23
103.114.159.0/24
103.114.212.0/23
103.114.236.0/22
103.115.120.0/24
103.115.248.0/22
103.116.76.0/22
103.116.92.0/22
103.116.120.0/23
103.116.123.0/24
103.117.16.0/22
103.118.52.0/22
103.118.60.0/22
103.118.173.0/24
103.120.72.0/22
103.120.224.0/22
103.121.52.0/22
103.121.164.0/23
103.121.166.0/24
103.121.252.0/22
103.123.4.0/23
103.126.1.0/24
103.126.124.0/22
103.131.152.0/22
103.131.168.0/22
103.132.212.0/23
103.135.160.0/22
103.135.192.0/23
103.135.194.0/24
103.135.196.0/22
103.137.60.0/24
103.139.92.0/23
103.139.212.0/23
103.140.14.0/23
103.141.10.0/23
103.142.96.0/23
103.142.154.0/23
103.142.234.0/23
103.143.16.0/22
103.144.66.0/23
103.144.70.0/24
103.144.158.0/23
103.145.42.0/23
103.146.8.0/23
103.147.124.0/24
103.149.242.0/24
103.149.244.0/22
103.150.10.0/23
103.150.24.0/23
103.150.164.0/23
103.151.142.0/23
103.151.148.0/23
103.152.28.0/23
103.152.56.0/23
103.152.76.0/23
103.152.186.0/23
103.154.30.0/23
103.154.41.0/24
103.154.162.0/23
103.155.76.0/23
103.156.68.0/23
103.156.174.0/23
103.156.186.0/23
103.158.0.0/23
103.159.122.0/23
103.159.124.0/23
103.161.220.0/23
103.161.254.0/23
103.162.10.0/23
103.163.46.0/23
103.163.180.0/24
103.164.32.0/23
103.165.110.0/23
103.169.62.0/23
103.170.4.0/23
103.170.212.0/23
103.174.94.0/23
103.179.78.0/23
103.181.234.0/24
103.183.66.0/23
103.184.46.0/23
103.186.4.0/23
103.186.108.0/23
103.189.92.0/23
103.189.154.0/23
103.190.122.0/23
103.191.102.0/24
103.191.242.0/23
103.192.0.0/23
103.192.4.0/23
103.192.8.0/21
103.192.16.0/20
103.192.132.0/22
103.192.188.0/22
103.192.208.0/21
103.192.252.0/22
103.193.188.0/22
103.193.192.0/22
103.196.64.0/22
103.196.88.0/21
103.197.0.0/22
103.197.228.0/22
103.198.64.0/22
103.198.124.0/22
103.200.136.0/21
103.200.144.0/21
103.202.0.0/19
103.202.32.0/20
103.202.92.0/22
103.202.96.0/20
103.202.112.0/22
103.202.120.0/21
103.202.128.0/20
103.202.144.0/22
103.203.140.0/23
103.203.216.0/22
103.204.72.0/22
103.205.4.0/22
103.205.40.0/23
103.205.136.0/24
103.205.139.0/24
103.205.188.0/22
103.205.192.0/22
103.205.252.0/22
103.207.228.0/22
103.208.12.0/22
103.208.48.0/22
103.209.112.0/22
103.209.136.0/22
103.210.160.0/22
103.210.169.0/24
103.210.170.0/23
103.211.44.0/22
103.211.220.0/22
103.212.0.0/21
103.212.12.0/22
103.212.48.0/23
103.213.96.0/22
103.213.132.0/22
103.214.48.0/22
103.215.36.0/22
103.215.44.0/23
103.215.140.0/22
103.216.4.0/22
103.216.152.0/22
103.216.252.0/22
103.218.216.0/22
103.219.28.0/22
103.219.32.0/21
103.219.64.0/23
103.219.84.0/22
103.219.184.0/22
103.220.52.0/22
103.220.56.0/21
103.220.64.0/22
103.220.124.0/22
103.220.128.0/19
103.220.160.0/21
103.220.240.0/22
103.221.140.0/22
103.222.33.0/24
103.222.40.0/22
103.222.176.0/21
103.223.132.0/22
103.224.220.0/22
103.224.228.0/23
103.224.232.0/22
103.227.76.0/22
103.227.80.0/22
103.227.120.0/22
103.227.136.0/22
103.227.228.0/22
103.228.136.0/22
103.228.160.0/22
103.228.204.0/23
103.228.208.0/22
103.228.228.0/22
103.229.148.0/22
103.229.212.0/22
103.230.110.0/23
103.230.212.0/22
103.230.236.0/22
103.231.16.0/24
103.231.64.0/21
103.231.144.0/23
103.231.146.0/24
103.232.144.0/22
103.232.166.0/23
103.233.4.0/22
103.233.52.0/22
103.233.128.0/22
103.233.136.0/23
103.233.138.0/24
103.234.20.0/22
103.234.56.0/22
103.234.128.0/23
103.235.85.0/24
103.235.136.0/22
103.235.144.0/24
103.235.200.0/22
103.235.220.0/22
103.235.224.0/20
103.235.244.0/22
103.235.248.0/21
103.236.120.0/22
103.236.240.0/21
103.236.252.0/22
103.237.8.0/22
103.237.28.0/23
103.237.248.0/21
103.238.0.0/21
103.238.16.0/22
103.238.52.0/22
103.238.96.0/23
103.238.98.0/24
103.238.132.0/22
103.238.144.0/22
103.238.160.0/22
103.238.184.0/23
103.238.188.0/22
103.238.204.0/22
103.238.252.0/22
103.239.68.0/22
103.239.152.0/22
103.239.204.0/22
103.239.244.0/22
103.240.16.0/22
103.240.36.0/22
103.240.84.0/22
103.240.124.0/22
103.240.244.0/22
103.241.95.0/24
103.242.168.0/23
103.242.170.0/24
103.242.172.0/22
103.242.200.0/24
103.242.202.0/24
103.242.212.0/22
103.243.136.0/22
103.243.252.0/22
103.244.26.0/23
103.244.59.0/24
103.244.64.0/22
103.244.80.0/22
103.244.164.0/22
103.244.232.0/22
103.245.128.0/22
103.246.8.0/22
103.246.152.0/22
103.247.168.0/22
103.247.176.0/22
103.247.212.0/23
103.248.102.0/23
103.248.152.0/22
103.249.12.0/22
103.249.52.0/22
103.249.136.0/24
103.249.192.0/22
103.249.244.0/22
103.249.252.0/22
103.250.32.0/22
103.250.192.0/22
103.250.216.0/22
103.250.248.0/22
103.251.32.0/22
103.251.84.0/22
103.251.96.0/22
103.251.124.0/22
103.251.160.0/22
103.251.204.0/22
103.251.240.0/22
103.252.36.0/22
103.252.172.0/22
103.252.248.0/22
103.253.60.0/22
103.253.204.0/22
103.253.224.0/22
103.253.232.0/22
103.254.68.0/22
103.254.76.0/22
103.254.112.0/22
103.254.188.0/22
103.255.68.0/22
103.255.88.0/21
103.255.140.0/22
103.255.200.0/22
106.0.4.0/22
106.2.16.0/20
106.2.32.0/19
106.2.64.0/18
106.2.128.0/19
106.2.224.0/24
106.2.232.0/21
106.3.16.0/20
106.3.32.0/20
106.3.96.0/22
106.3.128.0/19
106.3.192.0/20
106.3.208.0/21
106.3.224.0/21
106.4.0.0/14
106.8.0.0/15
106.11.0.0/16
106.12.0.0/17
106.12.128.0/18
106.12.192.0/19
106.12.224.0/20
106.12.240.0/21
106.12.250.0/23
106.12.252.0/23
106.12.254.0/24
106.13.0.0/16
106.14.0.0/15
106.16.0.0/14
106.32.0.0/12
106.48.0.0/21
106.48.16.0/21
106.52.0.0/14
106.56.0.0/14
106.60.0.0/15
106.62.0.0/16
106.63.0.0/17
106.74.0.0/16
106.75.0.0/17
106.75.128.0/18
106.75.208.0/20
106.75.224.0/19
106.80.0.0/13
106.88.0.0/14
106.92.0.0/16
106.108.0.0/14
106.112.0.0/13
106.120.0.0/18
106.120.96.0/19
106.120.128.0/17
106.121.0.0/16
106.122.0.0/15
106.124.0.0/14
106.224.0.0/14
106.228.0.0/15
106.230.0.0/16
109.244.0.0/16
110.6.0.0/15
110.16.0.0/14
110.40.0.0/24
110.40.2.0/24
110.40.9.0/24
110.40.10.0/23
110.40.12.0/22
110.40.16.0/24
110.40.128.0/17
110.41.0.0/16
110.42.0.0/18
110.42.64.0/19
110.42.96.0/20
110.42.128.0/17
110.43.0.0/16
110.44.12.0/22
110.51.0.0/16
110.52.0.0/15
110.56.0.0/13
110.64.0.0/15
110.72.0.0/15
110.75.0.0/16
110.76.0.0/18
110.76.156.0/22
110.76.184.0/22
110.80.0.0/13
110.88.0.0/14
110.96.0.0/14
110.100.0.0/15
110.105.0.0/16
110.106.0.0/15
110.115.128.0/17
110.116.0.0/16
110.118.0.0/16
110.120.0.0/14
110.124.0.0/15
110.126.0.0/16
110.152.0.0/14
110.156.0.0/15
110.166.0.0/15
110.172.211.0/24
110.172.213.0/24
110.172.217.0/24
110.172.221.0/24
110.173.32.0/20
110.173.192.0/19
110.176.0.0/12
110.192.0.0/11
110.228.0.0/14
110.232.32.0/19
110.236.0.0/15
110.240.0.0/12
111.0.0.0/10
111.67.192.0/20
111.72.0.0/13
111.85.0.0/16
111.112.0.0/14
111.116.0.0/15
111.118.200.0/21
111.120.0.0/14
111.124.0.0/16
111.126.0.0/15
111.128.0.0/16
111.132.0.0/16
111.142.0.0/15
111.144.0.0/14
111.148.0.0/16
111.152.0.0/13
111.160.0.0/13
111.170.0.0/16
111.172.0.0/14
111.176.0.0/13
111.186.0.0/15
111.192.0.0/12
111.208.121.0/24
111.212.0.0/14
111.221.28.0/24
111.221.128.0/17
111.222.0.0/16
111.223.8.0/21
111.224.0.0/14
111.229.0.0/16
111.230.0.0/15
111.235.156.0/22
111.235.160.0/22
111.235.164.0/23
111.235.170.0/23
111.235.172.0/23
111.235.174.0/24
111.235.178.0/24
111.235.180.0/23
111.235.182.0/24
112.0.0.0/10
112.64.0.0/14
112.73.64.0/18
112.74.0.0/16
112.80.0.0/12
112.96.0.0/13
112.109.128.0/17
112.111.0.0/16
112.112.0.0/14
112.116.0.0/15
112.122.0.0/15
112.124.0.0/14
112.132.0.0/16
112.192.0.0/14
112.224.0.0/11
113.0.0.0/13
113.8.0.0/15
113.12.0.0/14
113.16.0.0/15
113.18.0.0/16
113.21.232.0/23
113.21.234.0/24
113.21.236.0/22
113.24.0.0/14
113.31.29.0/24
113.31.31.0/24
113.31.88.0/23
113.31.96.0/19
113.31.144.0/20
113.31.160.0/19
113.48.48.0/20
113.50.0.0/20
113.50.32.0/24
113.50.48.0/20
113.50.64.0/20
113.54.0.0/15
113.56.0.0/15
113.58.0.0/16
113.59.0.0/17
113.59.224.0/22
113.62.0.0/15
113.64.0.0/10
113.128.0.0/15
113.130.96.0/20
113.130.112.0/21
113.132.0.0/14
113.136.0.0/13
113.194.0.0/15
113.197.104.0/23
113.200.0.0/15
113.204.0.0/14
113.208.112.0/21
113.209.0.0/16
113.213.0.0/18
113.213.64.0/19
113.213.96.0/20
113.214.0.0/15
113.218.0.0/15
113.220.0.0/14
113.224.0.0/12
113.240.0.0/13
113.248.0.0/14
114.28.68.0/22
114.28.72.0/21
114.28.128.0/18
114.28.248.0/21
114.55.0.0/16
114.60.0.0/14
114.64.0.0/16
114.66.0.0/18
114.66.64.0/23
114.66.80.0/23
114.66.236.0/22
114.66.240.0/20
114.67.16.0/21
114.67.48.0/24
114.67.57.0/24
114.67.58.0/24
114.67.60.0/23
114.67.62.0/24
114.67.64.0/18
114.67.128.0/17
114.80.0.0/13
114.88.0.0/14
114.92.0.0/15
114.95.0.0/16
114.96.0.0/13
114.104.0.0/14
114.110.96.0/22
114.111.0.0/23
114.111.16.0/20
114.112.32.0/19
114.112.64.0/19
114.112.96.0/21
114.112.104.0/22
114.112.124.0/23
114.112.136.0/21
114.112.144.0/20
114.112.160.0/20
114.112.200.0/21
114.112.208.0/20
114.113.16.0/20
114.113.32.0/19
114.113.64.0/18
114.113.144.0/20
114.113.196.0/22
114.113.200.0/22
114.113.221.0/24
114.113.223.0/24
114.113.224.0/20
114.114.112.0/21
114.115.0.0/16
114.116.0.0/15
114.118.0.0/17
114.119.41.0/24
114.119.116.0/23
114.119.119.0/24
114.132.0.0/16
114.135.0.0/16
114.138.0.0/15
114.141.128.0/18
114.196.0.0/15
114.212.0.0/14
114.216.0.0/13
114.224.0.0/11
115.24.0.0/14
115.28.0.0/15
115.31.64.0/22
115.44.0.0/14
115.48.0.0/12
115.84.0.0/18
115.85.192.0/18
115.124.16.0/20
115.148.0.0/14
115.152.0.0/13
115.168.0.0/14
115.173.0.0/19
115.174.64.0/19
115.182.0.0/15
115.192.0.0/11
115.224.0.0/12
116.1.0.0/16
116.2.0.0/15
116.4.0.0/14
116.8.0.0/14
116.13.0.0/16
116.16.0.0/12
116.52.0.0/14
116.56.0.0/15
116.62.0.0/15
116.66.36.0/24
116.66.48.0/21
116.66.98.0/24
116.68.136.0/21
116.68.176.0/21
116.70.64.0/18
116.76.0.0/15
116.78.0.0/16
116.85.0.0/20
116.85.17.0/24
116.85.18.0/23
116.85.20.0/22
116.85.24.0/21
116.85.32.0/19
116.85.64.0/20
116.85.240.0/20
116.90.80.0/20
116.95.0.0/16
116.112.0.0/14
116.116.0.0/15
116.128.0.0/17
116.128.128.0/18
116.128.200.0/21
116.128.208.0/20
116.128.224.0/19
116.129.0.0/16
116.130.0.0/15
116.132.0.0/15
116.135.0.0/16
116.136.0.0/13
116.147.0.0/16
116.148.0.0/15
116.153.0.0/16
116.154.0.0/15
116.162.0.0/16
116.163.0.0/18
116.167.0.0/16
116.168.0.0/15
116.171.0.0/16
116.172.64.0/18
116.172.128.0/17
116.174.0.0/15
116.176.0.0/14
116.181.0.0/16
116.182.0.0/16
116.193.16.0/23
116.193.18.0/24
116.196.64.0/18
116.196.144.0/24
116.196.148.0/24
116.196.192.0/21
116.196.218.0/23
116.196.220.0/22
116.197.160.0/21
116.198.0.0/18
116.198.64.0/21
116.198.72.0/22
116.198.144.0/20
116.198.160.0/20
116.198.176.0/21
116.198.192.0/18
116.199.0.0/17
116.204.0.0/17
116.205.0.0/18
116.205.128.0/17
116.207.0.0/16
116.208.0.0/14
116.213.64.0/18
116.213.128.0/17
116.214.32.0/19
116.214.128.0/22
116.214.132.0/23
116.214.134.0/24
116.224.0.0/12
116.242.0.0/16
116.246.0.0/15
116.248.0.0/15
116.252.0.0/15
116.254.104.0/21
116.255.128.0/17
117.8.0.0/13
117.21.0.0/16
117.22.0.0/15
117.24.0.0/13
117.32.0.0/13
117.40.0.0/14
117.44.0.0/15
117.48.0.0/18
117.48.64.0/19
117.48.96.0/23
117.48.100.0/22
117.48.104.0/21
117.48.112.0/20
117.48.128.0/19
117.48.160.0/20
117.48.192.0/20
117.48.216.0/21
117.48.224.0/20
117.50.0.0/16
117.51.128.0/19
117.51.160.0/23
117.51.168.0/22
117.57.0.0/16
117.59.0.0/19
117.59.32.0/22
117.59.36.0/23
117.59.38.0/24
117.59.40.0/21
117.59.48.0/20
117.59.64.0/18
117.59.128.0/17
117.60.0.0/14
117.64.0.0/13
117.72.0.0/23
117.72.8.0/21
117.72.16.0/23
117.72.32.0/20
117.72.248.0/22
117.72.255.0/24
117.73.0.0/20
117.73.16.0/21
117.73.252.0/22
117.74.64.0/20
117.74.128.0/21
117.74.136.0/22
117.78.0.0/18
117.79.80.0/20
117.79.128.0/21
117.79.144.0/20
117.79.224.0/20
117.79.241.0/24
117.79.242.0/24
117.80.0.0/12
117.100.128.0/17
117.106.0.0/15
117.112.0.0/13
117.121.0.0/17
117.121.128.0/18
117.122.128.0/17
117.124.0.0/14
117.128.0.0/10
118.24.0.0/15
118.26.64.0/21
118.26.72.0/22
118.26.96.0/21
118.26.116.0/22
118.26.128.0/22
118.26.136.0/22
118.26.160.0/20
118.26.192.0/24
118.26.194.0/23
118.26.197.0/24
118.26.198.0/23
118.26.200.0/21
118.26.208.0/20
118.26.224.0/19
118.30.0.0/15
118.64.0.0/22
118.64.252.0/22
118.72.0.0/13
118.80.0.0/15
118.84.0.0/15
118.88.32.0/19
118.88.64.0/18
118.88.128.0/17
118.89.0.0/16
118.102.16.0/20
118.103.164.0/22
118.112.0.0/13
118.120.0.0/14
118.124.0.0/15
118.126.1.0/24
118.126.2.0/23
118.126.4.0/23
118.126.8.0/23
118.126.10.0/24
118.126.12.0/22
118.126.16.0/23
118.126.18.0/24
118.126.32.0/19
118.126.64.0/18
118.126.128.0/17
118.132.0.0/14
118.144.0.0/16
118.145.0.0/19
118.145.32.0/20
118.145.128.0/19
118.145.160.0/21
118.178.0.0/16
118.180.0.0/14
118.184.128.0/17
118.186.0.0/19
118.186.32.0/24
118.186.34.0/23
118.186.36.0/22
118.186.56.0/21
118.186.64.0/21
118.186.80.0/20
118.186.96.0/20
118.186.112.0/21
118.186.160.0/19
118.186.208.0/21
118.186.240.0/21
118.187.0.0/16
118.188.18.0/23
118.188.20.0/22
118.188.24.0/23
118.190.0.0/16
118.191.0.0/21
118.191.8.0/22
118.191.12.0/24
118.191.192.0/23
118.191.248.0/21
118.192.0.0/17
118.193.96.0/19
118.194.32.0/19
118.194.128.0/21
118.194.240.0/21
118.195.0.0/16
118.199.0.0/16
118.202.0.0/15
118.212.0.0/15
118.215.192.0/19
118.228.0.0/15
118.230.0.0/16
118.239.0.0/16
118.242.0.0/22
118.242.16.0/22
118.242.24.0/22
118.242.32.0/22
118.242.40.0/24
118.242.236.0/22
118.244.0.0/21
118.244.128.0/17
118.247.0.0/16
118.248.0.0/13
119.0.0.0/15
119.2.128.0/24
119.3.0.0/16
119.4.0.0/14
119.10.112.0/21
119.15.136.0/23
119.15.140.0/23
119.18.192.0/20
119.18.208.0/21
119.23.0.0/16
119.27.64.0/18
119.27.160.0/19
119.28.28.0/24
119.29.0.0/16
119.32.0.0/15
119.34.0.0/16
119.36.0.0/16
119.37.0.0/23
119.37.2.0/24
119.37.12.0/24
119.37.192.0/21
119.38.0.0/21
119.38.128.0/18
119.38.192.0/19
119.39.0.0/16
119.40.0.0/19
119.40.32.0/21
119.40.128.0/17
119.41.0.0/16
119.42.0.0/19
119.42.136.0/21
119.42.224.0/19
119.44.0.0/22
119.44.4.0/23
119.44.7.0/24
119.44.9.0/24
119.44.10.0/23
119.44.12.0/24
119.44.16.0/22
119.44.20.0/23
119.44.23.0/24
119.44.24.0/23
119.44.45.0/24
119.44.46.0/24
119.44.56.0/21
119.44.192.0/24
119.44.200.0/24
119.44.205.0/24
119.44.217.0/24
119.44.218.0/24
119.44.220.0/22
119.44.224.0/24
119.44.254.0/23
119.45.0.0/16
119.48.0.0/13
119.57.0.0/16
119.59.128.0/18
119.60.0.0/15
119.62.0.0/16
119.75.208.0/20
119.78.0.0/15
119.80.0.0/21
119.80.32.0/20
119.80.48.0/21
119.80.160.0/19
119.80.192.0/21
119.80.200.0/23
119.80.202.0/24
119.80.240.0/22
119.80.248.0/21
119.84.0.0/14
119.88.128.0/17
119.90.32.0/19
119.91.0.0/16
119.96.0.0/13
119.108.0.0/15
119.112.0.0/12
119.128.0.0/12
119.144.0.0/14
119.148.160.0/20
119.161.120.0/22
119.161.168.0/22
119.161.180.0/23
119.161.182.0/24
119.162.0.0/15
119.164.0.0/14
119.176.0.0/12
119.233.128.0/17
119.235.128.0/24
119.235.130.0/24
119.235.136.0/24
119.235.138.0/24
119.235.143.0/24
119.235.144.0/24
119.235.146.0/24
119.235.151.0/24
119.235.160.0/23
119.235.162.0/24
119.235.164.0/24
119.235.167.0/24
119.235.184.0/22
119.248.0.0/14
119.253.0.0/20
119.253.32.0/19
119.253.64.0/19
119.253.128.0/17
119.254.0.0/16
119.255.0.0/18
119.255.128.0/17
120.0.0.0/12
120.24.0.0/14
120.31.0.0/16
120.32.0.0/12
120.48.0.0/16
120.49.0.0/18
120.52.0.0/15
120.55.0.0/16
120.65.0.0/16
120.68.0.0/14
120.72.32.0/19
120.72.160.0/24
120.72.162.0/23
120.72.164.0/22
120.72.168.0/24
120.72.170.0/23
120.72.172.0/23
120.72.174.0/24
120.72.177.0/24
120.72.178.0/24
120.72.180.0/24
120.72.182.0/23
120.72.184.0/22
120.72.188.0/23
120.72.190.0/24
120.76.0.0/14
120.80.0.0/13
120.92.0.0/17
120.92.128.0/18
120.92.192.0/19
120.92.224.0/20
120.94.0.0/15
120.128.0.0/21
120.131.0.0/20
120.131.64.0/19
120.131.124.0/22
120.132.0.0/18
120.132.64.0/19
120.132.96.0/20
120.132.112.0/24
120.132.116.0/22
120.132.120.0/21
120.132.128.0/17
120.133.0.0/16
120.134.0.0/15
120.136.16.0/24
120.136.20.0/22
120.136.128.0/21
120.136.156.0/22
120.136.160.0/20
120.136.176.0/22
120.136.184.0/23
120.192.0.0/10
121.0.16.0/20
121.4.0.0/15
121.8.0.0/13
121.16.0.0/12
121.32.0.0/14
121.36.0.0/15
121.40.0.0/14
121.46.0.0/19
121.46.128.0/21
121.46.192.0/21
121.46.200.0/22
121.46.224.0/20
121.46.244.0/22
121.46.248.0/22
121.46.252.0/23
121.46.254.0/24
121.48.0.0/15
121.51.0.0/16
121.52.160.0/19
121.52.208.0/20
121.52.224.0/19
121.55.0.0/18
121.56.0.0/15
121.58.0.0/17
121.58.156.0/22
121.60.0.0/14
121.69.0.0/16
121.76.0.0/15
121.79.128.0/20
121.79.144.0/22
121.89.0.0/16
121.91.104.0/21
121.101.208.0/20
121.192.0.0/13
121.201.0.0/16
121.204.0.0/14
121.224.0.0/12
121.248.0.0/14
121.255.0.0/16
122.0.64.0/18
122.4.0.0/14
122.9.0.0/16
122.10.133.0/24
122.10.136.0/23
122.11.32.0/19
122.13.0.0/16
122.14.0.0/18
122.14.192.0/18
122.48.0.0/16
122.49.8.0/21
122.49.16.0/20
122.49.32.0/20
122.51.0.0/16
122.64.0.0/12
122.80.0.0/13
122.88.0.0/15
122.90.0.0/16
122.91.0.0/17
122.92.0.0/14
122.96.0.0/15
122.102.64.0/20
122.112.0.0/18
122.112.64.0/19
122.112.132.0/22
122.112.136.0/21
122.112.144.0/20
122.112.160.0/19
122.112.192.0/18
122.114.0.0/16
122.115.0.0/20
122.115.32.0/19
122.115.224.0/20
122.119.4.0/23
122.119.12.0/22
122.119.20.0/22
122.119.24.0/23
122.119.32.0/24
122.119.50.0/24
122.119.73.0/24
122.119.96.0/23
122.119.110.0/23
122.119.112.0/23
122.119.114.0/24
122.119.120.0/24
122.119.122.0/24
122.119.124.0/23
122.119.129.0/24
122.119.147.0/24
122.119.160.0/23
122.119.172.0/24
122.119.180.0/22
122.119.190.0/24
122.136.0.0/13
122.144.128.0/17
122.152.192.0/18
122.156.0.0/14
122.188.0.0/14
122.192.0.0/14
122.200.40.0/21
122.200.64.0/18
122.204.0.0/14
122.224.0.0/12
122.240.0.0/13
122.248.48.0/21
122.248.56.0/22
123.4.0.0/14
123.8.0.0/13
123.49.241.0/24
123.49.245.0/24
123.52.0.0/14
123.56.0.0/15
123.58.0.0/18
123.58.96.0/19
123.58.160.0/19
123.58.224.0/19
123.59.0.0/16
123.60.0.0/15
123.64.0.0/12
123.80.0.0/13
123.90.0.0/15
123.92.0.0/14
123.96.0.0/15
123.99.192.0/18
123.101.0.0/16
123.103.0.0/20
123.103.16.0/21
123.103.24.0/22
123.103.28.0/23
123.103.30.0/24
123.103.40.0/21
123.103.48.0/20
123.103.64.0/18
123.108.208.0/22
123.108.212.0/23
123.108.220.0/22
123.112.0.0/12
123.128.0.0/13
123.138.0.0/15
123.144.0.0/12
123.160.0.0/12
123.176.60.0/22
123.177.0.0/16
123.178.0.0/15
123.180.0.0/14
123.184.0.0/13
123.196.112.0/20
123.206.0.0/15
123.232.0.0/14
123.242.192.0/21
123.244.0.0/14
123.249.0.0/17
123.254.96.0/21
124.6.64.0/18
124.14.1.0/24
124.14.2.0/23
124.14.5.0/24
124.14.7.0/24
124.14.8.0/22
124.14.12.0/23
124.14.15.0/24
124.14.16.0/23
124.14.18.0/24
124.14.20.0/22
124.14.64.0/18
124.14.224.0/19
124.16.0.0/15
124.28.192.0/18
124.29.0.0/17
124.31.0.0/16
124.40.112.0/20
124.40.128.0/18
124.42.0.0/16
124.64.0.0/15
124.66.0.0/17
124.67.0.0/16
124.70.0.0/16
124.71.0.0/17
124.71.128.0/18
124.71.192.0/19
124.71.224.0/20
124.71.250.0/23
124.72.0.0/13
124.88.0.0/13
124.112.0.0/13
124.126.0.0/15
124.128.0.0/13
124.151.0.0/16
124.152.0.0/16
124.160.0.0/13
124.172.0.0/15
124.192.0.0/15
124.196.0.0/20
124.196.16.0/22
124.196.20.0/24
124.196.22.0/23
124.196.24.0/22
124.196.28.0/24
124.196.30.0/23
124.196.32.0/23
124.196.34.0/24
124.196.40.0/22
124.196.48.0/22
124.196.52.0/23
124.196.55.0/24
124.196.56.0/22
124.196.60.0/23
124.196.65.0/24
124.196.66.0/24
124.196.72.0/24
124.196.74.0/24
124.196.76.0/23
124.196.78.0/24
124.196.80.0/22
124.200.0.0/16
124.202.0.0/16
124.203.176.0/20
124.203.192.0/18
124.204.0.0/14
124.220.0.0/14
124.224.0.0/12
124.240.0.0/17
124.240.128.0/18
124.243.192.0/18
124.248.0.0/22
124.248.64.0/18
124.249.0.0/17
124.250.0.0/15
124.254.0.0/18
125.32.0.0/12
125.58.128.0/17
125.61.128.0/19
125.62.0.0/18
125.64.0.0/11
125.96.48.0/20
125.96.176.0/20
125.96.240.0/21
125.97.0.0/16
125.98.122.0/23
125.98.128.0/17
125.104.0.0/13
125.112.0.0/12
125.171.0.0/16
125.208.0.0/19
125.208.32.0/24
125.208.37.0/24
125.208.40.0/24
125.208.42.0/24
125.208.46.0/24
125.210.0.0/15
125.213.32.0/20
125.214.96.0/19
125.215.0.0/18
125.216.0.0/13
125.254.128.0/19
125.254.160.0/20
125.254.176.0/21
125.254.184.0/22
125.254.188.0/23
125.254.190.0/24
128.108.0.0/16
129.28.0.0/16
129.204.0.0/16
129.211.0.0/16
130.36.146.0/23
131.228.96.0/23
132.232.0.0/16
132.237.134.0/24
134.175.0.0/16
139.5.60.0/22
139.9.0.0/17
139.9.128.0/18
139.9.192.0/19
139.9.224.0/20
139.9.240.0/21
139.9.248.0/22
139.129.0.0/16
139.155.0.0/16
139.159.0.0/19
139.159.32.0/20
139.159.96.0/20
139.159.112.0/22
139.159.132.0/22
139.159.136.0/21
139.159.144.0/20
139.159.160.0/19
139.159.192.0/18
139.170.0.0/16
139.186.0.0/16
139.189.0.0/16
139.196.0.0/16
139.198.0.0/18
139.199.0.0/16
139.200.0.0/13
139.208.0.0/13
139.217.0.0/16
139.219.0.0/16
139.220.192.0/22
139.220.240.0/22
139.224.0.0/16
139.226.0.0/15
140.75.0.0/16
140.143.0.0/16
140.179.0.0/16
140.205.0.0/16
140.206.0.0/15
140.210.0.0/19
140.210.64.0/18
140.210.128.0/19
140.210.192.0/19
140.210.224.0/20
140.224.0.0/16
140.237.0.0/16
140.240.0.0/16
140.242.223.0/24
140.242.224.0/24
140.243.0.0/16
140.246.0.0/16
140.249.0.0/16
140.250.0.0/16
140.255.0.0/16
143.64.0.0/16
144.0.0.0/16
144.7.0.0/17
144.12.0.0/16
144.48.64.0/22
144.48.212.0/22
144.52.0.0/16
144.123.0.0/16
144.255.0.0/16
146.56.192.0/18
146.196.56.0/22
146.196.68.0/22
146.196.112.0/21
146.217.137.0/24
146.222.79.0/24
146.222.81.0/24
146.222.94.0/24
148.70.0.0/16
150.129.136.0/22
150.129.192.0/22
150.129.252.0/22
150.138.0.0/15
150.158.0.0/16
150.223.0.0/16
150.242.8.0/23
150.242.56.0/22
150.242.80.0/22
150.242.96.0/22
150.242.120.0/24
150.242.122.0/23
150.242.168.0/22
150.242.184.0/22
150.242.232.0/22
150.242.238.0/23
150.242.248.0/22
150.255.0.0/16
152.104.128.0/17
152.136.0.0/16
153.0.0.0/16
153.3.0.0/16
153.34.0.0/15
153.36.0.0/15
153.99.0.0/16
153.101.0.0/16
153.118.0.0/15
154.8.128.0/17
155.126.176.0/23
156.107.160.0/24
156.107.170.0/24
156.107.179.0/24
156.107.181.0/24
156.248.0.0/22
156.248.4.0/24
157.0.0.0/16
157.18.0.0/16
157.61.0.0/16
157.119.28.0/22
157.119.172.0/22
157.122.0.0/16
157.148.0.0/16
157.156.0.0/16
157.255.0.0/16
159.27.0.0/16
159.75.0.0/16
159.226.0.0/16
160.19.208.0/21
160.83.110.0/24
160.202.60.0/22
160.202.212.0/22
161.163.0.0/21
161.163.28.0/23
161.189.0.0/16
161.207.0.0/16
162.14.0.0/16
162.105.0.0/16
163.0.0.0/16
163.47.4.0/22
163.53.36.0/22
163.53.60.0/22
163.53.88.0/21
163.53.168.0/22
163.125.0.0/16
163.142.0.0/16
163.177.0.0/16
163.179.0.0/16
163.204.0.0/16
163.228.0.0/16
163.244.246.0/24
166.111.0.0/16
167.139.0.0/16
167.189.0.0/16
167.220.244.0/22
168.159.144.0/21
168.159.152.0/22
168.159.156.0/23
168.159.158.0/24
168.160.0.0/17
168.160.152.0/24
168.160.158.0/23
168.160.160.0/21
168.160.168.0/24
168.160.224.0/19
171.8.0.0/13
171.34.0.0/15
171.36.0.0/14
171.40.0.0/14
171.44.0.0/16
171.80.0.0/12
171.104.0.0/13
171.112.0.0/12
171.208.0.0/12
172.81.192.0/18
173.39.200.0/23
175.0.0.0/12
175.16.0.0/13
175.24.0.0/15
175.27.0.0/16
175.30.0.0/15
175.42.0.0/15
175.44.0.0/16
175.46.0.0/15
175.48.0.0/12
175.64.0.0/11
175.102.0.0/19
175.102.32.0/22
175.102.128.0/21
175.102.160.0/19
175.102.192.0/22
175.102.196.0/24
175.106.128.0/17
175.146.0.0/15
175.148.0.0/14
175.152.0.0/14
175.160.0.0/12
175.178.0.0/16
175.184.128.0/18
175.185.0.0/16
175.186.0.0/15
175.188.188.0/22
175.190.24.0/21
175.190.126.0/23
180.76.16.0/20
180.76.32.0/19
180.76.64.0/18
180.76.128.0/17
180.77.0.0/16
180.78.0.0/15
180.84.0.0/15
180.88.96.0/19
180.88.128.0/18
180.89.56.0/22
180.89.60.0/23
180.89.64.0/19
180.91.192.0/20
180.92.176.0/23
180.95.128.0/17
180.96.0.0/11
180.129.128.0/17
180.130.0.0/16
180.136.0.0/13
180.149.128.0/19
180.150.176.0/20
180.152.0.0/13
180.160.0.0/12
180.178.252.0/22
180.184.0.0/21
180.184.8.0/22
180.184.12.0/23
180.184.14.0/24
180.184.16.0/24
180.184.24.0/21
180.184.32.0/19
180.184.64.0/18
180.184.128.0/20
180.184.144.0/21
180.184.152.0/22
180.184.160.0/20
180.184.176.0/21
180.184.184.0/22
180.184.190.0/23
180.184.192.0/18
180.186.38.0/23
180.186.40.0/22
180.186.44.0/24
180.188.24.0/21
180.188.32.0/22
180.188.44.0/22
180.200.252.0/22
180.201.0.0/16
180.203.0.0/23
180.203.3.0/24
180.208.0.0/15
180.210.212.0/22
180.212.0.0/15
180.233.0.0/20
180.235.64.0/21
180.235.72.0/23
182.18.5.0/24
182.18.32.0/19
182.18.64.0/18
182.32.0.0/12
182.48.96.0/20
182.48.112.0/21
182.50.8.0/21
182.50.112.0/20
182.51.0.0/24
182.54.0.0/17
182.61.0.0/18
182.61.128.0/19
182.61.192.0/22
182.61.200.0/21
182.61.216.0/21
182.61.224.0/19
182.84.0.0/14
182.88.0.0/14
182.92.0.0/16
182.96.0.0/11
182.128.0.0/12
182.144.0.0/13
182.157.0.0/16
182.174.0.0/15
182.200.0.0/13
182.236.160.0/19
182.240.0.0/13
182.254.0.0/16
183.0.0.0/10
183.64.0.0/13
183.78.180.0/22
183.81.180.0/22
183.84.0.0/15
183.91.40.0/21
183.91.56.0/24
183.91.144.0/20
183.92.0.0/14
183.128.0.0/11
183.160.0.0/13
183.168.0.0/15
183.170.0.0/16
183.172.0.0/14
183.184.0.0/13
183.192.0.0/10
188.131.128.0/17
192.55.46.0/24
192.55.68.0/22
192.102.204.0/22
192.140.208.0/21
192.144.128.0/17
192.163.11.0/24
192.232.97.0/24
193.17.120.0/22
193.112.0.0/16
194.138.202.0/23
194.138.245.0/24
198.175.100.0/22
198.208.17.0/24
198.208.19.0/24
198.208.30.0/24
198.208.61.0/24
198.208.63.0/24
198.208.67.0/24
198.208.112.0/23
199.244.144.0/24
202.1.86.0/23
202.1.90.0/23
202.1.110.0/23
202.1.112.0/23
202.4.128.0/19
202.4.252.0/22
202.10.74.0/23
202.10.76.0/22
202.14.235.0/24
202.14.236.0/23
202.14.238.0/24
202.30.124.0/24
202.38.2.0/23
202.38.8.0/21
202.38.64.0/18
202.38.128.0/23
202.38.132.0/23
202.38.134.0/24
202.38.140.0/23
202.38.152.0/23
202.38.164.0/22
202.38.184.0/21
202.38.192.0/18
202.41.152.0/21
202.41.241.0/24
202.41.242.0/23
202.41.244.0/22
202.41.248.0/21
202.43.144.0/20
202.47.104.0/21
202.59.214.0/24
202.60.112.0/20
202.60.132.0/22
202.61.88.0/22
202.62.112.0/22
202.63.160.0/20
202.69.16.0/20
202.72.112.0/20
202.73.128.0/22
202.73.240.0/20
202.75.208.0/20
202.76.247.0/24
202.80.192.0/22
202.81.176.0/20
202.84.17.0/24
202.85.208.0/20
202.89.96.0/24
202.89.232.0/21
202.90.20.0/22
202.90.96.0/20
202.91.176.0/21
202.91.184.0/23
202.91.186.0/24
202.91.188.0/24
202.91.190.0/23
202.91.224.0/20
202.91.240.0/21
202.91.248.0/22
202.93.252.0/22
202.94.1.0/24
202.95.0.0/19
202.96.0.0/12
202.112.0.0/13
202.120.0.0/15
202.122.32.0/21
202.122.112.0/21
202.123.96.0/24
202.123.98.0/24
202.123.106.0/23
202.123.108.0/24
202.123.110.0/23
202.123.120.0/22
202.125.176.0/20
202.127.0.0/21
202.127.12.0/22
202.127.16.0/20
202.127.40.0/21
202.127.48.0/23
202.127.144.0/20
202.127.200.0/21
202.127.216.0/21
202.127.224.0/19
202.130.0.0/19
202.130.224.0/20
202.130.240.0/21
202.136.48.0/20
202.136.208.0/21
202.136.216.0/23
202.136.218.0/24
202.136.220.0/24
202.136.222.0/23
202.136.255.0/24
202.141.160.0/19
202.143.16.0/23
202.143.100.0/22
202.148.96.0/19
202.149.224.0/19
202.152.176.0/20
202.158.160.0/19
202.165.208.0/20
202.168.160.0/19
202.170.128.0/19
202.170.216.0/21
202.173.8.0/22
202.173.14.0/23
202.173.224.0/19
202.181.28.0/24
202.181.124.0/22
202.189.0.0/20
202.192.0.0/12
203.0.104.0/21
203.2.64.0/21
203.2.112.0/21
203.2.160.0/22
203.3.80.0/21
203.3.112.0/21
203.6.224.0/20
203.15.0.0/20
203.25.208.0/20
203.32.204.0/23
203.33.64.0/24
203.33.145.0/24
203.33.156.0/24
203.33.174.0/24
203.33.202.0/23
203.33.206.0/23
203.33.214.0/23
203.33.224.0/23
203.33.243.0/24
203.33.250.0/24
203.34.4.0/24
203.34.21.0/24
203.34.27.0/24
203.34.39.0/24
203.34.48.0/23
203.34.54.0/24
203.34.56.0/23
203.34.67.0/24
203.34.69.0/24
203.34.76.0/24
203.34.92.0/24
203.34.106.0/24
203.34.113.0/24
203.34.147.0/24
203.34.150.0/24
203.34.152.0/23
203.34.161.0/24
203.34.162.0/24
203.34.187.0/24
203.34.232.0/24
203.34.240.0/24
203.34.242.0/24
203.34.245.0/24
203.34.251.0/24
203.55.2.0/23
203.55.4.0/24
203.55.10.0/24
203.55.13.0/24
203.55.22.0/24
203.55.30.0/24
203.55.93.0/24
203.55.101.0/24
203.55.109.0/24
203.55.110.0/24
203.55.116.0/23
203.55.119.0/24
203.55.128.0/23
203.55.146.0/23
203.55.192.0/24
203.55.196.0/24
203.55.218.0/23
203.55.221.0/24
203.55.224.0/24
203.56.1.0/24
203.56.4.0/24
203.56.12.0/24
203.56.24.0/24
203.56.38.0/24
203.56.40.0/24
203.56.46.0/24
203.56.68.0/23
203.56.82.0/23
203.56.84.0/23
203.56.95.0/24
203.56.110.0/24
203.56.121.0/24
203.56.161.0/24
203.56.169.0/24
203.56.172.0/23
203.56.175.0/24
203.56.183.0/24
203.56.185.0/24
203.56.187.0/24
203.56.192.0/24
203.56.198.0/24
203.56.201.0/24
203.56.208.0/23
203.56.210.0/24
203.56.214.0/24
203.56.228.0/24
203.56.232.0/24
203.56.240.0/24
203.56.252.0/24
203.56.254.0/24
203.57.5.0/24
203.57.6.0/24
203.57.12.0/23
203.57.28.0/24
203.57.39.0/24
203.57.46.0/24
203.57.58.0/24
203.57.61.0/24
203.57.70.0/23
203.57.101.0/24
203.57.109.0/24
203.57.123.0/24
203.57.157.0/24
203.57.200.0/24
203.57.202.0/24
203.57.206.0/24
203.57.222.0/24
203.57.224.0/20
203.57.249.0/24
203.57.254.0/23
203.62.2.0/24
203.62.131.0/24
203.62.139.0/24
203.65.240.0/22
203.76.208.0/21
203.76.216.0/22
203.76.240.0/22
203.78.48.0/20
203.80.57.0/24
203.80.144.0/20
203.82.0.0/23
203.83.56.0/21
203.86.0.0/18
203.86.64.0/19
203.86.254.0/23
203.88.32.0/19
203.88.192.0/19
203.90.128.0/18
203.90.192.0/19
203.91.32.0/19
203.91.120.0/21
203.93.0.0/18
203.93.64.0/19
203.93.96.0/20
203.93.117.0/24
203.93.120.0/21
203.93.128.0/19
203.93.160.0/20
203.93.208.0/20
203.93.224.0/19
203.94.0.0/19
203.95.0.0/21
203.95.96.0/22
203.95.104.0/21
203.99.20.0/24
203.99.22.0/23
203.99.24.0/22
203.99.30.0/23
203.100.87.0/24
203.100.92.0/22
203.100.192.0/20
203.104.32.0/20
203.107.1.0/24
203.107.6.0/24
203.107.13.0/24
203.107.20.0/22
203.107.26.0/23
203.107.28.0/22
203.107.32.0/19
203.107.72.0/21
203.107.80.0/21
203.107.96.0/23
203.107.100.0/22
203.107.104.0/22
203.107.108.0/23
203.110.160.0/19
203.110.208.0/20
203.114.244.0/22
203.118.248.0/22
203.119.25.0/24
203.119.30.0/24
203.119.80.0/23
203.119.83.0/24
203.119.85.0/24
203.119.128.0/19
203.119.168.0/21
203.119.176.0/20
203.119.192.0/18
203.130.32.0/22
203.130.40.0/21
203.132.32.0/19
203.134.240.0/21
203.135.96.0/19
203.148.0.0/18
203.148.64.0/20
203.156.192.0/18
203.160.129.0/24
203.160.212.0/24
203.161.192.0/19
203.166.160.0/22
203.166.165.0/24
203.166.166.0/24
203.166.168.0/24
203.166.172.0/24
203.166.176.0/23
203.166.180.0/24
203.166.186.0/23
203.166.188.0/23
203.166.191.0/24
203.168.0.0/23
203.168.2.0/24
203.168.16.0/23
203.168.18.0/24
203.174.4.0/24
203.175.128.0/19
203.176.168.0/24
203.176.170.0/24
203.187.160.0/19
203.189.0.0/23
203.189.6.0/23
203.189.192.0/19
203.189.240.0/22
203.191.0.0/23
203.191.144.0/21
203.192.1.0/24
203.192.2.0/23
203.192.4.0/22
203.192.8.0/21
203.192.16.0/24
203.192.24.0/23
203.193.224.0/19
203.195.64.0/19
203.195.128.0/17
203.196.0.0/21
203.202.236.0/23
203.205.64.0/19
203.207.64.0/19
203.207.96.0/21
203.207.104.0/22
203.207.112.0/20
203.207.128.0/18
203.207.192.0/21
203.207.200.0/22
203.207.208.0/20
203.207.224.0/19
203.208.32.0/19
203.209.224.0/19
203.212.0.0/20
203.212.80.0/23
203.215.232.0/23
203.215.236.0/24
206.119.53.0/24
210.2.4.0/24
210.5.18.0/24
210.5.25.0/24
210.5.29.0/24
210.5.128.0/19
210.12.0.0/16
210.13.0.0/17
210.13.192.0/19
210.13.224.0/24
210.13.227.0/24
210.13.230.0/23
210.13.232.0/24
210.13.236.0/23
210.13.238.0/24
210.13.240.0/20
210.14.64.0/19
210.14.112.0/20
210.14.128.0/19
210.14.192.0/18
210.15.0.0/17
210.16.180.0/24
210.16.185.0/24
210.16.186.0/23
210.16.188.0/22
210.21.0.0/17
210.21.192.0/18
210.22.0.0/19
210.22.32.0/22
210.22.48.0/20
210.22.64.0/18
210.22.128.0/17
210.25.0.0/16
210.26.0.0/15
210.28.0.0/14
210.32.0.0/12
210.51.0.0/16
210.52.0.0/15
210.72.0.0/17
210.72.128.0/18
210.72.192.0/19
210.72.224.0/20
210.72.240.0/21
210.73.0.0/16
210.74.0.0/20
210.74.35.0/24
210.74.36.0/23
210.74.38.0/24
210.74.40.0/22
210.74.44.0/23
210.74.47.0/24
210.74.64.0/23
210.74.107.0/24
210.74.108.0/23
210.74.128.0/18
210.74.224.0/19
210.75.0.0/18
210.75.88.0/24
210.75.96.0/19
210.75.192.0/18
210.76.32.0/19
210.76.64.0/18
210.76.160.0/19
210.76.192.0/19
210.77.0.0/18
210.77.64.0/19
210.77.128.0/19
210.77.176.0/21
210.77.184.0/23
210.77.189.0/24
210.77.190.0/23
210.77.192.0/18
210.78.128.0/24
210.78.133.0/24
210.78.134.0/23
210.78.136.0/22
210.78.144.0/23
210.78.147.0/24
210.79.224.0/19
210.82.0.0/15
210.185.192.0/18
210.192.96.0/20
210.192.116.0/22
210.192.120.0/21
211.64.0.0/13
211.80.0.0/13
211.88.0.0/15
211.90.0.0/17
211.90.128.0/18
211.90.216.0/21
211.90.224.0/19
211.91.0.0/18
211.91.64.0/19
211.91.96.0/20
211.91.120.0/21
211.91.128.0/19
211.91.160.0/20
211.91.176.0/21
211.91.216.0/21
211.91.224.0/19
211.92.0.0/17
211.92.128.0/18
211.92.192.0/19
211.92.224.0/20
211.92.240.0/21
211.93.0.0/17
211.93.128.0/18
211.93.192.0/21
211.93.200.0/23
211.93.204.0/22
211.93.211.0/24
211.93.212.0/23
211.93.224.0/19
211.94.64.0/18
211.94.128.0/17
211.95.0.0/17
211.95.128.0/19
211.95.192.0/18
211.96.0.0/16
211.97.0.0/17
211.97.128.0/19
211.97.160.0/21
211.97.192.0/18
211.98.0.0/16
211.99.8.0/21
211.99.16.0/23
211.99.25.0/24
211.99.26.0/24
211.99.28.0/23
211.99.30.0/24
211.99.32.0/19
211.99.64.0/19
211.99.96.0/20
211.99.112.0/21
211.99.120.0/23
211.99.122.0/24
211.99.128.0/17
211.100.0.0/17
211.100.192.0/20
211.100.224.0/19
211.101.0.0/18
211.101.192.0/20
211.101.232.0/21
211.101.240.0/21
211.102.80.0/20
211.102.128.0/18
211.102.192.0/23
211.102.208.0/20
211.103.0.0/16
211.136.0.0/13
211.144.9.0/24
211.144.10.0/24
211.144.12.0/22
211.144.16.0/24
211.144.18.0/23
211.144.20.0/24
211.144.22.0/24
211.144.24.0/24
211.144.27.0/24
211.144.28.0/23
211.144.64.0/18
211.144.192.0/18
211.145.0.0/18
211.145.64.0/20
211.146.0.0/16
211.147.0.0/18
211.147.64.0/19
211.147.128.0/18
211.147.208.0/20
211.147.224.0/19
211.148.0.0/17
211.148.128.0/19
211.148.160.0/22
211.148.164.0/23
211.148.166.0/24
211.148.168.0/22
211.148.172.0/24
211.148.180.0/24
211.148.184.0/24
211.148.187.0/24
211.148.188.0/22
211.148.192.0/18
211.149.128.0/17
211.150.0.0/18
211.150.64.0/19
211.150.98.0/24
211.150.100.0/23
211.150.114.0/23
211.150.122.0/24
211.150.124.0/23
211.150.127.0/24
211.150.128.0/24
211.151.0.0/16
211.152.0.0/17
211.152.192.0/22
211.152.196.0/23
211.152.208.0/20
211.153.0.0/16
211.154.0.0/19
211.154.64.0/18
211.154.128.0/17
211.155.0.0/18
211.155.80.0/20
211.155.120.0/21
211.155.128.0/19
211.155.160.0/20
211.155.176.0/22
211.155.184.0/21
211.155.224.0/21
211.155.232.0/22
211.155.236.0/24
211.155.240.0/20
211.156.0.0/19
211.156.128.0/19
211.156.176.0/20
211.156.192.0/20
211.156.208.0/21
211.156.216.0/22
211.156.220.0/23
211.156.223.0/24
211.157.0.0/19
211.157.96.0/19
211.157.128.0/17
211.158.0.0/16
211.159.64.0/21
211.159.128.0/17
211.160.0.0/22
211.160.4.0/24
211.160.9.0/24
211.160.10.0/23
211.160.15.0/24
211.160.16.0/24
211.160.19.0/24
211.160.20.0/22
211.160.24.0/24
211.160.27.0/24
211.160.28.0/23
211.160.36.0/23
211.160.46.0/24
211.160.62.0/24
211.160.72.0/21
211.160.80.0/20
211.160.112.0/23
211.160.115.0/24
211.160.120.0/24
211.160.160.0/19
211.160.195.0/24
211.160.196.0/24
211.160.203.0/24
211.160.205.0/24
211.160.240.0/20
211.161.0.0/20
211.161.20.0/22
211.161.24.0/22
211.161.32.0/20
211.161.52.0/22
211.161.56.0/21
211.161.80.0/20
211.161.97.0/24
211.161.101.0/24
211.161.102.0/23
211.161.120.0/21
211.161.128.0/20
211.161.192.0/22
211.161.203.0/24
211.161.209.0/24
211.161.221.0/24
211.162.0.0/21
211.162.32.0/21
211.162.64.0/20
211.162.112.0/20
211.162.192.0/22
211.162.200.0/22
211.162.236.0/22
211.162.240.0/20
211.165.0.0/16
211.166.0.0/16
211.167.64.0/24
211.167.96.0/19
211.167.128.0/19
211.167.176.0/20
211.167.224.0/19
212.64.0.0/17
212.129.128.0/17
218.0.0.0/11
218.56.0.0/13
218.64.0.0/11
218.96.0.0/24
218.96.64.0/22
218.96.104.0/22
218.96.108.0/23
218.96.241.0/24
218.96.244.0/24
218.96.255.0/24
218.97.0.0/17
218.97.160.0/19
218.97.192.0/19
218.97.240.0/20
218.98.0.0/18
218.98.96.0/21
218.98.104.0/22
218.98.108.0/23
218.98.111.0/24
218.98.112.0/22
218.98.160.0/24
218.98.176.0/24
218.104.0.0/15
218.106.0.0/16
218.107.0.0/18
218.107.128.0/17
218.108.0.0/15
218.192.0.0/12
218.213.85.0/24
218.240.0.0/18
218.240.128.0/17
218.241.16.0/21
218.241.96.0/20
218.241.112.0/24
218.241.115.0/24
218.241.116.0/22
218.241.120.0/21
218.241.128.0/17
218.242.0.0/16
218.244.0.0/19
218.244.44.0/22
218.244.49.0/24
218.244.52.0/23
218.244.55.0/24
218.244.56.0/23
218.244.58.0/24
218.244.96.0/19
218.244.128.0/18
218.244.192.0/20
218.244.224.0/19
218.245.0.0/17
218.246.22.0/24
218.246.32.0/22
218.246.64.0/18
218.246.160.0/19
218.246.192.0/19
218.247.0.0/18
218.247.128.0/17
218.249.0.0/16
219.72.0.0/16
219.82.0.0/16
219.83.160.0/19
219.128.0.0/12
219.144.0.0/14
219.148.0.0/15
219.150.0.0/16
219.151.0.0/18
219.151.128.0/17
219.152.0.0/14
219.156.0.0/15
219.158.0.0/19
219.158.32.0/20
219.158.58.0/23
219.158.60.0/22
219.158.96.0/19
219.158.128.0/17
219.159.0.0/16
219.216.0.0/13
219.224.0.0/13
219.232.0.0/17
219.232.160.0/19
219.232.192.0/19
219.233.0.0/16
219.234.0.0/21
219.234.80.0/20
219.234.96.0/19
219.234.128.0/17
219.235.0.0/17
219.235.128.0/20
219.235.144.0/21
219.235.192.0/18
219.236.0.0/14
219.242.0.0/15
219.244.0.0/14
220.101.192.0/18
220.112.0.0/18
220.112.192.0/20
220.112.224.0/19
220.113.0.0/18
220.113.96.0/21
220.113.128.0/21
220.113.136.0/22
220.113.144.0/20
220.113.160.0/20
220.113.180.0/22
220.113.184.0/22
220.113.224.0/19
220.114.64.0/21
220.114.248.0/22
220.115.8.0/21
220.115.16.0/20
220.115.228.0/22
220.115.232.0/21
220.115.240.0/21
220.152.128.0/17
220.160.0.0/12
220.176.0.0/14
220.180.0.0/16
220.181.0.0/17
220.181.128.0/20
220.181.144.0/24
220.181.148.0/22
220.181.152.0/21
220.181.160.0/20
220.181.176.0/21
220.181.184.0/22
220.181.188.0/23
220.181.190.0/24
220.182.0.0/18
220.184.0.0/13
220.192.0.0/16
220.193.0.0/17
220.194.0.0/16
220.195.0.0/17
220.195.128.0/19
220.195.192.0/18
220.196.0.0/16
220.197.0.0/17
220.197.160.0/19
220.197.192.0/18
220.198.0.0/15
220.200.0.0/17
220.200.128.0/20
220.200.148.0/22
220.200.152.0/21
220.200.160.0/19
220.200.192.0/18
220.201.0.0/16
220.202.0.0/16
220.203.0.0/18
220.203.216.0/23
220.203.220.0/22
220.203.224.0/19
220.205.0.0/16
220.206.192.0/22
220.207.0.0/22
220.207.80.0/20
220.207.176.0/22
220.207.184.0/22
220.207.254.0/23
220.231.0.0/18
220.231.128.0/17
220.232.64.0/18
220.234.0.0/16
220.243.128.0/18
220.248.0.0/16
220.249.0.0/17
220.249.128.0/18
220.249.192.0/19
220.249.240.0/20
220.250.0.0/17
221.0.0.0/13
221.8.0.0/14
221.12.0.0/17
221.12.128.0/18
221.13.0.0/16
221.14.0.0/15
221.122.0.0/16
221.123.128.0/17
221.129.16.0/23
221.129.64.0/23
221.129.72.0/22
221.129.76.0/23
221.129.80.0/24
221.129.230.0/23
221.129.242.0/23
221.129.244.0/22
221.129.248.0/23
221.129.252.0/24
221.130.0.0/15
221.133.225.0/24
221.133.226.0/23
221.133.228.0/22
221.133.232.0/22
221.133.240.0/20
221.137.0.0/16
221.172.0.0/14
221.176.0.0/13
221.192.0.0/14
221.196.0.0/15
221.198.0.0/16
221.199.0.0/17
221.199.128.0/18
221.199.192.0/20
221.199.224.0/19
221.200.0.0/13
221.208.0.0/12
221.224.0.0/12
222.16.0.0/12
222.32.0.0/11
222.64.0.0/11
222.125.0.0/16
222.126.128.0/17
222.128.0.0/12
222.160.0.0/14
222.168.0.0/13
222.176.0.0/12
222.192.0.0/11
222.240.0.0/13
222.248.0.0/15
223.0.1.0/24
223.0.2.0/24
223.0.8.0/23
223.0.10.0/24
223.0.12.0/23
223.0.15.0/24
223.0.16.0/24
223.0.20.0/24
223.0.30.0/24
223.0.126.0/24
223.2.0.0/15
223.4.0.0/14
223.8.0.0/13
223.27.184.0/22
223.64.0.0/10
223.128.0.0/15
223.144.0.0/12
223.160.0.0/20
223.160.16.0/21
223.160.112.0/20
223.160.128.0/22
223.160.134.0/23
223.160.136.0/21
223.160.144.0/20
223.160.160.0/19
223.160.192.0/19
223.160.224.0/21
223.160.232.0/22
223.160.236.0/23
223.166.0.0/15
223.192.0.0/15
223.198.0.0/15
223.202.0.0/24
223.202.17.0/24
223.202.20.0/24
223.202.25.0/24
223.202.67.0/24
223.202.131.0/24
223.202.132.0/24
223.202.134.0/23
223.202.193.0/24
223.202.196.0/24
223.202.198.0/23
223.202.208.0/24
223.202.211.0/24
223.202.212.0/24
223.203.3.0/24
223.203.9.0/24
223.203.96.0/24
223.203.100.0/24
223.203.208.0/24
223.210.0.0/19
223.210.48.0/22
223.212.0.0/14
223.220.0.0/15
223.223.176.0/20
223.223.192.0/20
223.240.0.0/13
223.248.0.0/14
223.252.192.0/19
223.255.236.0/22
223.255.252.0/23
================================================
FILE: crypto-js.js
================================================
;(function (root, factory) {
if (typeof exports === "object") {
// CommonJS
module.exports = exports = factory();
}
else if (typeof define === "function" && define.amd) {
// AMD
define([], factory);
}
else {
// Global (browser)
root.CryptoJS = factory();
}
}(this, function () {
/*globals window, global, require*/
/**
* CryptoJS core components.
*/
var CryptoJS = CryptoJS || (function (Math, undefined) {
var crypto;
// Native crypto from window (Browser)
if (typeof window !== 'undefined' && window.crypto) {
crypto = window.crypto;
}
// Native (experimental IE 11) crypto from window (Browser)
if (!crypto && typeof window !== 'undefined' && window.msCrypto) {
crypto = window.msCrypto;
}
// Native crypto from global (NodeJS)
if (!crypto && typeof global !== 'undefined' && global.crypto) {
crypto = global.crypto;
}
// Native crypto import via require (NodeJS)
if (!crypto && typeof require === 'function') {
try {
crypto = require('crypto');
} catch (err) {}
}
/*
* Cryptographically secure pseudorandom number generator
*
* As Math.random() is cryptographically not safe to use
*/
var cryptoSecureRandomInt = function () {
if (crypto) {
// Use getRandomValues method (Browser)
if (typeof crypto.getRandomValues === 'function') {
try {
return crypto.getRandomValues(new Uint32Array(1))[0];
} catch (err) {}
}
// Use randomBytes method (NodeJS)
if (typeof crypto.randomBytes === 'function') {
try {
return crypto.randomBytes(4).readInt32LE();
} catch (err) {}
}
}
throw new Error('Native crypto module could not be used to get secure random number.');
};
/*
* Local polyfill of Object.create
*/
var create = Object.create || (function () {
function F() {}
return function (obj) {
var subtype;
F.prototype = obj;
subtype = new F();
F.prototype = null;
return subtype;
};
}())
/**
* CryptoJS namespace.
*/
var C = {};
/**
* Library namespace.
*/
var C_lib = C.lib = {};
/**
* Base object for prototypal inheritance.
*/
var Base = C_lib.Base = (function () {
return {
/**
* Creates a new object that inherits from this object.
*
* @param {Object} overrides Properties to copy into the new object.
*
* @return {Object} The new object.
*
* @static
*
* @example
*
* var MyType = CryptoJS.lib.Base.extend({
* field: 'value',
*
* method: function () {
* }
* });
*/
extend: function (overrides) {
// Spawn
var subtype = create(this);
// Augment
if (overrides) {
subtype.mixIn(overrides);
}
// Create default initializer
if (!subtype.hasOwnProperty('init') || this.init === subtype.init) {
subtype.init = function () {
subtype.$super.init.apply(this, arguments);
};
}
// Initializer's prototype is the subtype object
subtype.init.prototype = subtype;
// Reference supertype
subtype.$super = this;
return subtype;
},
/**
* Extends this object and runs the init method.
* Arguments to create() will be passed to init().
*
* @return {Object} The new object.
*
* @static
*
* @example
*
* var instance = MyType.create();
*/
create: function () {
var instance = this.extend();
instance.init.apply(instance, arguments);
return instance;
},
/**
* Initializes a newly created object.
* Override this method to add some logic when your objects are created.
*
* @example
*
* var MyType = CryptoJS.lib.Base.extend({
* init: function () {
* // ...
* }
* });
*/
init: function () {
},
/**
* Copies properties into this object.
*
* @param {Object} properties The properties to mix in.
*
* @example
*
* MyType.mixIn({
* field: 'value'
* });
*/
mixIn: function (properties) {
for (var propertyName in properties) {
if (properties.hasOwnProperty(propertyName)) {
this[propertyName] = properties[propertyName];
}
}
// IE won't copy toString using the loop above
if (properties.hasOwnProperty('toString')) {
this.toString = properties.toString;
}
},
/**
* Creates a copy of this object.
*
* @return {Object} The clone.
*
* @example
*
* var clone = instance.clone();
*/
clone: function () {
return this.init.prototype.extend(this);
}
};
}());
/**
* An array of 32-bit words.
*
* @property {Array} words The array of 32-bit words.
* @property {number} sigBytes The number of significant bytes in this word array.
*/
var WordArray = C_lib.WordArray = Base.extend({
/**
* Initializes a newly created word array.
*
* @param {Array} words (Optional) An array of 32-bit words.
* @param {number} sigBytes (Optional) The number of significant bytes in the words.
*
* @example
*
* var wordArray = CryptoJS.lib.WordArray.create();
* var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]);
* var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6);
*/
init: function (words, sigBytes) {
words = this.words = words || [];
if (sigBytes != undefined) {
this.sigBytes = sigBytes;
} else {
this.sigBytes = words.length * 4;
}
},
/**
* Converts this word array to a string.
*
* @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex
*
* @return {string} The stringified word array.
*
* @example
*
* var string = wordArray + '';
* var string = wordArray.toString();
* var string = wordArray.toString(CryptoJS.enc.Utf8);
*/
toString: function (encoder) {
return (encoder || Hex).stringify(this);
},
/**
* Concatenates a word array to this word array.
*
* @param {WordArray} wordArray The word array to append.
*
* @return {WordArray} This word array.
*
* @example
*
* wordArray1.concat(wordArray2);
*/
concat: function (wordArray) {
// Shortcuts
var thisWords = this.words;
var thatWords = wordArray.words;
var thisSigBytes = this.sigBytes;
var thatSigBytes = wordArray.sigBytes;
// Clamp excess bits
this.clamp();
// Concat
if (thisSigBytes % 4) {
// Copy one byte at a time
for (var i = 0; i < thatSigBytes; i++) {
var thatByte = (thatWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;
thisWords[(thisSigBytes + i) >>> 2] |= thatByte << (24 - ((thisSigBytes + i) % 4) * 8);
}
} else {
// Copy one word at a time
for (var i = 0; i < thatSigBytes; i += 4) {
thisWords[(thisSigBytes + i) >>> 2] = thatWords[i >>> 2];
}
}
this.sigBytes += thatSigBytes;
// Chainable
return this;
},
/**
* Removes insignificant bits.
*
* @example
*
* wordArray.clamp();
*/
clamp: function () {
// Shortcuts
var words = this.words;
var sigBytes = this.sigBytes;
// Clamp
words[sigBytes >>> 2] &= 0xffffffff << (32 - (sigBytes % 4) * 8);
words.length = Math.ceil(sigBytes / 4);
},
/**
* Creates a copy of this word array.
*
* @return {WordArray} The clone.
*
* @example
*
* var clone = wordArray.clone();
*/
clone: function () {
var clone = Base.clone.call(this);
clone.words = this.words.slice(0);
return clone;
},
/**
* Creates a word array filled with random bytes.
*
* @param {number} nBytes The number of random bytes to generate.
*
* @return {WordArray} The random word array.
*
* @static
*
* @example
*
* var wordArray = CryptoJS.lib.WordArray.random(16);
*/
random: function (nBytes) {
var words = [];
for (var i = 0; i < nBytes; i += 4) {
words.push(cryptoSecureRandomInt());
}
return new WordArray.init(words, nBytes);
}
});
/**
* Encoder namespace.
*/
var C_enc = C.enc = {};
/**
* Hex encoding strategy.
*/
var Hex = C_enc.Hex = {
/**
* Converts a word array to a hex string.
*
* @param {WordArray} wordArray The word array.
*
* @return {string} The hex string.
*
* @static
*
* @example
*
* var hexString = CryptoJS.enc.Hex.stringify(wordArray);
*/
stringify: function (wordArray) {
// Shortcuts
var words = wordArray.words;
var sigBytes = wordArray.sigBytes;
// Convert
var hexChars = [];
for (var i = 0; i < sigBytes; i++) {
var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;
hexChars.push((bite >>> 4).toString(16));
hexChars.push((bite & 0x0f).toString(16));
}
return hexChars.join('');
},
/**
* Converts a hex string to a word array.
*
* @param {string} hexStr The hex string.
*
* @return {WordArray} The word array.
*
* @static
*
* @example
*
* var wordArray = CryptoJS.enc.Hex.parse(hexString);
*/
parse: function (hexStr) {
// Shortcut
var hexStrLength = hexStr.length;
// Convert
var words = [];
for (var i = 0; i < hexStrLength; i += 2) {
words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << (24 - (i % 8) * 4);
}
return new WordArray.init(words, hexStrLength / 2);
}
};
/**
* Latin1 encoding strategy.
*/
var Latin1 = C_enc.Latin1 = {
/**
* Converts a word array to a Latin1 string.
*
* @param {WordArray} wordArray The word array.
*
* @return {string} The Latin1 string.
*
* @static
*
* @example
*
* var latin1String = CryptoJS.enc.Latin1.stringify(wordArray);
*/
stringify: function (wordArray) {
// Shortcuts
var words = wordArray.words;
var sigBytes = wordArray.sigBytes;
// Convert
var latin1Chars = [];
for (var i = 0; i < sigBytes; i++) {
var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;
latin1Chars.push(String.fromCharCode(bite));
}
return latin1Chars.join('');
},
/**
* Converts a Latin1 string to a word array.
*
* @param {string} latin1Str The Latin1 string.
*
* @return {WordArray} The word array.
*
* @static
*
* @example
*
* var wordArray = CryptoJS.enc.Latin1.parse(latin1String);
*/
parse: function (latin1Str) {
// Shortcut
var latin1StrLength = latin1Str.length;
// Convert
var words = [];
for (var i = 0; i < latin1StrLength; i++) {
words[i >>> 2] |= (latin1Str.charCodeAt(i) & 0xff) << (24 - (i % 4) * 8);
}
return new WordArray.init(words, latin1StrLength);
}
};
/**
* UTF-8 encoding strategy.
*/
var Utf8 = C_enc.Utf8 = {
/**
* Converts a word array to a UTF-8 string.
*
* @param {WordArray} wordArray The word array.
*
* @return {string} The UTF-8 string.
*
* @static
*
* @example
*
* var utf8String = CryptoJS.enc.Utf8.stringify(wordArray);
*/
stringify: function (wordArray) {
try {
return decodeURIComponent(escape(Latin1.stringify(wordArray)));
} catch (e) {
throw new Error('Malformed UTF-8 data');
}
},
/**
* Converts a UTF-8 string to a word array.
*
* @param {string} utf8Str The UTF-8 string.
*
* @return {WordArray} The word array.
*
* @static
*
* @example
*
* var wordArray = CryptoJS.enc.Utf8.parse(utf8String);
*/
parse: function (utf8Str) {
return Latin1.parse(unescape(encodeURIComponent(utf8Str)));
}
};
/**
* Abstract buffered block algorithm template.
*
* The property blockSize must be implemented in a concrete subtype.
*
* @property {number} _minBufferSize The number of blocks that should be kept unprocessed in the buffer. Default: 0
*/
var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({
/**
* Resets this block algorithm's data buffer to its initial state.
*
* @example
*
* bufferedBlockAlgorithm.reset();
*/
reset: function () {
// Initial values
this._data = new WordArray.init();
this._nDataBytes = 0;
},
/**
* Adds new data to this block algorithm's buffer.
*
* @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8.
*
* @example
*
* bufferedBlockAlgorithm._append('data');
* bufferedBlockAlgorithm._append(wordArray);
*/
_append: function (data) {
// Convert string to WordArray, else assume WordArray already
if (typeof data == 'string') {
data = Utf8.parse(data);
}
// Append
this._data.concat(data);
this._nDataBytes += data.sigBytes;
},
/**
* Processes available data blocks.
*
* This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype.
*
* @param {boolean} doFlush Whether all blocks and partial blocks should be processed.
*
* @return {WordArray} The processed data.
*
* @example
*
* var processedData = bufferedBlockAlgorithm._process();
* var processedData = bufferedBlockAlgorithm._process(!!'flush');
*/
_process: function (doFlush) {
var processedWords;
// Shortcuts
var data = this._data;
var dataWords = data.words;
var dataSigBytes = data.sigBytes;
var blockSize = this.blockSize;
var blockSizeBytes = blockSize * 4;
// Count blocks ready
var nBlocksReady = dataSigBytes / blockSizeBytes;
if (doFlush) {
// Round up to include partial blocks
nBlocksReady = Math.ceil(nBlocksReady);
} else {
// Round down to include only full blocks,
// less the number of blocks that must remain in the buffer
nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0);
}
// Count words ready
var nWordsReady = nBlocksReady * blockSize;
// Count bytes ready
var nBytesReady = Math.min(nWordsReady * 4, dataSigBytes);
// Process blocks
if (nWordsReady) {
for (var offset = 0; offset < nWordsReady; offset += blockSize) {
// Perform concrete-algorithm logic
this._doProcessBlock(dataWords, offset);
}
// Remove processed words
processedWords = dataWords.splice(0, nWordsReady);
data.sigBytes -= nBytesReady;
}
// Return processed words
return new WordArray.init(processedWords, nBytesReady);
},
/**
* Creates a copy of this object.
*
* @return {Object} The clone.
*
* @example
*
* var clone = bufferedBlockAlgorithm.clone();
*/
clone: function () {
var clone = Base.clone.call(this);
clone._data = this._data.clone();
return clone;
},
_minBufferSize: 0
});
/**
* Abstract hasher template.
*
* @property {number} blockSize The number of 32-bit words this hasher operates on. Default: 16 (512 bits)
*/
var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({
/**
* Configuration options.
*/
cfg: Base.extend(),
/**
* Initializes a newly created hasher.
*
* @param {Object} cfg (Optional) The configuration options to use for this hash computation.
*
* @example
*
* var hasher = CryptoJS.algo.SHA256.create();
*/
init: function (cfg) {
// Apply config defaults
this.cfg = this.cfg.extend(cfg);
// Set initial values
this.reset();
},
/**
* Resets this hasher to its initial state.
*
* @example
*
* hasher.reset();
*/
reset: function () {
// Reset data buffer
BufferedBlockAlgorithm.reset.call(this);
// Perform concrete-hasher logic
this._doReset();
},
/**
* Updates this hasher with a message.
*
* @param {WordArray|string} messageUpdate The message to append.
*
* @return {Hasher} This hasher.
*
* @example
*
* hasher.update('message');
* hasher.update(wordArray);
*/
update: function (messageUpdate) {
// Append
this._append(messageUpdate);
// Update the hash
this._process();
// Chainable
return this;
},
/**
* Finalizes the hash computation.
* Note that the finalize operation is effectively a destructive, read-once operation.
*
* @param {WordArray|string} messageUpdate (Optional) A final message update.
*
* @return {WordArray} The hash.
*
* @example
*
* var hash = hasher.finalize();
* var hash = hasher.finalize('message');
* var hash = hasher.finalize(wordArray);
*/
finalize: function (messageUpdate) {
// Final message update
if (messageUpdate) {
this._append(messageUpdate);
}
// Perform concrete-hasher logic
var hash = this._doFinalize();
return hash;
},
blockSize: 512/32,
/**
* Creates a shortcut function to a hasher's object interface.
*
* @param {Hasher} hasher The hasher to create a helper for.
*
* @return {Function} The shortcut function.
*
* @static
*
* @example
*
* var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256);
*/
_createHelper: function (hasher) {
return function (message, cfg) {
return new hasher.init(cfg).finalize(message);
};
},
/**
* Creates a shortcut function to the HMAC's object interface.
*
* @param {Hasher} hasher The hasher to use in this HMAC helper.
*
* @return {Function} The shortcut function.
*
* @static
*
* @example
*
* var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256);
*/
_createHmacHelper: function (hasher) {
return function (message, key) {
return new C_algo.HMAC.init(hasher, key).finalize(message);
};
}
});
/**
* Algorithm namespace.
*/
var C_algo = C.algo = {};
return C;
}(Math));
(function () {
// Shortcuts
var C = CryptoJS;
var C_lib = C.lib;
var WordArray = C_lib.WordArray;
var C_enc = C.enc;
/**
* Base64 encoding strategy.
*/
var Base64 = C_enc.Base64 = {
/**
* Converts a word array to a Base64 string.
*
* @param {WordArray} wordArray The word array.
*
* @return {string} The Base64 string.
*
* @static
*
* @example
*
* var base64String = CryptoJS.enc.Base64.stringify(wordArray);
*/
stringify: function (wordArray) {
// Shortcuts
var words = wordArray.words;
var sigBytes = wordArray.sigBytes;
var map = this._map;
// Clamp excess bits
wordArray.clamp();
// Convert
var base64Chars = [];
for (var i = 0; i < sigBytes; i += 3) {
var byte1 = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;
var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff;
var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff;
var triplet = (byte1 << 16) | (byte2 << 8) | byte3;
for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) {
base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f));
}
}
// Add padding
var paddingChar = map.charAt(64);
if (paddingChar) {
while (base64Chars.length % 4) {
base64Chars.push(paddingChar);
}
}
return base64Chars.join('');
},
/**
* Converts a Base64 string to a word array.
*
* @param {string} base64Str The Base64 string.
*
* @return {WordArray} The word array.
*
* @static
*
* @example
*
* var wordArray = CryptoJS.enc.Base64.parse(base64String);
*/
parse: function (base64Str) {
// Shortcuts
var base64StrLength = base64Str.length;
var map = this._map;
var reverseMap = this._reverseMap;
if (!reverseMap) {
reverseMap = this._reverseMap = [];
for (var j = 0; j < map.length; j++) {
reverseMap[map.charCodeAt(j)] = j;
}
}
// Ignore padding
var paddingChar = map.charAt(64);
if (paddingChar) {
var paddingIndex = base64Str.indexOf(paddingChar);
if (paddingIndex !== -1) {
base64StrLength = paddingIndex;
}
}
// Convert
return parseLoop(base64Str, base64StrLength, reverseMap);
},
_map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='
};
function parseLoop(base64Str, base64StrLength, reverseMap) {
var words = [];
var nBytes = 0;
for (var i = 0; i < base64StrLength; i++) {
if (i % 4) {
var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << ((i % 4) * 2);
var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> (6 - (i % 4) * 2);
var bitsCombined = bits1 | bits2;
words[nBytes >>> 2] |= bitsCombined << (24 - (nBytes % 4) * 8);
nBytes++;
}
}
return WordArray.create(words, nBytes);
}
}());
(function (Math) {
// Shortcuts
var C = CryptoJS;
var C_lib = C.lib;
var WordArray = C_lib.WordArray;
var Hasher = C_lib.Hasher;
var C_algo = C.algo;
// Constants table
var T = [];
// Compute constants
(function () {
for (var i = 0; i < 64; i++) {
T[i] = (Math.abs(Math.sin(i + 1)) * 0x100000000) | 0;
}
}());
/**
* MD5 hash algorithm.
*/
var MD5 = C_algo.MD5 = Hasher.extend({
_doReset: function () {
this._hash = new WordArray.init([
0x67452301, 0xefcdab89,
0x98badcfe, 0x10325476
]);
},
_doProcessBlock: function (M, offset) {
// Swap endian
for (var i = 0; i < 16; i++) {
// Shortcuts
var offset_i = offset + i;
var M_offset_i = M[offset_i];
M[offset_i] = (
(((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) |
(((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00)
);
}
// Shortcuts
var H = this._hash.words;
var M_offset_0 = M[offset + 0];
var M_offset_1 = M[offset + 1];
var M_offset_2 = M[offset + 2];
var M_offset_3 = M[offset + 3];
var M_offset_4 = M[offset + 4];
var M_offset_5 = M[offset + 5];
var M_offset_6 = M[offset + 6];
var M_offset_7 = M[offset + 7];
var M_offset_8 = M[offset + 8];
var M_offset_9 = M[offset + 9];
var M_offset_10 = M[offset + 10];
var M_offset_11 = M[offset + 11];
var M_offset_12 = M[offset + 12];
var M_offset_13 = M[offset + 13];
var M_offset_14 = M[offset + 14];
var M_offset_15 = M[offset + 15];
// Working varialbes
var a = H[0];
var b = H[1];
var c = H[2];
var d = H[3];
// Computation
a = FF(a, b, c, d, M_offset_0, 7, T[0]);
d = FF(d, a, b, c, M_offset_1, 12, T[1]);
c = FF(c, d, a, b, M_offset_2, 17, T[2]);
b = FF(b, c, d, a, M_offset_3, 22, T[3]);
a = FF(a, b, c, d, M_offset_4, 7, T[4]);
d = FF(d, a, b, c, M_offset_5, 12, T[5]);
c = FF(c, d, a, b, M_offset_6, 17, T[6]);
b = FF(b, c, d, a, M_offset_7, 22, T[7]);
a = FF(a, b, c, d, M_offset_8, 7, T[8]);
d = FF(d, a, b, c, M_offset_9, 12, T[9]);
c = FF(c, d, a, b, M_offset_10, 17, T[10]);
b = FF(b, c, d, a, M_offset_11, 22, T[11]);
a = FF(a, b, c, d, M_offset_12, 7, T[12]);
d = FF(d, a, b, c, M_offset_13, 12, T[13]);
c = FF(c, d, a, b, M_offset_14, 17, T[14]);
b = FF(b, c, d, a, M_offset_15, 22, T[15]);
a = GG(a, b, c, d, M_offset_1, 5, T[16]);
d = GG(d, a, b, c, M_offset_6, 9, T[17]);
c = GG(c, d, a, b, M_offset_11, 14, T[18]);
b = GG(b, c, d, a, M_offset_0, 20, T[19]);
a = GG(a, b, c, d, M_offset_5, 5, T[20]);
d = GG(d, a, b, c, M_offset_10, 9, T[21]);
c = GG(c, d, a, b, M_offset_15, 14, T[22]);
b = GG(b, c, d, a, M_offset_4, 20, T[23]);
a = GG(a, b, c, d, M_offset_9, 5, T[24]);
d = GG(d, a, b, c, M_offset_14, 9, T[25]);
c = GG(c, d, a, b, M_offset_3, 14, T[26]);
b = GG(b, c, d, a, M_offset_8, 20, T[27]);
a = GG(a, b, c, d, M_offset_13, 5, T[28]);
d = GG(d, a, b, c, M_offset_2, 9, T[29]);
c = GG(c, d, a, b, M_offset_7, 14, T[30]);
b = GG(b, c, d, a, M_offset_12, 20, T[31]);
a = HH(a, b, c, d, M_offset_5, 4, T[32]);
d = HH(d, a, b, c, M_offset_8, 11, T[33]);
c = HH(c, d, a, b, M_offset_11, 16, T[34]);
b = HH(b, c, d, a, M_offset_14, 23, T[35]);
a = HH(a, b, c, d, M_offset_1, 4, T[36]);
d = HH(d, a, b, c, M_offset_4, 11, T[37]);
c = HH(c, d, a, b, M_offset_7, 16, T[38]);
b = HH(b, c, d, a, M_offset_10, 23, T[39]);
a = HH(a, b, c, d, M_offset_13, 4, T[40]);
d = HH(d, a, b, c, M_offset_0, 11, T[41]);
c = HH(c, d, a, b, M_offset_3, 16, T[42]);
b = HH(b, c, d, a, M_offset_6, 23, T[43]);
a = HH(a, b, c, d, M_offset_9, 4, T[44]);
d = HH(d, a, b, c, M_offset_12, 11, T[45]);
c = HH(c, d, a, b, M_offset_15, 16, T[46]);
b = HH(b, c, d, a, M_offset_2, 23, T[47]);
a = II(a, b, c, d, M_offset_0, 6, T[48]);
d = II(d, a, b, c, M_offset_7, 10, T[49]);
c = II(c, d, a, b, M_offset_14, 15, T[50]);
b = II(b, c, d, a, M_offset_5, 21, T[51]);
a = II(a, b, c, d, M_offset_12, 6, T[52]);
d = II(d, a, b, c, M_offset_3, 10, T[53]);
c = II(c, d, a, b, M_offset_10, 15, T[54]);
b = II(b, c, d, a, M_offset_1, 21, T[55]);
a = II(a, b, c, d, M_offset_8, 6, T[56]);
d = II(d, a, b, c, M_offset_15, 10, T[57]);
c = II(c, d, a, b, M_offset_6, 15, T[58]);
b = II(b, c, d, a, M_offset_13, 21, T[59]);
a = II(a, b, c, d, M_offset_4, 6, T[60]);
d = II(d, a, b, c, M_offset_11, 10, T[61]);
c = II(c, d, a, b, M_offset_2, 15, T[62]);
b = II(b, c, d, a, M_offset_9, 21, T[63]);
// Intermediate hash value
H[0] = (H[0] + a) | 0;
H[1] = (H[1] + b) | 0;
H[2] = (H[2] + c) | 0;
H[3] = (H[3] + d) | 0;
},
_doFinalize: function () {
// Shortcuts
var data = this._data;
var dataWords = data.words;
var nBitsTotal = this._nDataBytes * 8;
var nBitsLeft = data.sigBytes * 8;
// Add padding
dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);
var nBitsTotalH = Math.floor(nBitsTotal / 0x100000000);
var nBitsTotalL = nBitsTotal;
dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = (
(((nBitsTotalH << 8) | (nBitsTotalH >>> 24)) & 0x00ff00ff) |
(((nBitsTotalH << 24) | (nBitsTotalH >>> 8)) & 0xff00ff00)
);
dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = (
(((nBitsTotalL << 8) | (nBitsTotalL >>> 24)) & 0x00ff00ff) |
(((nBitsTotalL << 24) | (nBitsTotalL >>> 8)) & 0xff00ff00)
);
data.sigBytes = (dataWords.length + 1) * 4;
// Hash final blocks
this._process();
// Shortcuts
var hash = this._hash;
var H = hash.words;
// Swap endian
for (var i = 0; i < 4; i++) {
// Shortcut
var H_i = H[i];
H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) |
(((H_i << 24) | (H_i >>> 8)) & 0xff00ff00);
}
// Return final computed hash
return hash;
},
clone: function () {
var clone = Hasher.clone.call(this);
clone._hash = this._hash.clone();
return clone;
}
});
function FF(a, b, c, d, x, s, t) {
var n = a + ((b & c) | (~b & d)) + x + t;
return ((n << s) | (n >>> (32 - s))) + b;
}
function GG(a, b, c, d, x, s, t) {
var n = a + ((b & d) | (c & ~d)) + x + t;
return ((n << s) | (n >>> (32 - s))) + b;
}
function HH(a, b, c, d, x, s, t) {
var n = a + (b ^ c ^ d) + x + t;
return ((n << s) | (n >>> (32 - s))) + b;
}
function II(a, b, c, d, x, s, t) {
var n = a + (c ^ (b | ~d)) + x + t;
return ((n << s) | (n >>> (32 - s))) + b;
}
/**
* Shortcut function to the hasher's object interface.
*
* @param {WordArray|string} message The message to hash.
*
* @return {WordArray} The hash.
*
* @static
*
* @example
*
* var hash = CryptoJS.MD5('message');
* var hash = CryptoJS.MD5(wordArray);
*/
C.MD5 = Hasher._createHelper(MD5);
/**
* Shortcut function to the HMAC's object interface.
*
* @param {WordArray|string} message The message to hash.
* @param {WordArray|string} key The secret key.
*
* @return {WordArray} The HMAC.
*
* @static
*
* @example
*
* var hmac = CryptoJS.HmacMD5(message, key);
*/
C.HmacMD5 = Hasher._createHmacHelper(MD5);
}(Math));
(function () {
// Shortcuts
var C = CryptoJS;
var C_lib = C.lib;
var WordArray = C_lib.WordArray;
var Hasher = C_lib.Hasher;
var C_algo = C.algo;
// Reusable object
var W = [];
/**
* SHA-1 hash algorithm.
*/
var SHA1 = C_algo.SHA1 = Hasher.extend({
_doReset: function () {
this._hash = new WordArray.init([
0x67452301, 0xefcdab89,
0x98badcfe, 0x10325476,
0xc3d2e1f0
]);
},
_doProcessBlock: function (M, offset) {
// Shortcut
var H = this._hash.words;
// Working variables
var a = H[0];
var b = H[1];
var c = H[2];
var d = H[3];
var e = H[4];
// Computation
for (var i = 0; i < 80; i++) {
if (i < 16) {
W[i] = M[offset + i] | 0;
} else {
var n = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16];
W[i] = (n << 1) | (n >>> 31);
}
var t = ((a << 5) | (a >>> 27)) + e + W[i];
if (i < 20) {
t += ((b & c) | (~b & d)) + 0x5a827999;
} else if (i < 40) {
t += (b ^ c ^ d) + 0x6ed9eba1;
} else if (i < 60) {
t += ((b & c) | (b & d) | (c & d)) - 0x70e44324;
} else /* if (i < 80) */ {
t += (b ^ c ^ d) - 0x359d3e2a;
}
e = d;
d = c;
c = (b << 30) | (b >>> 2);
b = a;
a = t;
}
// Intermediate hash value
H[0] = (H[0] + a) | 0;
H[1] = (H[1] + b) | 0;
H[2] = (H[2] + c) | 0;
H[3] = (H[3] + d) | 0;
H[4] = (H[4] + e) | 0;
},
_doFinalize: function () {
// Shortcuts
var data = this._data;
var dataWords = data.words;
var nBitsTotal = this._nDataBytes * 8;
var nBitsLeft = data.sigBytes * 8;
// Add padding
dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);
dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000);
dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal;
data.sigBytes = dataWords.length * 4;
// Hash final blocks
this._process();
// Return final computed hash
return this._hash;
},
clone: function () {
var clone = Hasher.clone.call(this);
clone._hash = this._hash.clone();
return clone;
}
});
/**
* Shortcut function to the hasher's object interface.
*
* @param {WordArray|string} message The message to hash.
*
* @return {WordArray} The hash.
*
* @static
*
* @example
*
* var hash = CryptoJS.SHA1('message');
* var hash = CryptoJS.SHA1(wordArray);
*/
C.SHA1 = Hasher._createHelper(SHA1);
/**
* Shortcut function to the HMAC's object interface.
*
* @param {WordArray|string} message The message to hash.
* @param {WordArray|string} key The secret key.
*
* @return {WordArray} The HMAC.
*
* @static
*
* @example
*
* var hmac = CryptoJS.HmacSHA1(message, key);
*/
C.HmacSHA1 = Hasher._createHmacHelper(SHA1);
}());
(function (Math) {
// Shortcuts
var C = CryptoJS;
var C_lib = C.lib;
var WordArray = C_lib.WordArray;
var Hasher = C_lib.Hasher;
var C_algo = C.algo;
// Initialization and round constants tables
var H = [];
var K = [];
// Compute constants
(function () {
function isPrime(n) {
var sqrtN = Math.sqrt(n);
for (var factor = 2; factor <= sqrtN; factor++) {
if (!(n % factor)) {
return false;
}
}
return true;
}
function getFractionalBits(n) {
return ((n - (n | 0)) * 0x100000000) | 0;
}
var n = 2;
var nPrime = 0;
while (nPrime < 64) {
if (isPrime(n)) {
if (nPrime < 8) {
H[nPrime] = getFractionalBits(Math.pow(n, 1 / 2));
}
K[nPrime] = getFractionalBits(Math.pow(n, 1 / 3));
nPrime++;
}
n++;
}
}());
// Reusable object
var W = [];
/**
* SHA-256 hash algorithm.
*/
var SHA256 = C_algo.SHA256 = Hasher.extend({
_doReset: function () {
this._hash = new WordArray.init(H.slice(0));
},
_doProcessBlock: function (M, offset) {
// Shortcut
var H = this._hash.words;
// Working variables
var a = H[0];
var b = H[1];
var c = H[2];
var d = H[3];
var e = H[4];
var f = H[5];
var g = H[6];
var h = H[7];
// Computation
for (var i = 0; i < 64; i++) {
if (i < 16) {
W[i] = M[offset + i] | 0;
} else {
var gamma0x = W[i - 15];
var gamma0 = ((gamma0x << 25) | (gamma0x >>> 7)) ^
((gamma0x << 14) | (gamma0x >>> 18)) ^
(gamma0x >>> 3);
var gamma1x = W[i - 2];
var gamma1 = ((gamma1x << 15) | (gamma1x >>> 17)) ^
((gamma1x << 13) | (gamma1x >>> 19)) ^
(gamma1x >>> 10);
W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16];
}
var ch = (e & f) ^ (~e & g);
var maj = (a & b) ^ (a & c) ^ (b & c);
var sigma0 = ((a << 30) | (a >>> 2)) ^ ((a << 19) | (a >>> 13)) ^ ((a << 10) | (a >>> 22));
var sigma1 = ((e << 26) | (e >>> 6)) ^ ((e << 21) | (e >>> 11)) ^ ((e << 7) | (e >>> 25));
var t1 = h + sigma1 + ch + K[i] + W[i];
var t2 = sigma0 + maj;
h = g;
g = f;
f = e;
e = (d + t1) | 0;
d = c;
c = b;
b = a;
a = (t1 + t2) | 0;
}
// Intermediate hash value
H[0] = (H[0] + a) | 0;
H[1] = (H[1] + b) | 0;
H[2] = (H[2] + c) | 0;
H[3] = (H[3] + d) | 0;
H[4] = (H[4] + e) | 0;
H[5] = (H[5] + f) | 0;
H[6] = (H[6] + g) | 0;
H[7] = (H[7] + h) | 0;
},
_doFinalize: function () {
// Shortcuts
var data = this._data;
var dataWords = data.words;
var nBitsTotal = this._nDataBytes * 8;
var nBitsLeft = data.sigBytes * 8;
// Add padding
dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);
dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000);
dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal;
data.sigBytes = dataWords.length * 4;
// Hash final blocks
this._process();
// Return final computed hash
return this._hash;
},
clone: function () {
var clone = Hasher.clone.call(this);
clone._hash = this._hash.clone();
return clone;
}
});
/**
* Shortcut function to the hasher's object interface.
*
* @param {WordArray|string} message The message to hash.
*
* @return {WordArray} The hash.
*
* @static
*
* @example
*
* var hash = CryptoJS.SHA256('message');
* var hash = CryptoJS.SHA256(wordArray);
*/
C.SHA256 = Hasher._createHelper(SHA256);
/**
* Shortcut function to the HMAC's object interface.
*
* @param {WordArray|string} message The message to hash.
* @param {WordArray|string} key The secret key.
*
* @return {WordArray} The HMAC.
*
* @static
*
* @example
*
* var hmac = CryptoJS.HmacSHA256(message, key);
*/
C.HmacSHA256 = Hasher._createHmacHelper(SHA256);
}(Math));
(function () {
// Shortcuts
var C = CryptoJS;
var C_lib = C.lib;
var WordArray = C_lib.WordArray;
var C_enc = C.enc;
/**
* UTF-16 BE encoding strategy.
*/
var Utf16BE = C_enc.Utf16 = C_enc.Utf16BE = {
/**
* Converts a word array to a UTF-16 BE string.
*
* @param {WordArray} wordArray The word array.
*
* @return {string} The UTF-16 BE string.
*
* @static
*
* @example
*
* var utf16String = CryptoJS.enc.Utf16.stringify(wordArray);
*/
stringify: function (wordArray) {
// Shortcuts
var words = wordArray.words;
var sigBytes = wordArray.sigBytes;
// Convert
var utf16Chars = [];
for (var i = 0; i < sigBytes; i += 2) {
var codePoint = (words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff;
utf16Chars.push(String.fromCharCode(codePoint));
}
return utf16Chars.join('');
},
/**
* Converts a UTF-16 BE string to a word array.
*
* @param {string} utf16Str The UTF-16 BE string.
*
* @return {WordArray} The word array.
*
* @static
*
* @example
*
* var wordArray = CryptoJS.enc.Utf16.parse(utf16String);
*/
parse: function (utf16Str) {
// Shortcut
var utf16StrLength = utf16Str.length;
// Convert
var words = [];
for (var i = 0; i < utf16StrLength; i++) {
words[i >>> 1] |= utf16Str.charCodeAt(i) << (16 - (i % 2) * 16);
}
return WordArray.create(words, utf16StrLength * 2);
}
};
/**
* UTF-16 LE encoding strategy.
*/
C_enc.Utf16LE = {
/**
* Converts a word array to a UTF-16 LE string.
*
* @param {WordArray} wordArray The word array.
*
* @return {string} The UTF-16 LE string.
*
* @static
*
* @example
*
* var utf16Str = CryptoJS.enc.Utf16LE.stringify(wordArray);
*/
stringify: function (wordArray) {
// Shortcuts
var words = wordArray.words;
var sigBytes = wordArray.sigBytes;
// Convert
var utf16Chars = [];
for (var i = 0; i < sigBytes; i += 2) {
var codePoint = swapEndian((words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff);
utf16Chars.push(String.fromCharCode(codePoint));
}
return utf16Chars.join('');
},
/**
* Converts a UTF-16 LE string to a word array.
*
* @param {string} utf16Str The UTF-16 LE string.
*
* @return {WordArray} The word array.
*
* @static
*
* @example
*
* var wordArray = CryptoJS.enc.Utf16LE.parse(utf16Str);
*/
parse: function (utf16Str) {
// Shortcut
var utf16StrLength = utf16Str.length;
// Convert
var words = [];
for (var i = 0; i < utf16StrLength; i++) {
words[i >>> 1] |= swapEndian(utf16Str.charCodeAt(i) << (16 - (i % 2) * 16));
}
return WordArray.create(words, utf16StrLength * 2);
}
};
function swapEndian(word) {
return ((word << 8) & 0xff00ff00) | ((word >>> 8) & 0x00ff00ff);
}
}());
(function () {
// Check if typed arrays are supported
if (typeof ArrayBuffer != 'function') {
return;
}
// Shortcuts
var C = CryptoJS;
var C_lib = C.lib;
var WordArray = C_lib.WordArray;
// Reference original init
var superInit = WordArray.init;
// Augment WordArray.init to handle typed arrays
var subInit = WordArray.init = function (typedArray) {
// Convert buffers to uint8
if (typedArray instanceof ArrayBuffer) {
typedArray = new Uint8Array(typedArray);
}
// Convert other array views to uint8
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
) {
typedArray = new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength);
}
// Handle Uint8Array
if (typedArray instanceof Uint8Array) {
// Shortcut
var typedArrayByteLength = typedArray.byteLength;
// Extract bytes
var words = [];
for (var i = 0; i < typedArrayByteLength; i++) {
words[i >>> 2] |= typedArray[i] << (24 - (i % 4) * 8);
}
// Initialize this word array
superInit.call(this, words, typedArrayByteLength);
} else {
// Else call normal init
superInit.apply(this, arguments);
}
};
subInit.prototype = WordArray;
}());
/** @preserve
(c) 2012 by Cédric Mesnil. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- 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.
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.
*/
(function (Math) {
// Shortcuts
var C = CryptoJS;
var C_lib = C.lib;
var WordArray = C_lib.WordArray;
var Hasher = C_lib.Hasher;
var C_algo = C.algo;
// Constants table
var _zl = WordArray.create([
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8,
3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12,
1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2,
4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]);
var _zr = WordArray.create([
5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12,
6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2,
15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13,
8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14,
12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]);
var _sl = WordArray.create([
11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8,
7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12,
11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5,
11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12,
9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6 ]);
var _sr = WordArray.create([
8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6,
9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11,
9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5,
15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8,
8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11 ]);
var _hl = WordArray.create([ 0x00000000, 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xA953FD4E]);
var _hr = WordArray.create([ 0x50A28BE6, 0x5C4DD124, 0x6D703EF3, 0x7A6D76E9, 0x00000000]);
/**
* RIPEMD160 hash algorithm.
*/
var RIPEMD160 = C_algo.RIPEMD160 = Hasher.extend({
_doReset: function () {
this._hash = WordArray.create([0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0]);
},
_doProcessBlock: function (M, offset) {
// Swap endian
for (var i = 0; i < 16; i++) {
// Shortcuts
var offset_i = offset + i;
var M_offset_i = M[offset_i];
// Swap
M[offset_i] = (
(((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) |
(((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00)
);
}
// Shortcut
var H = this._hash.words;
var hl = _hl.words;
var hr = _hr.words;
var zl = _zl.words;
var zr = _zr.words;
var sl = _sl.words;
var sr = _sr.words;
// Working variables
var al, bl, cl, dl, el;
var ar, br, cr, dr, er;
ar = al = H[0];
br = bl = H[1];
cr = cl = H[2];
dr = dl = H[3];
er = el = H[4];
// Computation
var t;
for (var i = 0; i < 80; i += 1) {
t = (al + M[offset+zl[i]])|0;
if (i<16){
t += f1(bl,cl,dl) + hl[0];
} else if (i<32) {
t += f2(bl,cl,dl) + hl[1];
} else if (i<48) {
t += f3(bl,cl,dl) + hl[2];
} else if (i<64) {
t += f4(bl,cl,dl) + hl[3];
} else {// if (i<80) {
t += f5(bl,cl,dl) + hl[4];
}
t = t|0;
t = rotl(t,sl[i]);
t = (t+el)|0;
al = el;
el = dl;
dl = rotl(cl, 10);
cl = bl;
bl = t;
t = (ar + M[offset+zr[i]])|0;
if (i<16){
t += f5(br,cr,dr) + hr[0];
} else if (i<32) {
t += f4(br,cr,dr) + hr[1];
} else if (i<48) {
t += f3(br,cr,dr) + hr[2];
} else if (i<64) {
t += f2(br,cr,dr) + hr[3];
} else {// if (i<80) {
t += f1(br,cr,dr) + hr[4];
}
t = t|0;
t = rotl(t,sr[i]) ;
t = (t+er)|0;
ar = er;
er = dr;
dr = rotl(cr, 10);
cr = br;
br = t;
}
// Intermediate hash value
t = (H[1] + cl + dr)|0;
H[1] = (H[2] + dl + er)|0;
H[2] = (H[3] + el + ar)|0;
H[3] = (H[4] + al + br)|0;
H[4] = (H[0] + bl + cr)|0;
H[0] = t;
},
_doFinalize: function () {
// Shortcuts
var data = this._data;
var dataWords = data.words;
var nBitsTotal = this._nDataBytes * 8;
var nBitsLeft = data.sigBytes * 8;
// Add padding
dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);
dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = (
(((nBitsTotal << 8) | (nBitsTotal >>> 24)) & 0x00ff00ff) |
(((nBitsTotal << 24) | (nBitsTotal >>> 8)) & 0xff00ff00)
);
data.sigBytes = (dataWords.length + 1) * 4;
// Hash final blocks
this._process();
// Shortcuts
var hash = this._hash;
var H = hash.words;
// Swap endian
for (var i = 0; i < 5; i++) {
// Shortcut
var H_i = H[i];
// Swap
H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) |
(((H_i << 24) | (H_i >>> 8)) & 0xff00ff00);
}
// Return final computed hash
return hash;
},
clone: function () {
var clone = Hasher.clone.call(this);
clone._hash = this._hash.clone();
return clone;
}
});
function f1(x, y, z) {
return ((x) ^ (y) ^ (z));
}
function f2(x, y, z) {
return (((x)&(y)) | ((~x)&(z)));
}
function f3(x, y, z) {
return (((x) | (~(y))) ^ (z));
}
function f4(x, y, z) {
return (((x) & (z)) | ((y)&(~(z))));
}
function f5(x, y, z) {
return ((x) ^ ((y) |(~(z))));
}
function rotl(x,n) {
return (x<<n) | (x>>>(32-n));
}
/**
* Shortcut function to the hasher's object interface.
*
* @param {WordArray|string} message The message to hash.
*
* @return {WordArray} The hash.
*
* @static
*
* @example
*
* var hash = CryptoJS.RIPEMD160('message');
* var hash = CryptoJS.RIPEMD160(wordArray);
*/
C.RIPEMD160 = Hasher._createHelper(RIPEMD160);
/**
* Shortcut function to the HMAC's object interface.
*
* @param {WordArray|string} message The message to hash.
* @param {WordArray|string} key The secret key.
*
* @return {WordArray} The HMAC.
*
* @static
*
* @example
*
* var hmac = CryptoJS.HmacRIPEMD160(message, key);
*/
C.HmacRIPEMD160 = Hasher._createHmacHelper(RIPEMD160);
}(Math));
(function () {
// Shortcuts
var C = CryptoJS;
var C_lib = C.lib;
var Base = C_lib.Base;
var C_enc = C.enc;
var Utf8 = C_enc.Utf8;
var C_algo = C.algo;
/**
* HMAC algorithm.
*/
var HMAC = C_algo.HMAC = Base.extend({
/**
* Initializes a newly created HMAC.
*
* @param {Hasher} hasher The hash algorithm to use.
* @param {WordArray|string} key The secret key.
*
* @example
*
* var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key);
*/
init: function (hasher, key) {
// Init hasher
hasher = this._hasher = new hasher.init();
// Convert string to WordArray, else assume WordArray already
if (typeof key == 'string') {
key = Utf8.parse(key);
}
// Shortcuts
var hasherBlockSize = hasher.blockSize;
var hasherBlockSizeBytes = hasherBlockSize * 4;
// Allow arbitrary length keys
if (key.sigBytes > hasherBlockSizeBytes) {
key = hasher.finalize(key);
}
// Clamp excess bits
key.clamp();
// Clone key for inner and outer pads
var oKey = this._oKey = key.clone();
var iKey = this._iKey = key.clone();
// Shortcuts
var oKeyWords = oKey.words;
var iKeyWords = iKey.words;
// XOR keys with pad constants
for (var i = 0; i < hasherBlockSize; i++) {
oKeyWords[i] ^= 0x5c5c5c5c;
iKeyWords[i] ^= 0x36363636;
}
oKey.sigBytes = iKey.sigBytes = hasherBlockSizeBytes;
// Set initial values
this.reset();
},
/**
* Resets this HMAC to its initial state.
*
* @example
*
* hmacHasher.reset();
*/
reset: function () {
// Shortcut
var hasher = this._hasher;
// Reset
hasher.reset();
hasher.update(this._iKey);
},
/**
* Updates this HMAC with a message.
*
* @param {WordArray|string} messageUpdate The message to append.
*
* @return {HMAC} This HMAC instance.
*
* @example
*
* hmacHasher.update('message');
* hmacHasher.update(wordArray);
*/
update: function (messageUpdate) {
this._hasher.update(messageUpdate);
// Chainable
return this;
},
/**
* Finalizes the HMAC computation.
* Note that the finalize operation is effectively a destructive, read-once operation.
*
* @param {WordArray|string} messageUpdate (Optional) A final message update.
*
* @return {WordArray} The HMAC.
*
* @example
*
* var hmac = hmacHasher.finalize();
* var hmac = hmacHasher.finalize('message');
* var hmac = hmacHasher.finalize(wordArray);
*/
finalize: function (messageUpdate) {
// Shortcut
var hasher = this._hasher;
// Compute HMAC
var innerHash = hasher.finalize(messageUpdate);
hasher.reset();
var hmac = hasher.finalize(this._oKey.clone().concat(innerHash));
return hmac;
}
});
}());
(function () {
// Shortcuts
var C = CryptoJS;
var C_lib = C.lib;
var Base = C_lib.Base;
var WordArray = C_lib.WordArray;
var C_algo = C.algo;
var SHA1 = C_algo.SHA1;
var HMAC = C_algo.HMAC;
/**
* Password-Based Key Derivation Function 2 algorithm.
*/
var PBKDF2 = C_algo.PBKDF2 = Base.extend({
/**
* Configuration options.
*
* @property {number} keySize The key size in words to generate. Default: 4 (128 bits)
* @property {Hasher} hasher The hasher to use. Default: SHA1
* @property {number} iterations The number of iterations to perform. Default: 1
*/
cfg: Base.extend({
keySize: 128/32,
hasher: SHA1,
iterations: 1
}),
/**
* Initializes a newly created key derivation function.
*
* @param {Object} cfg (Optional) The configuration options to use for the derivation.
*
* @example
*
* var kdf = CryptoJS.algo.PBKDF2.create();
* var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8 });
* var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8, iterations: 1000 });
*/
init: function (cfg) {
this.cfg = this.cfg.extend(cfg);
},
/**
* Computes the Password-Based Key Derivation Function 2.
*
* @param {WordArray|string} password The password.
* @param {WordArray|string} salt A salt.
*
* @return {WordArray} The derived key.
*
* @example
*
* var key = kdf.compute(password, salt);
*/
compute: function (password, salt) {
// Shortcut
var cfg = this.cfg;
// Init HMAC
var hmac = HMAC.create(cfg.hasher, password);
// Initial values
var derivedKey = WordArray.create();
var blockIndex = WordArray.create([0x00000001]);
// Shortcuts
var derivedKeyWords = derivedKey.words;
var blockIndexWords = blockIndex.words;
var keySize = cfg.keySize;
var iterations = cfg.iterations;
// Generate key
while (derivedKeyWords.length < keySize) {
var block = hmac.update(salt).finalize(blockIndex);
hmac.reset();
// Shortcuts
var blockWords = block.words;
var blockWordsLength = blockWords.length;
// Iterations
var intermediate = block;
for (var i = 1; i < iterations; i++) {
intermediate = hmac.finalize(intermediate);
hmac.reset();
// Shortcut
var intermediateWords = intermediate.words;
// XOR intermediate with block
for (var j = 0; j < blockWordsLength; j++) {
blockWords[j] ^= intermediateWords[j];
}
}
derivedKey.concat(block);
blockIndexWords[0]++;
}
derivedKey.sigBytes = keySize * 4;
return derivedKey;
}
});
/**
* Computes the Password-Based Key Derivation Function 2.
*
* @param {WordArray|string} password The password.
* @param {WordArray|string} salt A salt.
* @param {Object} cfg (Optional) The configuration options to use for this computation.
*
* @return {WordArray} The derived key.
*
* @static
*
* @example
*
* var key = CryptoJS.PBKDF2(password, salt);
* var key = CryptoJS.PBKDF2(password, salt, { keySize: 8 });
* var key = CryptoJS.PBKDF2(password, salt, { keySize: 8, iterations: 1000 });
*/
C.PBKDF2 = function (password, salt, cfg) {
return PBKDF2.create(cfg).compute(password, salt);
};
}());
(function () {
// Shortcuts
var C = CryptoJS;
var C_lib = C.lib;
var Base = C_lib.Base;
var WordArray = C_lib.WordArray;
var C_algo = C.algo;
var MD5 = C_algo.MD5;
/**
* This key derivation function is meant to conform with EVP_BytesToKey.
* www.openssl.org/docs/crypto/EVP_BytesToKey.html
*/
var EvpKDF = C_algo.EvpKDF = Base.extend({
/**
* Configuration options.
*
* @property {number} keySize The key size in words to generate. Default: 4 (128 bits)
* @property {Hasher} hasher The hash algorithm to use. Default: MD5
* @property {number} iterations The number of iterations to perform. Default: 1
*/
cfg: Base.extend({
keySize: 128/32,
hasher: MD5,
iterations: 1
}),
/**
* Initializes a newly created key derivation function.
*
* @param {Object} cfg (Optional) The configuration options to use for the derivation.
*
* @example
*
* var kdf = CryptoJS.algo.EvpKDF.create();
* var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8 });
* var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8, iterations: 1000 });
*/
init: function (cfg) {
this.cfg = this.cfg.extend(cfg);
},
/**
* Derives a key from a password.
*
* @param {WordArray|string} password The password.
* @param {WordArray|string} salt A salt.
*
* @return {WordArray} The derived key.
*
* @example
*
* var key = kdf.compute(password, salt);
*/
compute: function (password, salt) {
var block;
// Shortcut
var cfg = this.cfg;
// Init hasher
var hasher = cfg.hasher.create();
// Initial values
var derivedKey = WordArray.create();
// Shortcuts
var derivedKeyWords = derivedKey.words;
var keySize = cfg.keySize;
var iterations = cfg.iterations;
// Generate key
while (derivedKeyWords.length < keySize) {
if (block) {
hasher.update(block);
}
block = hasher.update(password).finalize(salt);
hasher.reset();
// Iterations
for (var i = 1; i < iterations; i++) {
block = hasher.finalize(block);
hasher.reset();
}
derivedKey.concat(block);
}
derivedKey.sigBytes = keySize * 4;
return derivedKey;
}
});
/**
* Derives a key from a password.
*
* @param {WordArray|string} password The password.
* @param {WordArray|string} salt A salt.
* @param {Object} cfg (Optional) The configuration options to use for this computation.
*
* @return {WordArray} The derived key.
*
* @static
*
* @example
*
* var key = CryptoJS.EvpKDF(password, salt);
* var key = CryptoJS.EvpKDF(password, salt, { keySize: 8 });
* var key = CryptoJS.EvpKDF(password, salt, { keySize: 8, iterations: 1000 });
*/
C.EvpKDF = function (password, salt, cfg) {
return EvpKDF.create(cfg).compute(password, salt);
};
}());
(function () {
// Shortcuts
var C = CryptoJS;
var C_lib = C.lib;
var WordArray = C_lib.WordArray;
var C_algo = C.algo;
var SHA256 = C_algo.SHA256;
/**
* SHA-224 hash algorithm.
*/
var SHA224 = C_algo.SHA224 = SHA256.extend({
_doReset: function () {
this._hash = new WordArray.init([
0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939,
0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4
]);
},
_doFinalize: function () {
var hash = SHA256._doFinalize.call(this);
hash.sigBytes -= 4;
return hash;
}
});
/**
* Shortcut function to the hasher's object interface.
*
* @param {WordArray|string} message The message to hash.
*
* @return {WordArray} The hash.
*
* @static
*
* @example
*
* var hash = CryptoJS.SHA224('message');
* var hash = CryptoJS.SHA224(wordArray);
*/
C.SHA224 = SHA256._createHelper(SHA224);
/**
* Shortcut function to the HMAC's object interface.
*
* @param {WordArray|string} message The message to hash.
* @param {WordArray|string} key The secret key.
*
* @return {WordArray} The HMAC.
*
* @static
*
* @example
*
* var hmac = CryptoJS.HmacSHA224(message, key);
*/
C.HmacSHA224 = SHA256._createHmacHelper(SHA224);
}());
(function (undefined) {
// Shortcuts
var C = CryptoJS;
var C_lib = C.lib;
var Base = C_lib.Base;
var X32WordArray = C_lib.WordArray;
/**
* x64 namespace.
*/
var C_x64 = C.x64 = {};
/**
* A 64-bit word.
*/
var X64Word = C_x64.Word = Base.extend({
/**
* Initializes a newly created 64-bit word.
*
* @param {number} high The high 32 bits.
* @param {number} low The low 32 bits.
*
* @example
*
* var x64Word = CryptoJS.x64.Word.create(0x00010203, 0x04050607);
*/
init: function (high, low) {
this.high = high;
this.low = low;
}
/**
* Bitwise NOTs this word.
*
* @return {X64Word} A new x64-Word object after negating.
*
* @example
*
* var negated = x64Word.not();
*/
// not: function () {
// var high = ~this.high;
// var low = ~this.low;
// return X64Word.create(high, low);
// },
/**
* Bitwise ANDs this word with the passed word.
*
* @param {X64Word} word The x64-Word to AND with this word.
*
* @return {X64Word} A new x64-Word object after ANDing.
*
* @example
*
* var anded = x64Word.and(anotherX64Word);
*/
// and: function (word) {
// var high = this.high & word.high;
// var low = this.low & word.low;
// return X64Word.create(high, low);
// },
/**
* Bitwise ORs this word with the passed word.
*
* @param {X64Word} word The x64-Word to OR with this word.
*
* @return {X64Word} A new x64-Word object after ORing.
*
* @example
*
* var ored = x64Word.or(anotherX64Word);
*/
// or: function (word) {
// var high = this.high | word.high;
// var low = this.low | word.low;
// return X64Word.create(high, low);
// },
/**
* Bitwise XORs this word with the passed word.
*
* @param {X64Word} word The x64-Word to XOR with this word.
*
* @return {X64Word} A new x64-Word object after XORing.
*
* @example
*
* var xored = x64Word.xor(anotherX64Word);
*/
// xor: function (word) {
// var high = this.high ^ word.high;
// var low = this.low ^ word.low;
// return X64Word.create(high, low);
// },
/**
* Shifts this word n bits to the left.
*
* @param {number} n The number of bits to shift.
*
* @return {X64Word} A new x64-Word object after shifting.
*
* @example
*
* var shifted = x64Word.shiftL(25);
*/
// shiftL: function (n) {
// if (n < 32) {
// var high = (this.high << n) | (this.low >>> (32 - n));
// var low = this.low << n;
// } else {
// var high = this.low << (n - 32);
// var low = 0;
// }
// return X64Word.create(high, low);
// },
/**
* Shifts this word n bits to the right.
*
* @param {number} n The number of bits to shift.
*
* @return {X64Word} A new x64-Word object after shifting.
*
* @example
*
* var shifted = x64Word.shiftR(7);
*/
// shiftR: function (n) {
// if (n < 32) {
// var low = (this.low >>> n) | (this.high << (32 - n));
// var high = this.high >>> n;
// } else {
// var low = this.high >>> (n - 32);
// var high = 0;
// }
// return X64Word.create(high, low);
// },
/**
* Rotates this word n bits to the left.
*
* @param {number} n The number of bits to rotate.
*
* @return {X64Word} A new x64-Word object after rotating.
*
* @example
*
* var rotated = x64Word.rotL(25);
*/
// rotL: function (n) {
// return this.shiftL(n).or(this.shiftR(64 - n));
// },
/**
* Rotates this word n bits to the right.
*
* @param {number} n The number of bits to rotate.
*
* @return {X64Word} A new x64-Word object after rotating.
*
* @example
*
* var rotated = x64Word.rotR(7);
*/
// rotR: function (n) {
// return this.shiftR(n).or(this.shiftL(64 - n));
// },
/**
* Adds this word with the passed word.
*
* @param {X64Word} word The x64-Word to add with this word.
*
* @return {X64Word} A new x64-Word object after adding.
*
* @example
*
* var added = x64Word.add(anotherX64Word);
*/
// add: function (word) {
// var low = (this.low + word.low) | 0;
// var carry = (low >>> 0) < (this.low >>> 0) ? 1 : 0;
// var high = (this.high + word.high + carry) | 0;
// return X64Word.create(high, low);
// }
});
/**
* An array of 64-bit words.
*
* @property {Array} words The array of CryptoJS.x64.Word objects.
* @property {number} sigBytes The number of significant bytes in this word array.
*/
var X64WordArray = C_x64.WordArray = Base.extend({
/**
* Initializes a newly created word array.
*
* @param {Array} words (Optional) An array of CryptoJS.x64.Word objects.
* @param {number} sigBytes (Optional) The number of significant bytes in the words.
*
* @example
*
* var wordArray = CryptoJS.x64.WordArray.create();
*
* var wordArray = CryptoJS.x64.WordArray.create([
* CryptoJS.x64.Word.create(0x00010203, 0x04050607),
* CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f)
* ]);
*
* var wordArray = CryptoJS.x64.WordArray.create([
* CryptoJS.x64.Word.create(0x00010203, 0x04050607),
* CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f)
* ], 10);
*/
init: function (words, sigBytes) {
words = this.words = words || [];
if (sigBytes != undefined) {
this.sigBytes = sigBytes;
} else {
this.sigBytes = words.length * 8;
}
},
/**
* Converts this 64-bit word array to a 32-bit word array.
*
* @return {CryptoJS.lib.WordArray} This word array's data as a 32-bit word array.
*
* @example
*
* var x32WordArray = x64WordArray.toX32();
*/
toX32: function () {
// Shortcuts
var x64Words = this.words;
var x64WordsLength = x64Words.length;
// Convert
var x32Words = [];
for (var i = 0; i < x64WordsLength; i++) {
var x64Word = x64Words[i];
x32Words.push(x64Word.high);
x32Words.push(x64Word.low);
}
return X32WordArray.create(x32Words, this.sigBytes);
},
/**
* Creates a copy of this word array.
*
* @return {X64WordArray} The clone.
*
* @example
*
* var clone = x64WordArray.clone();
*/
clone: function () {
var clone = Base.clone.call(this);
// Clone "words" array
var words = clone.words = this.words.slice(0);
// Clone each X64Word object
var wordsLength = words.length;
for (var i = 0; i < wordsLength; i++) {
words[i] = words[i].clone();
}
return clone;
}
});
}());
(function (Math) {
// Shortcuts
var C = CryptoJS;
var C_lib = C.lib;
var WordArray = C_lib.WordArray;
var Hasher = C_lib.Hasher;
var C_x64 = C.x64;
var X64Word = C_x64.Word;
var C_algo = C.algo;
// Constants tables
var RHO_OFFSETS = [];
var PI_INDEXES = [];
var ROUND_CONSTANTS = [];
// Compute Constants
(function () {
// Compute rho offset constants
var x = 1, y = 0;
for (var t = 0; t < 24; t++) {
RHO_OFFSETS[x + 5 * y] = ((t + 1) * (t + 2) / 2) % 64;
var newX = y % 5;
var newY = (2 * x + 3 * y) % 5;
x = newX;
y = newY;
}
// Compute pi index constants
for (var x = 0; x < 5; x++) {
for (var y = 0; y < 5; y++) {
PI_INDEXES[x + 5 * y] = y + ((2 * x + 3 * y) % 5) * 5;
}
}
// Compute round constants
var LFSR = 0x01;
for (var i = 0; i < 24; i++) {
var roundConstantMsw = 0;
var roundConstantLsw = 0;
for (var j = 0; j < 7; j++) {
if (LFSR & 0x01) {
var bitPosition = (1 << j) - 1;
if (bitPosition < 32) {
roundConstantLsw ^= 1 << bitPosition;
} else /* if (bitPosition >= 32) */ {
roundConstantMsw ^= 1 << (bitPosition - 32);
}
}
// Compute next LFSR
if (LFSR & 0x80) {
// Primitive polynomial over GF(2): x^8 + x^6 + x^5 + x^4 + 1
LFSR = (LFSR << 1) ^ 0x71;
} else {
LFSR <<= 1;
}
}
ROUND_CONSTANTS[i] = X64Word.create(roundConstantMsw, roundConstantLsw);
}
}());
// Reusable objects for temporary values
var T = [];
(function () {
for (var i = 0; i < 25; i++) {
T[i] = X64Word.create();
}
}());
/**
* SHA-3 hash algorithm.
*/
var SHA3 = C_algo.SHA3 = Hasher.extend({
/**
* Configuration options.
*
* @property {number} outputLength
* The desired number of bits in the output hash.
* Only values permitted are: 224, 256, 384, 512.
* Default: 512
*/
cfg: Hasher.cfg.extend({
outputLength: 512
}),
_doReset: function () {
var state = this._state = []
for (var i = 0; i < 25; i++) {
state[i] = new X64Word.init();
}
this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32;
},
_doProcessBlock: function (M, offset) {
// Shortcuts
var state = this._state;
var nBlockSizeLanes = this.blockSize / 2;
// Absorb
for (var i = 0; i < nBlockSizeLanes; i++) {
// Shortcuts
var M2i = M[offset + 2 * i];
var M2i1 = M[offset + 2 * i + 1];
// Swap endian
M2i = (
(((M2i << 8) | (M2i >>> 24)) & 0x00ff00ff) |
(((M2i << 24) | (M2i >>> 8)) & 0xff00ff00)
);
M2i1 = (
(((M2i1 << 8) | (M2i1 >>> 24)) & 0x00ff00ff) |
(((M2i1 << 24) | (M2i1 >>> 8)) & 0xff00ff00)
);
// Absorb message into state
var lane = state[i];
lane.high ^= M2i1;
lane.low ^= M2i;
}
// Rounds
for (var round = 0; round < 24; round++) {
// Theta
for (var x = 0; x < 5; x++) {
// Mix column lanes
var tMsw = 0, tLsw = 0;
for (var y = 0; y < 5; y++) {
var lane = state[x + 5 * y];
tMsw ^= lane.high;
tLsw ^= lane.low;
}
// Temporary values
var Tx = T[x];
Tx.high = tMsw;
Tx.low = tLsw;
}
for (var x = 0; x < 5; x++) {
// Shortcuts
var Tx4 = T[(x + 4) % 5];
var Tx1 = T[(x + 1) % 5];
var Tx1Msw = Tx1.high;
var Tx1Lsw = Tx1.low;
// Mix surrounding columns
var tMsw = Tx4.high ^ ((Tx1Msw << 1) | (Tx1Lsw >>> 31));
var tLsw = Tx4.low ^ ((Tx1Lsw << 1) | (Tx1Msw >>> 31));
for (var y = 0; y < 5; y++) {
var lane = state[x + 5 * y];
lane.high ^= tMsw;
lane.low ^= tLsw;
}
}
// Rho Pi
for (var laneIndex = 1; laneIndex < 25; laneIndex++) {
var tMsw;
var tLsw;
// Shortcuts
var lane = state[laneIndex];
var laneMsw = lane.high;
var laneLsw = lane.low;
var rhoOffset = RHO_OFFSETS[laneIndex];
// Rotate lanes
if (rhoOffset < 32) {
tMsw = (laneMsw << rhoOffset) | (laneLsw >>> (32 - rhoOffset));
tLsw = (laneLsw << rhoOffset) | (laneMsw >>> (32 - rhoOffset));
} else /* if (rhoOffset >= 32) */ {
tMsw = (laneLsw << (rhoOffset - 32)) | (laneMsw >>> (64 - rhoOffset));
tLsw = (laneMsw << (rhoOffset - 32)) | (laneLsw >>> (64 - rhoOffset));
}
// Transpose lanes
var TPiLane = T[PI_INDEXES[laneIndex]];
TPiLane.high = tMsw;
TPiLane.low = tLsw;
}
// Rho pi at x = y = 0
var T0 = T[0];
var state0 = state[0];
T0.high = state0.high;
T0.low = state0.low;
// Chi
for (var x = 0; x < 5; x++) {
for (var y = 0; y < 5; y++) {
// Shortcuts
var laneIndex = x + 5 * y;
var lane = state[laneIndex];
var TLane = T[laneIndex];
var Tx1Lane = T[((x + 1) % 5) + 5 * y];
var Tx2Lane = T[((x + 2) % 5) + 5 * y];
// Mix rows
lane.high = TLane.high ^ (~Tx1Lane.high & Tx2Lane.high);
lane.low = TLane.low ^ (~Tx1Lane.low & Tx2Lane.low);
}
}
// Iota
var lane = state[0];
var roundConstant = ROUND_CONSTANTS[round];
lane.high ^= roundConstant.high;
lane.low ^= roundConstant.low;
}
},
_doFinalize: function () {
// Shortcuts
var data = this._data;
var dataWords = data.words;
var nBitsTotal = this._nDataBytes * 8;
var nBitsLeft = data.sigBytes * 8;
var blockSizeBits = this.blockSize * 32;
// Add padding
dataWords[nBitsLeft >>> 5] |= 0x1 << (24 - nBitsLeft % 32);
dataWords[((Math.ceil((nBitsLeft + 1) / blockSizeBits) * blockSizeBits) >>> 5) - 1] |= 0x80;
data.sigBytes = dataWords.length * 4;
// Hash final blocks
this._process();
// Shortcuts
var state = this._state;
var outputLengthBytes = this.cfg.outputLength / 8;
var outputLengthLanes = outputLengthBytes / 8;
// Squeeze
var hashWords = [];
for (var i = 0; i < outputLengthLanes; i++) {
// Shortcuts
var lane = state[i];
var laneMsw = lane.high;
var laneLsw = lane.low;
// Swap endian
laneMsw = (
(((laneMsw << 8) | (laneMsw >>> 24)) & 0x00ff00ff) |
(((laneMsw << 24) | (laneMsw >>> 8)) & 0xff00ff00)
);
laneLsw = (
(((laneLsw << 8) | (laneLsw >>> 24)) & 0x00ff00ff) |
(((laneLsw << 24) | (laneLsw >>> 8)) & 0xff00ff00)
);
// Squeeze state to retrieve hash
hashWords.push(laneLsw);
hashWords.push(laneMsw);
}
// Return final computed hash
return new WordArray.init(hashWords, outputLengthBytes);
},
clone: function () {
var clone = Hasher.clone.call(this);
var state = clone._state = this._state.slice(0);
for (var i = 0; i < 25; i++) {
state[i] = state[i].clone();
}
return clone;
}
});
/**
* Shortcut function to the hasher's object interface.
*
* @param {WordArray|string} message The message to hash.
*
* @return {WordArray} The hash.
*
* @static
*
* @example
*
* var hash = CryptoJS.SHA3('message');
* var hash = CryptoJS.SHA3(wordArray);
*/
C.SHA3 = Hasher._createHelper(SHA3);
/**
* Shortcut function to the HMAC's object interface.
*
* @param {WordArray|string} message The message to hash.
* @param {WordArray|string} key The secret key.
*
* @return {WordArray} The HMAC.
*
* @static
*
* @example
*
* var hmac = CryptoJS.HmacSHA3(message, key);
*/
C.HmacSHA3 = Hasher._createHmacHelper(SHA3);
}(Math));
(function () {
// Shortcuts
var C = CryptoJS;
var C_lib = C.lib;
var Hasher = C_lib.Hasher;
var C_x64 = C.x64;
var X64Word = C_x64.Word;
var X64WordArray = C_x64.WordArray;
var C_algo = C.algo;
function X64Word_create() {
return X64Word.create.apply(X64Word, arguments);
}
// Constants
var K = [
X64Word_create(0x428a2f98, 0xd728ae22), X64Word_create(0x71374491, 0x23ef65cd),
X64Word_create(0xb5c0fbcf, 0xec4d3b2f), X64Word_create(0xe9b5dba5, 0x8189dbbc),
X64Word_create(0x3956c25b, 0xf348b538), X64Word_create(0x59f111f1, 0xb605d019),
X64Word_create(0x923f82a4, 0xaf194f9b), X64Word_create(0xab1c5ed5, 0xda6d8118),
X64Word_create(0xd807aa98, 0xa3030242), X64Word_create(0x12835b01, 0x45706fbe),
X64Word_create(0x243185be, 0x4ee4b28c), X64Word_create(0x550c7dc3, 0xd5ffb4e2),
X64Word_create(0x72be5d74, 0xf27b896f), X64Word_create(0x80deb1fe, 0x3b1696b1),
X64Word_create(0x9bdc06a7, 0x25c71235), X64Word_create(0xc19bf174, 0xcf692694),
X64Word_create(0xe49b69c1, 0x9ef14ad2), X64Word_create(0xefbe4786, 0x384f25e3),
X64Word_create(0x0fc19dc6, 0x8b8cd5b5), X64Word_create(0x240ca1cc, 0x77ac9c65),
X64Word_create(0x2de92c6f, 0x592b0275), X64Word_create(0x4a7484aa, 0x6ea6e483),
X64Word_create(0x5cb0a9dc, 0xbd41fbd4), X64Word_create(0x76f988da, 0x831153b5),
X64Word_create(0x983e5152, 0xee66dfab), X64Word_create(0xa831c66d, 0x2db43210),
X64Word_create(0xb00327c8, 0x98fb213f), X64Word_create(0xbf597fc7, 0xbeef0ee4),
X64Word_create(0xc6e00bf3, 0x3da88fc2), X64Word_create(0xd5a79147, 0x930aa725),
X64Word_create(0x06ca6351, 0xe003826f), X64Word_create(0x14292967, 0x0a0e6e70),
X64Word_create(0x27b70a85, 0x46d22ffc), X64Word_create(0x2e1b2138, 0x5c26c926),
X64Word_create(0x4d2c6dfc, 0x5ac42aed), X64Word_create(0x53380d13, 0x9d95b3df),
X64Word_create(0x650a7354, 0x8baf63de), X64Word_create(0x766a0abb, 0x3c77b2a8),
X64Word_create(0x81c2c92e, 0x47edaee6), X64Word_create(0x92722c85, 0x1482353b),
X64Word_create(0xa2bfe8a1, 0x4cf10364), X64Word_create(0xa81a664b, 0xbc423001),
X64Word_create(0xc24b8b70, 0xd0f89791), X64Word_create(0xc76c51a3, 0x0654be30),
X64Word_create(0xd192e819, 0xd6ef5218), X64Word_create(0xd6990624, 0x5565a910),
X64Word_create(0xf40e3585, 0x5771202a), X64Word_create(0x106aa070, 0x32bbd1b8),
X64Word_create(0x19a4c116, 0xb8d2d0c8), X64Word_create(0x1e376c08, 0x5141ab53),
X64Word_create(0x2748774c, 0xdf8eeb99), X64Word_create(0x34b0bcb5, 0xe19b48a8),
X64Word_create(0x391c0cb3, 0xc5c95a63), X64Word_create(0x4ed8aa4a, 0xe3418acb),
X64Word_create(0x5b9cca4f, 0x7763e373), X64Word_create(0x682e6ff3, 0xd6b2b8a3),
X64Word_create(0x748f82ee, 0x5defb2fc), X64Word_create(0x78a5636f, 0x43172f60),
X64Word_create(0x84c87814, 0xa1f0ab72), X64Word_create(0x8cc70208, 0x1a6439ec),
X64Word_create(0x90befffa, 0x23631e28), X64Word_create(0xa4506ceb, 0xde82bde9),
X64Word_create(0xbef9a3f7, 0xb2c67915), X64Word_create(0xc67178f2, 0xe372532b),
X64Word_create(0xca273ece, 0xea26619c), X64Word_create(0xd186b8c7, 0x21c0c207),
X64Word_create(0xeada7dd6, 0xcde0eb1e), X64Word_create(0xf57d4f7f, 0xee6ed178),
X64Word_create(0x06f067aa, 0x72176fba), X64Word_create(0x0a637dc5, 0xa2c898a6),
X64Word_create(0x113f9804, 0xbef90dae), X64Word_create(0x1b710b35, 0x131c471b),
X64Word_create(0x28db77f5, 0x23047d84), X64Word_create(0x32caab7b, 0x40c72493),
X64Word_create(0x3c9ebe0a, 0x15c9bebc), X64Word_create(0x431d67c4, 0x9c100d4c),
X64Word_create(0x4cc5d4be, 0xcb3e42b6), X64Word_create(0x597f299c, 0xfc657e2a),
X64Word_create(0x5fcb6fab, 0x3ad6faec), X64Word_create(0x6c44198c, 0x4a475817)
];
// Reusable objects
var W = [];
(function () {
for (var i = 0; i < 80; i++) {
W[i] = X64Word_create();
}
}());
/**
* SHA-512 hash algorithm.
*/
var SHA512 = C_algo.SHA512 = Hasher.extend({
_doReset: function () {
this._hash = new X64WordArray.init([
new X64Word.init(0x6a09e667, 0xf3bcc908), new X64Word.init(0xbb67ae85, 0x84caa73b),
new X64Word.init(0x3c6ef372, 0xfe94f82b), new X64Word.init(0xa54ff53a, 0x5f1d36f1),
new X64Word.init(0x510e527f, 0xade682d1), new X64Word.init(0x9b05688c, 0x2b3e6c1f),
new X64Word.init(0x1f83d9ab, 0xfb41bd6b), new X64Word.init(0x5be0cd19, 0x137e2179)
]);
},
_doProcessBlock: function (M, offset) {
// Shortcuts
var H = this._hash.words;
var H0 = H[0];
var H1 = H[1];
var H2 = H[2];
var H3 = H[3];
var H4 = H[4];
var H5 = H[5];
var H6 = H[6];
var H7 = H[7];
var H0h = H0.high;
var H0l = H0.low;
var H1h = H1.high;
var H1l = H1.low;
var H2h = H2.high;
var H2l = H2.low;
var H3h = H3.high;
var H3l = H3.low;
var H4h = H4.high;
var H4l = H4.low;
var H5h = H5.high;
var H5l = H5.low;
var H6h = H6.high;
var H6l = H6.low;
var H7h = H7.high;
var H7l = H7.low;
// Working variables
var ah = H0h;
var al = H0l;
var bh = H1h;
var bl = H1l;
var ch = H2h;
var cl = H2l;
var dh = H3h;
var dl = H3l;
var eh = H4h;
var el = H4l;
var fh = H5h;
var fl = H5l;
var gh = H6h;
var gl = H6l;
var hh = H7h;
var hl = H7l;
// Rounds
for (var i = 0; i < 80; i++) {
var Wil;
var Wih;
// Shortcut
var Wi = W[i];
// Extend message
if (i < 16) {
Wih = Wi.high = M[offset + i * 2] | 0;
Wil = Wi.low = M[offset + i * 2 + 1] | 0;
} else {
// Gamma0
var gamma0x = W[i - 15];
var gamma0xh = gamma0x.high;
var gamma0xl = gamma0x.low;
var gamma0h = ((gamma0xh >>> 1) | (gamma0xl << 31)) ^ ((gamma0xh >>> 8) | (gamma0xl << 24)) ^ (gamma0xh >>> 7);
var gamma0l = ((gamma0xl >>> 1) | (gamma0xh << 31)) ^ ((gamma0xl >>> 8) | (gamma0xh << 24)) ^ ((gamma0xl >>> 7) | (gamma0xh << 25));
// Gamma1
var gamma1x = W[i - 2];
var gamma1xh = gamma1x.high;
var gamma1xl = gamma1x.low;
var gamma1h = ((gamma1xh >>> 19) | (gamma1xl << 13)) ^ ((gamma1xh << 3) | (gamma1xl >>> 29)) ^ (gamma1xh >>> 6);
var gamma1l = ((gamma1xl >>> 19) | (gamma1xh << 13)) ^ ((gamma1xl << 3) | (gamma1xh >>> 29)) ^ ((gamma1xl >>> 6) | (gamma1xh << 26));
// W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]
var Wi7 = W[i - 7];
var Wi7h = Wi7.high;
var Wi7l = Wi7.low;
var Wi16 = W[i - 16];
var Wi16h = Wi16.high;
var Wi16l = Wi16.low;
Wil = gamma0l + Wi7l;
Wih = gamma0h + Wi7h + ((Wil >>> 0) < (gamma0l >>> 0) ? 1 : 0);
Wil = Wil + gamma1l;
Wih = Wih + gamma1h + ((Wil >>> 0) < (gamma1l >>> 0) ? 1 : 0);
Wil = Wil + Wi16l;
Wih = Wih + Wi16h + ((Wil >>> 0) < (Wi16l >>> 0) ? 1 : 0);
Wi.high = Wih;
Wi.low = Wil;
}
var chh = (eh & fh) ^ (~eh & gh);
var chl = (el & fl) ^ (~el & gl);
var majh = (ah & bh) ^ (ah & ch) ^ (bh & ch);
var majl = (al & bl) ^ (al & cl) ^ (bl & cl);
var sigma0h = ((ah >>> 28) | (al << 4)) ^ ((ah << 30) | (al >>> 2)) ^ ((ah << 25) | (al >>> 7));
var sigma0l = ((al >>> 28) | (ah << 4)) ^ ((al << 30) | (ah >>> 2)) ^ ((al << 25) | (ah >>> 7));
var sigma1h = ((eh >>> 14) | (el << 18)) ^ ((eh >>> 18) | (el << 14)) ^ ((eh << 23) | (el >>> 9));
var sigma1l = ((el >>> 14) | (eh << 18)) ^ ((el >>> 18) | (eh << 14)) ^ ((el << 23) | (eh >>> 9));
// t1 = h + sigma1 + ch + K[i] + W[i]
var Ki = K[i];
var Kih = Ki.high;
var Kil = Ki.low;
var t1l = hl + sigma1l;
var t1h = hh + sigma1h + ((t1l >>> 0) < (hl >>> 0) ? 1 : 0);
var t1l = t1l + chl;
var t1h = t1h + chh + ((t1l >>> 0) < (chl >>> 0) ? 1 : 0);
var t1l = t1l + Kil;
var t1h = t1h + Kih + ((t1l >>> 0) < (Kil >>> 0) ? 1 : 0);
var t1l = t1l + Wil;
var t1h = t1h + Wih + ((t1l >>> 0) < (Wil >>> 0) ? 1 : 0);
// t2 = sigma0 + maj
var t2l = sigma0l + majl;
var t2h = sigma0h + majh + ((t2l >>> 0) < (sigma0l >>> 0) ? 1 : 0);
// Update working variables
hh = gh;
hl = gl;
gh = fh;
gl = fl;
fh = eh;
fl = el;
el = (dl + t1l) | 0;
eh = (dh + t1h + ((el >>> 0) < (dl >>> 0) ? 1 : 0)) | 0;
dh = ch;
dl = cl;
ch = bh;
cl = bl;
bh = ah;
bl = al;
al = (t1l + t2l) | 0;
ah = (t1h + t2h + ((al >>> 0) < (t1l >>> 0) ? 1 : 0)) | 0;
}
// Intermediate hash value
H0l = H0.low = (H0l + al);
H0.high = (H0h + ah + ((H0l >>> 0) < (al >>> 0) ? 1 : 0));
H1l = H1.low = (H1l + bl);
H1.high = (H1h + bh + ((H1l >>> 0) < (bl >>> 0) ? 1 : 0));
H2l = H2.low = (H2l + cl);
H2.high = (H2h + ch + ((H2l >>> 0) < (cl >>> 0) ? 1 : 0));
H3l = H3.low = (H3l + dl);
H3.high = (H3h + dh + ((H3l >>> 0) < (dl >>> 0) ? 1 : 0));
H4l = H4.low = (H4l + el);
H4.high = (H4h + eh + ((H4l >>> 0) < (el >>> 0) ? 1 : 0));
H5l = H5.low = (H5l + fl);
H5.high = (H5h + fh + ((H5l >>> 0) < (fl >>> 0) ? 1 : 0));
H6l = H6.low = (H6l + gl);
H6.high = (H6h + gh + ((H6l >>> 0) < (gl >>> 0) ? 1 : 0));
H7l = H7.low = (H7l + hl);
H7.high = (H7h + hh + ((H7l >>> 0) < (hl >>> 0) ? 1 : 0));
},
_doFinalize: function () {
// Shortcuts
var data = this._data;
var dataWords = data.words;
var nBitsTotal = this._nDataBytes * 8;
var nBitsLeft = data.sigBytes * 8;
// Add padding
dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);
dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 30] = Math.floor(nBitsTotal / 0x100000000);
dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 31] = nBitsTotal;
data.sigBytes = dataWords.length * 4;
// Hash final blocks
this._process();
// Convert hash to 32-bit word array before returning
var hash = this._hash.toX32();
// Return final computed hash
return hash;
},
clone: function () {
var clone = Hasher.clone.call(this);
clone._hash = this._hash.clone();
return clone;
},
blockSize: 1024/32
});
/**
* Shortcut function to the hasher's object interface.
*
* @param {WordArray|string} message The message to hash.
*
* @return {WordArray} The hash.
*
* @static
*
* @example
*
* var hash = CryptoJS.SHA512('message');
* var hash = CryptoJS.SHA512(wordArray);
*/
C.SHA512 = Hasher._createHelper(SHA512);
/**
* Shortcut function to the HMAC's object interface.
*
* @param {WordArray|string} message The message to hash.
* @param {WordArray|string} key The secret key.
*
* @return {WordArray} The HMAC.
*
* @static
*
* @example
*
* var hmac = CryptoJS.HmacSHA512(message, key);
*/
C.HmacSHA512 = Hasher._createHmacHelper(SHA512);
}());
(function () {
// Shortcuts
var C = CryptoJS;
var C_x64 = C.x64;
var X64Word = C_x64.Word;
var X64WordArray = C_x64.WordArray;
var C_algo = C.algo;
var SHA512 = C_algo.SHA512;
/**
* SHA-384 hash algorithm.
*/
var SHA384 = C_algo.SHA384 = SHA512.extend({
_doReset: function () {
this._hash = new X64WordArray.init([
new X64Word.init(0xcbbb9d5d, 0xc1059ed8), new X64Word.init(0x629a292a, 0x367cd507),
new X64Word.init(0x9159015a, 0x3070dd17), new X64Word.init(0x152fecd8, 0xf70e5939),
new X64Word.init(0x67332667, 0xffc00b31), new X64Word.init(0x8eb44a87, 0x68581511),
new X64Word.init(0xdb0c2e0d, 0x64f98fa7), new X64Word.init(0x47b5481d, 0xbefa4fa4)
]);
},
_doFinalize: function () {
var hash = SHA512._doFinalize.call(this);
hash.sigBytes -= 16;
return hash;
}
});
/**
* Shortcut function to the hasher's object interface.
*
* @param {WordArray|string} message The message to hash.
*
* @return {WordArray} The hash.
*
* @static
*
* @example
*
* var hash = CryptoJS.SHA384('message');
* var hash = CryptoJS.SHA384(wordArray);
*/
C.SHA384 = SHA512._createHelper(SHA384);
/**
* Shortcut function to the HMAC's object interface.
*
* @param {WordArray|string} message The message to hash.
* @param {WordArray|string} key The secret key.
*
* @return {WordArray} The HMAC.
*
* @static
*
* @example
*
* var hmac = CryptoJS.HmacSHA384(message, key);
*/
C.HmacSHA384 = SHA512._createHmacHelper(SHA384);
}());
/**
* Cipher core components.
*/
CryptoJS.lib.Cipher || (function (undefined) {
// Shortcuts
var C = CryptoJS;
var C_lib = C.lib;
var Base = C_lib.Base;
var WordArray = C_lib.WordArray;
var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm;
var C_enc = C.enc;
var Utf8 = C_enc.Utf8;
var Base64 = C_enc.Base64;
var C_algo = C.algo;
var EvpKDF = C_algo.EvpKDF;
/**
* Abstract base cipher template.
*
* @property {number} keySize This cipher's key size. Default: 4 (128 bits)
* @property {number} ivSize This cipher's IV size. Default: 4 (128 bits)
* @property {number} _ENC_XFORM_MODE A constant representing encryption mode.
* @property {number} _DEC_XFORM_MODE A constant representing decryption mode.
*/
var Cipher = C_lib.Cipher = BufferedBlockAlgorithm.extend({
/**
* Configuration options.
*
* @property {WordArray} iv The IV to use for this operation.
*/
cfg: Base.extend(),
/**
* Creates this cipher in encryption mode.
*
* @param {WordArray} key The key.
* @param {Object} cfg (Optional) The configuration options to use for this operation.
*
* @return {Cipher} A cipher instance.
*
* @static
*
* @example
*
* var cipher = CryptoJS.algo.AES.createEncryptor(keyWordArray, { iv: ivWordArray });
*/
createEncryptor: function (key, cfg) {
return this.create(this._ENC_XFORM_MODE, key, cfg);
},
/**
* Creates this cipher in decryption mode.
*
* @param {WordArray} key The key.
* @param {Object} cfg (Optional) The configuration options to use for this operation.
*
* @return {Cipher} A cipher instance.
*
* @static
*
* @example
*
* var cipher = CryptoJS.algo.AES.createDecryptor(keyWordArray, { iv: ivWordArray });
*/
createDecryptor: function (key, cfg) {
return this.create(this._DEC_XFORM_MODE, key, cfg);
},
/**
* Initializes a newly created cipher.
*
* @param {number} xformMode Either the encryption or decryption transormation mode constant.
* @param {WordArray} key The key.
* @param {Object} cfg (Optional) The configuration options to use for this operation.
*
* @example
*
* var cipher = CryptoJS.algo.AES.create(CryptoJS.algo.AES._ENC_XFORM_MODE, keyWordArray, { iv: ivWordArray });
*/
init: function (xformMode, key, cfg) {
// Apply config defaults
this.cfg = this.cfg.extend(cfg);
// Store transform mode and key
this._xformMode = xformMode;
this._key = key;
// Set initial values
this.reset();
},
/**
* Resets this cipher to its initial state.
*
* @example
*
* cipher.reset();
*/
reset: function () {
// Reset data buffer
BufferedBlockAlgorithm.reset.call(this);
// Perform concrete-cipher logic
this._doReset();
},
/**
* Adds data to be encrypted or decrypted.
*
* @param {WordArray|string} dataUpdate The data to encrypt or decrypt.
*
* @return {WordArray} The data after processing.
*
* @example
*
* var encrypted = cipher.process('data');
* var encrypted = cipher.process(wordArray);
*/
process: function (dataUpdate) {
// Append
this._append(dataUpdate);
// Process available blocks
return this._process();
},
/**
* Finalizes the encryption or decryption process.
* Note that the finalize operation is effectively a destructive, read-once operation.
*
* @param {WordArray|string} dataUpdate The final data to encrypt or decrypt.
*
* @return {WordArray} The data after final processing.
*
* @example
*
* var encrypted = cipher.finalize();
* var encrypted = cipher.finalize('data');
* var encrypted = cipher.finalize(wordArray);
*/
finalize: function (dataUpdate) {
// Final data update
if (dataUpdate) {
this._append(dataUpdate);
}
// Perform concrete-cipher logic
var finalProcessedData = this._doFinalize();
return finalProcessedData;
},
keySize: 128/32,
ivSize: 128/32,
_ENC_XFORM_MODE: 1,
_DEC_XFORM_MODE: 2,
/**
* Creates shortcut functions to a cipher's object interface.
*
* @param {Cipher} cipher The cipher to create a helper for.
*
* @return {Object} An object with encrypt and decrypt shortcut functions.
*
* @static
*
* @example
*
* var AES = CryptoJS.lib.Cipher._createHelper(CryptoJS.algo.AES);
*/
_createHelper: (function () {
function selectCipherStrategy(key) {
if (typeof key == 'string') {
return PasswordBasedCipher;
} else {
return SerializableCipher;
}
}
return function (cipher) {
return {
encrypt: function (message, key, cfg) {
return selectCipherStrategy(key).encrypt(cipher, message, key, cfg);
},
decrypt: function (ciphertext, key, cfg) {
return selectCipherStrategy(key).decrypt(cipher, ciphertext, key, cfg);
}
};
};
}())
});
/**
* Abstract base stream cipher template.
*
* @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 1 (32 bits)
*/
var StreamCipher = C_lib.StreamCipher = Cipher.extend({
_doFinalize: function () {
// Process partial blocks
var finalProcessedBlocks = this._process(!!'flush');
return finalProcessedBlocks;
},
blockSize: 1
});
/**
* Mode namespace.
*/
var C_mode = C.mode = {};
/**
* Abstract base block cipher mode template.
*/
var BlockCipherMode = C_lib.BlockCipherMode = Base.extend({
/**
* Creates this mode for encryption.
*
* @param {Cipher} cipher A block cipher instance.
* @param {Array} iv The IV words.
*
* @static
*
* @example
*
* var mode = CryptoJS.mode.CBC.createEncryptor(cipher, iv.words);
*/
createEncryptor: function (cipher, iv) {
return this.Encryptor.create(cipher, iv);
},
/**
* Creates this mode for decryption.
*
* @param {Cipher} cipher A block cipher instance.
* @param {Array} iv The IV words.
*
* @static
*
* @example
*
* var mode = CryptoJS.mode.CBC.createDecryptor(cipher, iv.words);
*/
createDecryptor: function (cipher, iv) {
return this.Decryptor.create(cipher, iv);
},
/**
* Initializes a newly created mode.
*
* @param {Cipher} cipher A block cipher instance.
* @param {Array} iv The IV words.
*
* @example
*
* var mode = CryptoJS.mode.CBC.Encryptor.create(cipher, iv.words);
*/
init: function (cipher, iv) {
this._cipher = cipher;
this._iv = iv;
}
});
/**
* Cipher Block Chaining mode.
*/
var CBC = C_mode.CBC = (function () {
/**
* Abstract base CBC mode.
*/
var CBC = BlockCipherMode.extend();
/**
* CBC encryptor.
*/
CBC.Encryptor = CBC.extend({
/**
* Processes the data block at offset.
*
* @param {Array} words The data words to operate on.
* @param {number} offset The offset where the block starts.
*
* @example
*
* mode.processBlock(data.words, offset);
*/
processBlock: function (words, offset) {
// Shortcuts
var cipher = this._cipher;
var blockSize = cipher.blockSize;
// XOR and encrypt
xorBlock.call(this, words, offset, blockSize);
cipher.encryptBlock(words, offset);
// Remember this block to use with next block
this._prevBlock = words.slice(offset, offset + blockSize);
}
});
/**
* CBC decryptor.
*/
CBC.Decryptor = CBC.extend({
/**
* Processes the data block at offset.
*
* @param {Array} words The data words to operate on.
* @param {number} offset The offset where the block starts.
*
* @example
*
* mode.processBlock(data.words, offset);
*/
processBlock: function (words, offset) {
// Shortcuts
var cipher = this._cipher;
var blockSize = cipher.blockSize;
// Remember this block to use with next block
var thisBlock = words.slice(offset, offset + blockSize);
// Decrypt and XOR
cipher.decryptBlock(words, offset);
xorBlock.call(this, words, offset, blockSize);
// This block becomes the previous block
this._prevBlock = thisBlock;
}
});
function xorBlock(words, offset, blockSize) {
var block;
// Shortcut
var iv = this._iv;
// Choose mixing block
if (iv) {
block = iv;
// Remove IV for subsequent blocks
this._iv = undefined;
} else {
block = this._prevBlock;
}
// XOR blocks
for (var i = 0; i < blockSize; i++) {
words[offset + i] ^= block[i];
}
}
return CBC;
}());
/**
* Padding namespace.
*/
var C_pad = C.pad = {};
/**
* PKCS #5/7 padding strategy.
*/
var Pkcs7 = C_pad.Pkcs7 = {
/**
* Pads data using the algorithm defined in PKCS #5/7.
*
* @param {WordArray} data The data to pad.
* @param {number} blockSize The multiple that the data should be padded to.
*
* @static
*
* @example
*
* CryptoJS.pad.Pkcs7.pad(wordArray, 4);
*/
pad: function (data, blockSize) {
// Shortcut
var blockSizeBytes = blockSize * 4;
// Count padding bytes
var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes;
// Create padding word
var paddingWord = (nPaddingBytes << 24) | (nPaddingBytes << 16) | (nPaddingBytes << 8) | nPaddingBytes;
// Create padding
var paddingWords = [];
for (var i = 0; i < nPaddingBytes; i += 4) {
paddingWords.push(paddingWord);
}
var padding = WordArray.create(paddingWords, nPaddingBytes);
// Add padding
data.concat(padding);
},
/**
* Unpads data that had been padded using the algorithm defined in PKCS #5/7.
*
* @param {WordArray} data The data to unpad.
*
* @static
*
* @example
*
* CryptoJS.pad.Pkcs7.unpad(wordArray);
*/
unpad: function (data) {
// Get number of padding bytes from last byte
var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff;
// Remove padding
data.sigBytes -= nPaddingBytes;
}
};
/**
* Abstract base block cipher template.
*
* @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 4 (128 bits)
*/
var BlockCipher = C_lib.BlockCipher = Cipher.extend({
/**
* Configuration options.
*
* @property {Mode} mode The block mode to use. Default: CBC
* @property {Padding} padding The padding strategy to use. Default: Pkcs7
*/
cfg: Cipher.cfg.extend({
mode: CBC,
padding: Pkcs7
}),
reset: function () {
var modeCreator;
// Reset cipher
Cipher.reset.call(this);
// Shortcuts
var cfg = this.cfg;
var iv = cfg.iv;
var mode = cfg.mode;
// Reset block mode
if (this._xformMode == this._ENC_XFORM_MODE) {
modeCreator = mode.createEncryptor;
} else /* if (this._xformMode == this._DEC_XFORM_MODE) */ {
modeCreator = mode.createDecryptor;
// Keep at least one block in the buffer for unpadding
this._minBufferSize = 1;
}
if (this._mode && this._mode.__creator == modeCreator) {
this._mode.init(this, iv && iv.words);
} else {
this._mode = modeCreator.call(mode, this, iv && iv.words);
this._mode.__creator = modeCreator;
}
},
_doProcessBlock: function (words, offset) {
this._mode.processBlock(words, offset);
},
_doFinalize: function () {
var finalProcessedBlocks;
// Shortcut
var padding = this.cfg.padding;
// Finalize
if (this._xformMode == this._ENC_XFORM_MODE) {
// Pad data
padding.pad(this._data, this.blockSize);
// Process final blocks
finalProcessedBlocks = this._process(!!'flush');
} else /* if (this._xformMode == this._DEC_XFORM_MODE) */ {
// Process final blocks
finalProcessedBlocks = this._process(!!'flush');
// Unpad data
padding.unpad(finalProcessedBlocks);
}
return finalProcessedBlocks;
},
blockSize: 128/32
});
/**
* A collection of cipher parameters.
*
* @property {WordArray} ciphertext The raw ciphertext.
* @property {WordArray} key The key to this ciphertext.
* @property {WordArray} iv The IV used in the ciphering operation.
* @property {WordArray} salt The salt used with a key derivation function.
* @property {Cipher} algorithm The cipher algorithm.
* @property {Mode} mode The block mode used in the ciphering operation.
* @property {Padding} padding The padding scheme used in the ciphering operation.
* @property {number} blockSize The block size of the cipher.
* @property {Format} formatter The default formatting strategy to convert this cipher params object to a string.
*/
var CipherParams = C_lib.CipherParams = Base.extend({
/**
* Initializes a newly created cipher params object.
*
* @param {Object} cipherParams An object with any of the possible cipher parameters.
*
* @example
*
* var cipherParams = CryptoJS.lib.CipherParams.create({
* ciphertext: ciphertextWordArray,
* key: keyWordArray,
* iv: ivWordArray,
* salt: saltWordArray,
* algorithm: CryptoJS.algo.AES,
* mode: CryptoJS.mode.CBC,
* padding: CryptoJS.pad.PKCS7,
* blockSize: 4,
* formatter: CryptoJS.format.OpenSSL
* });
*/
init: function (cipherParams) {
this.mixIn(cipherParams);
},
/**
* Converts this cipher params object to a string.
*
* @param {Format} formatter (Optional) The formatting strategy to use.
*
* @return {string} The stringified cipher params.
*
* @throws Error If neither the formatter nor the default formatter is set.
*
* @example
*
* var string = cipherParams + '';
* var string = cipherParams.toString();
* var string = cipherParams.toString(CryptoJS.format.OpenSSL);
*/
toString: function (formatter) {
return (formatter || this.formatter).stringify(this);
}
});
/**
* Format namespace.
*/
var C_format = C.format = {};
/**
* OpenSSL formatting strategy.
*/
var OpenSSLFormatter = C_format.OpenSSL = {
/**
* Converts a cipher params object to an OpenSSL-compatible string.
*
* @param {CipherParams} cipherParams The cipher params object.
*
* @return {string} The OpenSSL-compatible string.
*
* @static
*
* @example
*
* var openSSLString = CryptoJS.format.OpenSSL.stringify(cipherParams);
*/
stringify: function (cipherParams) {
var wordArray;
// Shortcuts
var ciphertext = cipherParams.ciphertext;
var salt = cipherParams.salt;
// Format
if (salt) {
wordArray = WordArray.create([0x53616c74, 0x65645f5f]).concat(salt).concat(ciphertext);
} else {
wordArray = ciphertext;
}
return wordArray.toString(Base64);
},
/**
* Converts an OpenSSL-compatible string to a cipher params object.
*
* @param {string} openSSLStr The OpenSSL-compatible string.
*
* @return {CipherParams} The cipher params object.
*
* @static
*
* @example
*
* var cipherParams = CryptoJS.format.OpenSSL.parse(openSSLString);
*/
parse: function (openSSLStr) {
var salt;
// Parse base64
var ciphertext = Base64.parse(openSSLStr);
// Shortcut
var ciphertextWords = ciphertext.words;
// Test for salt
if (ciphertextWords[0] == 0x53616c74 && ciphertextWords[1] == 0x65645f5f) {
// Extract salt
salt = WordArray.create(ciphertextWords.slice(2, 4));
// Remove salt from ciphertext
ciphertextWords.splice(0, 4);
ciphertext.sigBytes -= 16;
}
return CipherParams.create({ ciphertext: ciphertext, salt: salt });
}
};
/**
* A cipher wrapper that returns ciphertext as a serializable cipher params object.
*/
var SerializableCipher = C_lib.SerializableCipher = Base.extend({
/**
* Configuration options.
*
* @property {Formatter} format The formatting strategy to convert cipher param objects to and from a string. Default: OpenSSL
*/
cfg: Base.extend({
format: OpenSSLFormatter
}),
/**
* Encrypts a message.
*
* @param {Cipher} cipher The cipher algorithm to use.
* @param {WordArray|string} message The message to encrypt.
* @param {WordArray} key The key.
* @param {Object} cfg (Optional) The configuration options to use for this operation.
*
* @return {CipherParams} A cipher params object.
*
* @static
*
* @example
*
* var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key);
* var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv });
* var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv, format: CryptoJS.format.OpenSSL });
*/
encrypt: function (cipher, message, key, cfg) {
// Apply config defaults
cfg = this.cfg.extend(cfg);
// Encrypt
var encryptor = cipher.createEncryptor(key, cfg);
var ciphertext = encryptor.finalize(message);
// Shortcut
var cipherCfg = encryptor.cfg;
// Create and return serializable cipher params
return CipherParams.create({
ciphertext: ciphertext,
key: key,
iv: cipherCfg.iv,
algorithm: cipher,
mode: cipherCfg.mode,
padding: cipherCfg.padding,
blockSize: cipher.blockSize,
formatter: cfg.format
});
},
/**
* Decrypts serialized ciphertext.
*
* @param {Cipher} cipher The cipher algorithm to use.
* @param {CipherParams|string} ciphertext The ciphertext to decrypt.
* @param {WordArray} key The key.
* @param {Object} cfg (Optional) The configuration options to use for this operation.
*
* @return {WordArray} The plaintext.
*
* @static
*
* @example
*
* var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, key, { iv: iv, format: CryptoJS.format.OpenSSL });
* var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, key, { iv: iv, format: CryptoJS.format.OpenSSL });
*/
decrypt: function (cipher, ciphertext, key, cfg) {
// Apply config defaults
cfg = this.cfg.extend(cfg);
// Convert string to CipherParams
ciphertext = this._parse(ciphertext, cfg.format);
// Decrypt
var plaintext = cipher.createDecryptor(key, cfg).finalize(ciphertext.ciphertext);
return plaintext;
},
/**
* Converts serialized ciphertext to CipherParams,
* else assumed CipherParams already and returns ciphertext unchanged.
*
* @param {CipherParams|string} ciphertext The ciphertext.
* @param {Formatter} format The formatting strategy to use to parse serialized ciphertext.
*
* @return {CipherParams} The unserialized ciphertext.
*
* @static
*
* @example
*
* var ciphertextParams = CryptoJS.lib.SerializableCipher._parse(ciphertextStringOrParams, format);
*/
_parse: function (ciphertext, format) {
if (typeof ciphertext == 'string') {
return format.parse(ciphertext, this);
} else {
return ciphertext;
}
}
});
/**
* Key derivation function namespace.
*/
var C_kdf = C.kdf = {};
/**
* OpenSSL key derivation function.
*/
var OpenSSLKdf = C_kdf.OpenSSL = {
/**
* Derives a key and IV from a password.
*
* @param {string} password The password to derive from.
* @param {number} keySize The size in words of the key to generate.
* @param {number} ivSize The size in words of the IV to generate.
* @param {WordArray|string} salt (Optional) A 64-bit salt to use. If omitted, a salt will be generated randomly.
*
* @return {CipherParams} A cipher params object with the key, IV, and salt.
*
* @static
*
* @example
*
* var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32);
* var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt');
*/
execute: function (password, keySize, ivSize, salt) {
// Generate random salt
if (!salt) {
salt = WordArray.random(64/8);
}
// Derive key and IV
var key = EvpKDF.create({ keySize: keySize + ivSize }).compute(password, salt);
// Separate key and IV
var iv = WordArray.create(key.words.slice(keySize), ivSize * 4);
key.sigBytes = keySize * 4;
// Return params
return CipherParams.create({ key: key, iv: iv, salt: salt });
}
};
/**
* A serializable cipher wrapper that derives the key from a password,
* and returns ciphertext as a serializable cipher params object.
*/
var PasswordBasedCipher = C_lib.PasswordBasedCipher = SerializableCipher.extend({
/**
* Configuration options.
*
* @property {KDF} kdf The key derivation function to use to generate a key and IV from a password. Default: OpenSSL
*/
cfg: SerializableCipher.cfg.extend({
kdf: OpenSSLKdf
}),
/**
* Encrypts a message using a password.
*
* @param {Cipher} cipher The cipher algorithm to use.
* @param {WordArray|string} message The message to encrypt.
* @param {string} password The password.
* @param {Object} cfg (Optional) The configuration options to use for this operation.
*
* @return {CipherParams} A cipher params object.
*
* @static
*
* @example
*
* var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password');
* var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL });
*/
encrypt: function (cipher, message, password, cfg) {
// Apply config defaults
cfg = this.cfg.extend(cfg);
// Derive key and other params
var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize);
// Add IV to config
cfg.iv = derivedParams.iv;
// Encrypt
var ciphertext = SerializableCipher.encrypt.call(this, cipher, message, derivedParams.key, cfg);
// Mix in derived params
ciphertext.mixIn(derivedParams);
return ciphertext;
},
/**
* Decrypts serialized ciphertext using a password.
*
* @param {Cipher} cipher The cipher algorithm to use.
* @param {CipherParams|string} ciphertext The ciphertext to decrypt.
* @param {string} password The password.
* @param {Object} cfg (Optional) The configuration options to use for this operation.
*
* @return {WordArray} The plaintext.
*
* @static
*
* @example
*
* var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, 'password', { format: CryptoJS.format.OpenSSL });
* var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, 'password', { format: CryptoJS.format.OpenSSL });
*/
decrypt: function (cipher, ciphertext, password, cfg) {
// Apply config defaults
cfg = this.cfg.extend(cfg);
// Convert string to CipherParams
ciphertext = this._parse(ciphertext, cfg.format);
// Derive key and other params
var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, ciphertext.salt);
// Add IV to config
cfg.iv = derivedParams.iv;
// Decrypt
var plaintext = SerializableCipher.decrypt.call(this, cipher, ciphertext, derivedParams.key, cfg);
return plaintext;
}
});
}());
/**
* Cipher Feedback block mode.
*/
CryptoJS.mode.CFB = (function () {
var CFB = CryptoJS.lib.BlockCipherMode.extend();
CFB.Encryptor = CFB.extend({
processBlock: function (words, offset) {
// Shortcuts
var cipher = this._cipher;
var blockSize = cipher.blockSize;
generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher);
// Remember this block to use with next block
this._prevBlock = words.slice(offset, offset + blockSize);
}
});
CFB.Decryptor = CFB.extend({
processBlock: function (words, offset) {
// Shortcuts
var cipher = this._cipher;
var blockSize = cipher.blockSize;
// Remember this block to use with next block
var thisBlock = words.slice(offset, offset + blockSize);
generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher);
// This block becomes the previous block
this._prevBlock = thisBlock;
}
});
function generateKeystreamAndEncrypt(words, offset, blockSize, cipher) {
var keystream;
// Shortcut
var iv = this._iv;
// Generate keystream
if (iv) {
keystream = iv.slice(0);
// Remove IV for subsequent blocks
this._iv = undefined;
} else {
keystream = this._prevBlock;
}
cipher.encryptBlock(keystream, 0);
// Encrypt
for (var i = 0; i < blockSize; i++) {
words[offset + i] ^= keystream[i];
}
}
return CFB;
}());
/**
* Electronic Codebook block mode.
*/
CryptoJS.mode.ECB = (function () {
var ECB = CryptoJS.lib.BlockCipherMode.extend();
ECB.Encryptor = ECB.extend({
processBlock: function (words, offset) {
this._cipher.encryptBlock(words, offset);
}
});
ECB.Decryptor = ECB.extend({
processBlock: function (words, offset) {
this._cipher.decryptBlock(words, offset);
}
});
return ECB;
}());
/**
* ANSI X.923 padding strategy.
*/
CryptoJS.pad.AnsiX923 = {
pad: function (data, blockSize) {
// Shortcuts
var dataSigBytes = data.sigBytes;
var blockSizeBytes = blockSize * 4;
// Count padding bytes
var nPaddingBytes = blockSizeBytes - dataSigBytes % blockSizeBytes;
// Compute last byte position
var lastBytePos = dataSigBytes + nPaddingBytes - 1;
// Pad
data.clamp();
data.words[lastBytePos >>> 2] |= nPaddingBytes << (24 - (lastBytePos % 4) * 8);
data.sigBytes += nPaddingBytes;
},
unpad: function (data) {
// Get number of padding bytes from last byte
var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff;
// Remove padding
data.sigBytes -= nPaddingBytes;
}
};
/**
* ISO 10126 padding strategy.
*/
CryptoJS.pad.Iso10126 = {
pad: function (data, blockSize) {
// Shortcut
var blockSizeBytes = blockSize * 4;
// Count padding bytes
var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes;
// Pad
data.concat(CryptoJS.lib.WordArray.random(nPaddingBytes - 1)).
concat(CryptoJS.lib.WordArray.create([nPaddingBytes << 24], 1));
},
unpad: function (data) {
// Get number of padding bytes from last byte
var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff;
// Remove padding
data.sigBytes -= nPaddingBytes;
}
};
/**
* ISO/IEC 9797-1 Padding Method 2.
*/
CryptoJS.pad.Iso97971 = {
pad: function (data, blockSize) {
// Add 0x80 byte
data.concat(CryptoJS.lib.WordArray.create([0x80000000], 1));
// Zero pad the rest
CryptoJS.pad.ZeroPadding.pad(data, blockSize);
},
unpad: function (data) {
// Remove zero padding
CryptoJS.pad.ZeroPadding.unpad(data);
// Remove one more byte -- the 0x80 byte
data.sigBytes--;
}
};
/**
* Output Feedback block mode.
*/
CryptoJS.mode.OFB = (function () {
var OFB = CryptoJS.lib.BlockCipherMode.extend();
var Encryptor = OFB.Encryptor = OFB.extend({
processBlock: function (words, offset) {
// Shortcuts
var cipher = this._cipher
var blockSize = cipher.blockSize;
var iv = this._iv;
var keystream = this._keystream;
// Generate keystream
if (iv) {
keystream = this._keystream = iv.slice(0);
// Remove IV for subsequent blocks
this._iv = undefined;
}
cipher.encryptBlock(keystream, 0);
// Encrypt
for (var i = 0; i < blockSize; i++) {
words[offset + i] ^= keystream[i];
}
}
});
OFB.Decryptor = Encryptor;
return OFB;
}());
/**
* A noop padding strategy.
*/
CryptoJS.pad.NoPadding = {
pad: function () {
},
unpad: function () {
}
};
(function (undefined) {
// Shortcuts
var C = CryptoJS;
var C_lib = C.lib;
var CipherParams = C_lib.CipherParams;
var C_enc = C.enc;
var Hex = C_enc.Hex;
var C_format = C.format;
var HexFormatter = C_format.Hex = {
/**
* Converts the ciphertext of a cipher params object to a hexadecimally encoded string.
*
* @param {CipherParams} cipherParams The cipher params object.
*
* @return {string} The hexadecimally encoded string.
*
* @static
*
* @example
*
* var hexString = CryptoJS.format.Hex.stringify(cipherParams);
*/
stringify: function (cipherParams) {
return cipherParams.ciphertext.toString(Hex);
},
/**
* Converts a hexadecimally encoded ciphertext string to a cipher params object.
*
* @param {string} input The hexadecimally encoded string.
*
* @return {CipherParams} The cipher params object.
*
* @static
*
* @example
*
* var cipherParams = CryptoJS.format.Hex.parse(hexString);
*/
parse: function (input) {
var ciphertext = Hex.parse(input);
return CipherParams.create({ ciphertext: ciphertext });
}
};
}());
(function () {
// Shortcuts
var C = CryptoJS;
var C_lib = C.lib;
var BlockCipher = C_lib.BlockCipher;
var C_algo = C.algo;
// Lookup tables
var SBOX = [];
var INV_SBOX = [];
var SUB_MIX_0 = [];
var SUB_MIX_1 = [];
var SUB_MIX_2 = [];
var SUB_MIX_3 = [];
var INV_SUB_MIX_0 = [];
var INV_SUB_MIX_1 = [];
var INV_SUB_MIX_2 = [];
var INV_SUB_MIX_3 = [];
// Compute lookup tables
(function () {
// Compute double table
var d = [];
for (var i = 0;
gitextract_ov9t1mtt/
├── .github/
│ └── workflows/
│ └── docker-image.yml
├── .gitignore
├── Dockerfile
├── README.md
├── cache/
│ └── .gitignore
├── chnroutes.txt
├── crypto-js.js
├── helper.php
├── index.php
├── lang.php
├── libs/
│ ├── AAEncode.php
│ ├── Cache/
│ │ ├── Cache.php
│ │ ├── CacheManager.php
│ │ ├── FileCache.php
│ │ └── RedisCache.php
│ ├── EncryptTool.php
│ ├── Languages.php
│ ├── Redirects/
│ │ ├── BanChinaBrowser.php
│ │ ├── ChinaOnlyHandler.php
│ │ ├── DynamicHandler.php
│ │ ├── EncryptHandler.php
│ │ ├── FakePageHandler.php
│ │ ├── Handler.php
│ │ ├── MessageException.php
│ │ ├── MobileOnlyHandler.php
│ │ ├── NonChinaOnlyHandler.php
│ │ ├── NormalHandler.php
│ │ ├── OnceHandler.php
│ │ ├── PCOnlyHandler.php
│ │ ├── PasswordHandler.php
│ │ ├── RedirectRequest.php
│ │ ├── UserClient.php
│ │ └── WhisperHandler.php
│ └── ShortURL.php
├── static/
│ └── basic.js
└── view/
├── ban_china_browser.php
├── client.php
├── dynamic.php
├── encrypt.php
├── password.php
├── welcome.php
└── whisper2.php
SYMBOL INDEX (177 symbols across 27 files)
FILE: crypto-js.js
function F (line 77) | function F() {}
function parseLoop (line 896) | function parseLoop(base64Str, base64StrLength, reverseMap) {
function FF (line 1109) | function FF(a, b, c, d, x, s, t) {
function GG (line 1114) | function GG(a, b, c, d, x, s, t) {
function HH (line 1119) | function HH(a, b, c, d, x, s, t) {
function II (line 1124) | function II(a, b, c, d, x, s, t) {
function isPrime (line 1309) | function isPrime(n) {
function getFractionalBits (line 1320) | function getFractionalBits(n) {
function swapEndian (line 1601) | function swapEndian(word) {
function f1 (line 1853) | function f1(x, y, z) {
function f2 (line 1858) | function f2(x, y, z) {
function f3 (line 1862) | function f3(x, y, z) {
function f4 (line 1866) | function f4(x, y, z) {
function f5 (line 1870) | function f5(x, y, z) {
function rotl (line 1875) | function rotl(x,n) {
function X64Word_create (line 2950) | function X64Word_create() {
function selectCipherStrategy (line 3487) | function selectCipherStrategy(key) {
function xorBlock (line 3650) | function xorBlock(words, offset, blockSize) {
function generateKeystreamAndEncrypt (line 4222) | function generateKeystreamAndEncrypt(words, offset, blockSize, cipher) {
function exchangeLR (line 5346) | function exchangeLR(offset, mask) {
function exchangeRL (line 5352) | function exchangeRL(offset, mask) {
function generateKeystreamWord (line 5472) | function generateKeystreamWord() {
function incWord (line 5552) | function incWord(word)
function incCounter (line 5596) | function incCounter(counter)
function nextState (line 5756) | function nextState() {
function nextState (line 5968) | function nextState() {
FILE: helper.php
function getRandStr (line 9) | function getRandStr($len)
function makeMessageJs (line 20) | function makeMessageJs(string $msg)
function makeRedirectJs (line 27) | function makeRedirectJs($url, $time = 500)
function makeReturnJs (line 35) | function makeReturnJs($code, $time = 500)
function base64_encode_url (line 42) | function base64_encode_url($input) {
function base64_decode_url (line 46) | function base64_decode_url($input) {
function ip_is_china (line 60) | function ip_is_china($ip)
function route (line 88) | function route($uri, Closure $_route)
function json (line 108) | function json($msg, $code = 200, $data = [])
function view (line 118) | function view($name, $vars = [])
function abort (line 125) | function abort($status = 404)
function get_lang (line 137) | function get_lang()
function __ (line 150) | function __($name, $_vars = [])
function env (line 155) | function env(string $name, $default)
FILE: libs/AAEncode.php
class AAEncode (line 12) | class AAEncode
method charCodeAt (line 14) | function charCodeAt($str, $index)
method uchr (line 25) | function uchr($codes)
method aaEncode (line 37) | function aaEncode($javascript)
FILE: libs/Cache/Cache.php
class Cache (line 10) | abstract class Cache
method putCache (line 12) | abstract public function putCache(string $name, $value, int $timeout);
method getCache (line 13) | abstract public function getCache(string $name);
method hasCache (line 14) | abstract public function hasCache(string $name):bool;
method clearCache (line 15) | abstract public function clearCache(string $name);
FILE: libs/Cache/CacheManager.php
class CacheManager (line 20) | class CacheManager
method __construct (line 26) | public function __construct()
method __call (line 41) | public function __call($name, $arguments)
method __callStatic (line 46) | public static function __callStatic($name, $arguments)
FILE: libs/Cache/FileCache.php
class FileCache (line 19) | class FileCache extends Cache
method __construct (line 23) | public function __construct()
method putCache (line 34) | public function putCache(string $name, $value, int $timeout)
method getCache (line 39) | public function getCache(string $name)
method hasCache (line 45) | public function hasCache(string $name): bool
method clearCache (line 50) | public function clearCache(string $name = null)
FILE: libs/Cache/RedisCache.php
class RedisCache (line 13) | class RedisCache extends Cache
method __construct (line 21) | public function __construct()
method getConnect (line 29) | private function getConnect(): \Redis
method putCache (line 41) | public function putCache(string $name, $value, int $timeout)
method getCache (line 47) | public function getCache(string $name)
method hasCache (line 53) | public function hasCache(string $name): bool
method clearCache (line 58) | public function clearCache(string $name = null): int
FILE: libs/EncryptTool.php
class EncryptTool (line 12) | class EncryptTool
method encrypt (line 24) | public static function encrypt($key, $plaintext): string
method decrypt (line 60) | static function decrypt($key, $cypherText)
method createEncryptDataForURLSafe (line 87) | public static function createEncryptDataForURLSafe(array $data): string
method parseEncryptDataForURLSafe (line 97) | public static function parseEncryptDataForURLSafe($data)
method initGuestPass (line 108) | public static function initGuestPass()
method getGuestPass (line 114) | public static function getGuestPass()
FILE: libs/Languages.php
class Languages (line 12) | class Languages
method setConfig (line 18) | public static function setConfig(array $data = [])
method setLocale (line 24) | public static function setLocale(string $lang)
method trans (line 29) | public static function trans(string $name, array $_vars = [])
FILE: libs/Redirects/BanChinaBrowser.php
class BanChinaBrowser (line 12) | class BanChinaBrowser extends Handler
method getHandlerName (line 59) | function getHandlerName(): string
method requireAuthorize (line 64) | function requireAuthorize(): bool
method isAuthorize (line 69) | function isAuthorize(): bool
method showPage (line 82) | function showPage(): bool
FILE: libs/Redirects/ChinaOnlyHandler.php
class ChinaOnlyHandler (line 14) | class ChinaOnlyHandler extends Handler
method getHandlerName (line 16) | function getHandlerName(): string
method requireAuthorize (line 21) | function requireAuthorize(): bool
method isAuthorize (line 26) | function isAuthorize(): bool
method showPage (line 35) | function showPage(): bool
FILE: libs/Redirects/DynamicHandler.php
class DynamicHandler (line 17) | class DynamicHandler extends Handler
method getHandlerName (line 19) | function getHandlerName(): string
method requireAuthorize (line 24) | function requireAuthorize(): bool
method isAuthorize (line 29) | function isAuthorize(): bool
method showPage (line 34) | function showPage(): bool
FILE: libs/Redirects/EncryptHandler.php
class EncryptHandler (line 14) | class EncryptHandler extends Handler
method isAuthorize (line 18) | function isAuthorize(): bool
method showPage (line 23) | function showPage(): bool
method getHandlerName (line 54) | function getHandlerName(): string
method requireAuthorize (line 59) | function requireAuthorize(): bool
FILE: libs/Redirects/FakePageHandler.php
class FakePageHandler (line 18) | class FakePageHandler extends Handler
method getHandlerName (line 21) | function getHandlerName(): string
method requireAuthorize (line 26) | function requireAuthorize(): bool
method isAuthorize (line 31) | function isAuthorize(): bool
method showPage (line 36) | function showPage(): bool
method exceptionPage (line 45) | public function exceptionPage(): bool
FILE: libs/Redirects/Handler.php
class Handler (line 18) | abstract class Handler
method __construct (line 30) | public function __construct(array $data, RedirectRequest $request)
method getHandlerName (line 36) | abstract function getHandlerName(): string;
method requireAuthorize (line 42) | abstract function requireAuthorize(): bool;
method isAuthorize (line 48) | abstract function isAuthorize(): bool;
method showPage (line 54) | abstract function showPage(): bool;
method done (line 60) | public function done()
method exceptionPage (line 69) | public function exceptionPage() :bool
method notify (line 81) | function notify(string $event, RedirectRequest $request): bool
FILE: libs/Redirects/MessageException.php
class MessageException (line 12) | class MessageException extends \RuntimeException
FILE: libs/Redirects/MobileOnlyHandler.php
class MobileOnlyHandler (line 14) | class MobileOnlyHandler extends Handler
method getHandlerName (line 16) | function getHandlerName(): string
method requireAuthorize (line 21) | function requireAuthorize(): bool
method isAuthorize (line 26) | function isAuthorize(): bool
method showPage (line 46) | function showPage(): bool
FILE: libs/Redirects/NonChinaOnlyHandler.php
class NonChinaOnlyHandler (line 14) | class NonChinaOnlyHandler extends Handler
method getHandlerName (line 16) | function getHandlerName(): string
method requireAuthorize (line 21) | function requireAuthorize(): bool
method isAuthorize (line 26) | function isAuthorize(): bool
method showPage (line 35) | function showPage(): bool
FILE: libs/Redirects/NormalHandler.php
class NormalHandler (line 12) | class NormalHandler extends Handler
method getHandlerName (line 14) | function getHandlerName(): string
method requireAuthorize (line 19) | function requireAuthorize(): bool
method isAuthorize (line 24) | function isAuthorize(): bool
method showPage (line 29) | function showPage(): bool
FILE: libs/Redirects/OnceHandler.php
class OnceHandler (line 14) | class OnceHandler extends Handler
method getHandlerName (line 16) | function getHandlerName(): string
method requireAuthorize (line 21) | function requireAuthorize(): bool
method isAuthorize (line 26) | function isAuthorize(): bool
method showPage (line 31) | function showPage(): bool
method done (line 36) | public function done()
FILE: libs/Redirects/PCOnlyHandler.php
class PCOnlyHandler (line 14) | class PCOnlyHandler extends Handler
method getHandlerName (line 16) | function getHandlerName(): string
method requireAuthorize (line 21) | function requireAuthorize(): bool
method isAuthorize (line 26) | function isAuthorize(): bool
method showPage (line 45) | function showPage(): bool
FILE: libs/Redirects/PasswordHandler.php
class PasswordHandler (line 12) | class PasswordHandler extends Handler
method getHandlerName (line 14) | function getHandlerName(): string
method isAuthorize (line 19) | function isAuthorize(): bool
method showPage (line 30) | function showPage(): bool
method requireAuthorize (line 35) | function requireAuthorize(): bool
FILE: libs/Redirects/RedirectRequest.php
class RedirectRequest (line 19) | class RedirectRequest
method __construct (line 36) | public function __construct(string $url, array $encryptTypes, string $...
method makeHandler (line 62) | function makeHandler(string $class): Handler
method hasTypes (line 73) | public function hasTypes(string $name): bool
method notify (line 78) | protected function notify($event): bool
method handle (line 90) | public function handle()
method getClientIP (line 119) | public function getClientIP(): string
method getClient (line 129) | public function getClient()
FILE: libs/Redirects/UserClient.php
type UserClient (line 12) | interface UserClient
method appVersion (line 15) | public function appVersion();
method appName (line 16) | public function appName();
method platform (line 17) | public function platform();
method outerWidth (line 18) | public function outerWidth();
method outerHeight (line 19) | public function outerHeight();
FILE: libs/Redirects/WhisperHandler.php
class WhisperHandler (line 12) | class WhisperHandler extends Handler
method getHandlerName (line 14) | function getHandlerName(): string
method requireAuthorize (line 19) | function requireAuthorize(): bool
method isAuthorize (line 24) | function isAuthorize(): bool
method showPage (line 29) | function showPage(): bool
FILE: libs/ShortURL.php
class ShortURL (line 12) | class ShortURL
method getRandStr (line 15) | public function getRandStr($len)
method urlHash (line 29) | public function urlHash()
method urlToHash (line 48) | public function urlToHash($url, $encrypt_type, $extent)
method hashToUrl (line 63) | public function hashToUrl($hash)
method removeHash (line 77) | public function removeHash(string $hash)
method urlToShort (line 92) | public function urlToShort($url, $encrypt_type = 'encrypt', $extent = '')
method addUrlRecord (line 108) | public function addUrlRecord($url)
method getUrlRecord (line 122) | function getUrlRecord($url = false)
method cleanUrlRecord (line 141) | function cleanUrlRecord($url = false)
method addUrlRecordHistory (line 163) | function addUrlRecordHistory($url)
method getUrlRecordHistory (line 177) | function getUrlRecordHistory()
FILE: static/basic.js
function encryptUTF8 (line 1) | function encryptUTF8(key, plaintext) {
function decryptUTF8 (line 23) | function decryptUTF8(key, cyphertext) {
Condensed preview — 42 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (353K chars).
[
{
"path": ".github/workflows/docker-image.yml",
"chars": 1183,
"preview": "name: Docker Image CI\n\non:\n workflow_dispatch:\n\n\nenv:\n UPLOAD_IMAGES: true\n PUSH_IMAGES: true\n RELEASE_IMAGE_TAG: el"
},
{
"path": ".gitignore",
"chars": 14,
"preview": ".idea\n.project"
},
{
"path": "Dockerfile",
"chars": 245,
"preview": "FROM kooldev/php:8.2-nginx\n\nWORKDIR /app/public\n\nCOPY . /app/public\n\nRUN wget https://raw.githubusercontent.com/ym/chnro"
},
{
"path": "README.md",
"chars": 1439,
"preview": "# 🔗PHP轻量短链接\n\nPHP轻量短链接是一个简单而强大的工具,用于生成短链接,并提供多种定制化的功能,使链接管理变得更加灵活和便捷。通过使用这个工具,您可以快速生成短链接,支持API方式和在线网页方式生成。该项目提供了丰富的功能,包括密"
},
{
"path": "cache/.gitignore",
"chars": 14,
"preview": "*\n!.gitignore\n"
},
{
"path": "chnroutes.txt",
"chars": 53567,
"preview": "# 14166332 routes were dumped from us-iad01-rs01cn-b at Wed Nov 15 04:00:03 UTC 2023.\n# Found 46493 routes matching, agg"
},
{
"path": "crypto-js.js",
"chars": 193756,
"preview": ";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory();\n\t"
},
{
"path": "helper.php",
"chars": 3898,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: ellermister\n * Date: 2023/11/13\n * Time: 1:20\n */\n\nfunction getRandStr($len)\n"
},
{
"path": "index.php",
"chars": 3323,
"preview": "<?php\ndefine('ROOT_PATH', __DIR__);\ndefine('PASS', true);// 访问许可\nspl_autoload_register(function ($class) {\n require_o"
},
{
"path": "lang.php",
"chars": 6909,
"preview": "<?php\n\n/**\n * Created by PhpStorm.\n * User: ellermister\n * Date: 2023/11/14\n * Time: 01:25\n */\n\nreturn [\n 'en' => [],"
},
{
"path": "libs/AAEncode.php",
"chars": 3677,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: ellermister\n * Date: 2023/11/13\n * Time: 1:50\n */\n\nnamespace Libs;\n\n\nclass AA"
},
{
"path": "libs/Cache/Cache.php",
"chars": 382,
"preview": "<?php\nnamespace Libs\\Cache;\n/**\n * Created by PhpStorm.\n * User: ellermister\n * Date: 2023/11/12\n * Time: 23:58\n */\n\nabs"
},
{
"path": "libs/Cache/CacheManager.php",
"chars": 1251,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: ellermister\n * Date: 2023/11/13\n * Time: 0:29\n */\n\nnamespace Libs\\Cache;\n\n/**"
},
{
"path": "libs/Cache/FileCache.php",
"chars": 2209,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: ellermister\n * Date: 2023/11/13\n * Time: 0:11\n */\n\nnamespace Libs\\Cache;\n\n\nus"
},
{
"path": "libs/Cache/RedisCache.php",
"chars": 1754,
"preview": "<?php\n\nnamespace Libs\\Cache;\n\nuse RuntimeException;\n\n/**\n * Created by PhpStorm.\n * User: ellermister\n * Date: 2023/11/1"
},
{
"path": "libs/EncryptTool.php",
"chars": 3473,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: ellermister\n * Date: 2023/11/13\n * Time: 20:00\n */\n\nnamespace Libs;\n\n\nclass E"
},
{
"path": "libs/Languages.php",
"chars": 861,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: ellermister\n * Date: 2023/11/14\n * Time: 11:19\n */\n\nnamespace Libs;\n\n\nclass L"
},
{
"path": "libs/Redirects/BanChinaBrowser.php",
"chars": 1714,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: ellermister\n * Date: 2023/11/17\n * Time: 23:40\n */\n\nnamespace Libs\\Redirects;"
},
{
"path": "libs/Redirects/ChinaOnlyHandler.php",
"chars": 657,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: ellermister\n * Date: 2023/11/14\n * Time: 2:41\n */\n\nnamespace Libs\\Redirects;\n"
},
{
"path": "libs/Redirects/DynamicHandler.php",
"chars": 605,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: ellermister\n * Date: 2023/11/14\n * Time: 03:47\n */\n\nnamespace Libs\\Redirects;"
},
{
"path": "libs/Redirects/EncryptHandler.php",
"chars": 1466,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: ellermister\n * Date: 2023/11/13\n * Time: 22:25\n */\n\nnamespace Libs\\Redirects;"
},
{
"path": "libs/Redirects/FakePageHandler.php",
"chars": 772,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: ellermister\n * Date: 2023/11/14\n * Time: 4:18\n */\n\nnamespace Libs\\Redirects;\n"
},
{
"path": "libs/Redirects/Handler.php",
"chars": 2196,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: ellermister\n * Date: 2023/11/13\n * Time: 22:23\n */\n\nnamespace Libs\\Redirects;"
},
{
"path": "libs/Redirects/MessageException.php",
"chars": 175,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: ellermister\n * Date: 2023/11/14\n * Time: 3:15\n */\n\nnamespace Libs\\Redirects;\n"
},
{
"path": "libs/Redirects/MobileOnlyHandler.php",
"chars": 1157,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: ellermister\n * Date: 2023/11/14\n * Time: 2:41\n */\n\nnamespace Libs\\Redirects;\n"
},
{
"path": "libs/Redirects/NonChinaOnlyHandler.php",
"chars": 672,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: ellermister\n * Date: 2023/11/14\n * Time: 2:41\n */\n\nnamespace Libs\\Redirects;\n"
},
{
"path": "libs/Redirects/NormalHandler.php",
"chars": 488,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: ellermister\n * Date: 2023/11/14\n * Time: 3:38\n */\n\nnamespace Libs\\Redirects;\n"
},
{
"path": "libs/Redirects/OnceHandler.php",
"chars": 573,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: ellermister\n * Date: 2023/11/14\n * Time: 3:59\n */\n\nnamespace Libs\\Redirects;\n"
},
{
"path": "libs/Redirects/PCOnlyHandler.php",
"chars": 1033,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: ellermister\n * Date: 2023/11/14\n * Time: 2:41\n */\n\nnamespace Libs\\Redirects;\n"
},
{
"path": "libs/Redirects/PasswordHandler.php",
"chars": 636,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: ellermister\n * Date: 2023/11/14\n * Time: 2:19\n */\n\nnamespace Libs\\Redirects;\n"
},
{
"path": "libs/Redirects/RedirectRequest.php",
"chars": 4894,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: ellermister\n * Date: 2023/11/13\n * Time: 1:55\n */\n\nnamespace Libs\\Redirects;\n"
},
{
"path": "libs/Redirects/UserClient.php",
"chars": 314,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: ellermister\n * Date: 2023/11/14\n * Time: 12:05\n */\n\nnamespace Libs\\Redirects;"
},
{
"path": "libs/Redirects/WhisperHandler.php",
"chars": 587,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: ellermister\n * Date: 2023/11/14\n * Time: 3:43\n */\n\nnamespace Libs\\Redirects;\n"
},
{
"path": "libs/ShortURL.php",
"chars": 4369,
"preview": "<?php\n/**\n * Created by PhpStorm.\n * User: ellermister\n * Date: 2023/11/13\n * Time: 1:21\n */\n\nnamespace Libs;\n\n\nclass Sh"
},
{
"path": "static/basic.js",
"chars": 1296,
"preview": "function encryptUTF8(key, plaintext) {\n let cyphertext = [];\n // Convert to hex to properly handle UTF8\n plaint"
},
{
"path": "view/ban_china_browser.php",
"chars": 1454,
"preview": "<!DOCTYPE html>\n<html lang=\"<?php echo get_lang() ?>\">\n\n<head>\n <meta charset=\"UTF-8\">\n <meta http-equiv=\"X-UA-Com"
},
{
"path": "view/client.php",
"chars": 1068,
"preview": "<!DOCTYPE html>\n<html lang=\"<?php echo get_lang() ?>\">\n\n<head>\n <meta charset=\"UTF-8\">\n <meta http-equiv=\"X-UA-Com"
},
{
"path": "view/dynamic.php",
"chars": 425,
"preview": "<!DOCTYPE html>\n<html lang=\"<?php echo get_lang() ?>\">\n<head>\n <meta charset=\"UTF-8\">\n <meta http-equiv=\"X-UA-Comp"
},
{
"path": "view/encrypt.php",
"chars": 1171,
"preview": "<!DOCTYPE html>\n<html lang=\"<?php echo get_lang() ?>\">\n<head>\n <meta charset=\"UTF-8\">\n <meta http-equiv=\"X-UA-Comp"
},
{
"path": "view/password.php",
"chars": 2564,
"preview": "<!doctype html>\n<html lang=\"<?php echo get_lang() ?>\">\n<head>\n <!-- Required meta tags -->\n <meta charset=\"utf-8\">"
},
{
"path": "view/welcome.php",
"chars": 16217,
"preview": "<?php defined('PASS') or die('unauthorized access!') ?>\n<!DOCTYPE html>\n<html lang=\"<?php echo get_lang() ?>\">\n<head>\n "
},
{
"path": "view/whisper2.php",
"chars": 2671,
"preview": "<!doctype html>\n<html lang=\"<?php echo get_lang() ?>\">\n<head>\n <!-- Required meta tags -->\n <meta charset=\"utf-8\">"
}
]
About this extraction
This page contains the full source code of the ellermister/shorturl GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 42 files (319.5 KB), approximately 112.0k tokens, and a symbol index with 177 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.