spring-jekyll-theme 0.0.6 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- metadata +10 -68
- data/assets/3rd-party/crypto-js/CONTRIBUTING.md +0 -28
- data/assets/3rd-party/crypto-js/LICENSE +0 -24
- data/assets/3rd-party/crypto-js/README.md +0 -249
- data/assets/3rd-party/crypto-js/aes.js +0 -234
- data/assets/3rd-party/crypto-js/bower.json +0 -35
- data/assets/3rd-party/crypto-js/cipher-core.js +0 -890
- data/assets/3rd-party/crypto-js/core.js +0 -797
- data/assets/3rd-party/crypto-js/crypto-js.js +0 -6059
- data/assets/3rd-party/crypto-js/docs/QuickStartGuide.wiki +0 -470
- data/assets/3rd-party/crypto-js/enc-base64.js +0 -136
- data/assets/3rd-party/crypto-js/enc-hex.js +0 -18
- data/assets/3rd-party/crypto-js/enc-latin1.js +0 -18
- data/assets/3rd-party/crypto-js/enc-utf16.js +0 -149
- data/assets/3rd-party/crypto-js/enc-utf8.js +0 -18
- data/assets/3rd-party/crypto-js/evpkdf.js +0 -134
- data/assets/3rd-party/crypto-js/format-hex.js +0 -66
- data/assets/3rd-party/crypto-js/format-openssl.js +0 -18
- data/assets/3rd-party/crypto-js/hmac-md5.js +0 -18
- data/assets/3rd-party/crypto-js/hmac-ripemd160.js +0 -18
- data/assets/3rd-party/crypto-js/hmac-sha1.js +0 -18
- data/assets/3rd-party/crypto-js/hmac-sha224.js +0 -18
- data/assets/3rd-party/crypto-js/hmac-sha256.js +0 -18
- data/assets/3rd-party/crypto-js/hmac-sha3.js +0 -18
- data/assets/3rd-party/crypto-js/hmac-sha384.js +0 -18
- data/assets/3rd-party/crypto-js/hmac-sha512.js +0 -18
- data/assets/3rd-party/crypto-js/hmac.js +0 -143
- data/assets/3rd-party/crypto-js/index.js +0 -18
- data/assets/3rd-party/crypto-js/lib-typedarrays.js +0 -76
- data/assets/3rd-party/crypto-js/md5.js +0 -268
- data/assets/3rd-party/crypto-js/mode-cfb.js +0 -80
- data/assets/3rd-party/crypto-js/mode-ctr-gladman.js +0 -116
- data/assets/3rd-party/crypto-js/mode-ctr.js +0 -58
- data/assets/3rd-party/crypto-js/mode-ecb.js +0 -40
- data/assets/3rd-party/crypto-js/mode-ofb.js +0 -54
- data/assets/3rd-party/crypto-js/package.json +0 -66
- data/assets/3rd-party/crypto-js/pad-ansix923.js +0 -49
- data/assets/3rd-party/crypto-js/pad-iso10126.js +0 -44
- data/assets/3rd-party/crypto-js/pad-iso97971.js +0 -40
- data/assets/3rd-party/crypto-js/pad-nopadding.js +0 -30
- data/assets/3rd-party/crypto-js/pad-pkcs7.js +0 -18
- data/assets/3rd-party/crypto-js/pad-zeropadding.js +0 -47
- data/assets/3rd-party/crypto-js/pbkdf2.js +0 -145
- data/assets/3rd-party/crypto-js/rabbit-legacy.js +0 -190
- data/assets/3rd-party/crypto-js/rabbit.js +0 -192
- data/assets/3rd-party/crypto-js/rc4.js +0 -139
- data/assets/3rd-party/crypto-js/ripemd160.js +0 -267
- data/assets/3rd-party/crypto-js/sha1.js +0 -150
- data/assets/3rd-party/crypto-js/sha224.js +0 -80
- data/assets/3rd-party/crypto-js/sha256.js +0 -199
- data/assets/3rd-party/crypto-js/sha3.js +0 -326
- data/assets/3rd-party/crypto-js/sha384.js +0 -83
- data/assets/3rd-party/crypto-js/sha512.js +0 -326
- data/assets/3rd-party/crypto-js/tripledes.js +0 -779
- data/assets/3rd-party/crypto-js/x64-core.js +0 -304
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 465126b66617bf991c0610a078a5747112d64cb1ada94670db881cf7f57189f2
|
4
|
+
data.tar.gz: a174aa3e1a4e843ccfd52221488953b0b249a26f7d141834ae2558d3e7042238
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 33346c26aa9938ff8dccaae3e354cb9896086bbcebcae4144ca53941dafc6c07eb7512dd481a2ec89172d8d44af2de11a90d520d137dd1033d749acd3e2ea7f3
|
7
|
+
data.tar.gz: 631a6c83ad71a49ec818e66ff9eded36936cd2845e1e66d56c0dcb691ac1340e8494a741219fab27d326fd7490af5fa617fdb7db46e4bcf74c5b5683877788bc
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spring-jekyll-theme
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Chen
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: jekyll
|
@@ -16,14 +15,14 @@ dependencies:
|
|
16
15
|
requirements:
|
17
16
|
- - "~>"
|
18
17
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
18
|
+
version: 4.4.1
|
20
19
|
type: :runtime
|
21
20
|
prerelease: false
|
22
21
|
version_requirements: !ruby/object:Gem::Requirement
|
23
22
|
requirements:
|
24
23
|
- - "~>"
|
25
24
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
25
|
+
version: 4.4.1
|
27
26
|
- !ruby/object:Gem::Dependency
|
28
27
|
name: jekyll-feed
|
29
28
|
requirement: !ruby/object:Gem::Requirement
|
@@ -56,17 +55,16 @@ dependencies:
|
|
56
55
|
name: bundler
|
57
56
|
requirement: !ruby/object:Gem::Requirement
|
58
57
|
requirements:
|
59
|
-
- - "
|
58
|
+
- - "~>"
|
60
59
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
60
|
+
version: '2.3'
|
62
61
|
type: :development
|
63
62
|
prerelease: false
|
64
63
|
version_requirements: !ruby/object:Gem::Requirement
|
65
64
|
requirements:
|
66
|
-
- - "
|
65
|
+
- - "~>"
|
67
66
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
69
|
-
description:
|
67
|
+
version: '2.3'
|
70
68
|
email:
|
71
69
|
- cbtpro@gmail.com
|
72
70
|
executables: []
|
@@ -90,60 +88,6 @@ files:
|
|
90
88
|
- _sass/spring/_base.scss
|
91
89
|
- _sass/spring/_layout.scss
|
92
90
|
- _sass/spring/_syntax-highlighting.scss
|
93
|
-
- assets/3rd-party/crypto-js/CONTRIBUTING.md
|
94
|
-
- assets/3rd-party/crypto-js/LICENSE
|
95
|
-
- assets/3rd-party/crypto-js/README.md
|
96
|
-
- assets/3rd-party/crypto-js/aes.js
|
97
|
-
- assets/3rd-party/crypto-js/bower.json
|
98
|
-
- assets/3rd-party/crypto-js/cipher-core.js
|
99
|
-
- assets/3rd-party/crypto-js/core.js
|
100
|
-
- assets/3rd-party/crypto-js/crypto-js.js
|
101
|
-
- assets/3rd-party/crypto-js/docs/QuickStartGuide.wiki
|
102
|
-
- assets/3rd-party/crypto-js/enc-base64.js
|
103
|
-
- assets/3rd-party/crypto-js/enc-hex.js
|
104
|
-
- assets/3rd-party/crypto-js/enc-latin1.js
|
105
|
-
- assets/3rd-party/crypto-js/enc-utf16.js
|
106
|
-
- assets/3rd-party/crypto-js/enc-utf8.js
|
107
|
-
- assets/3rd-party/crypto-js/evpkdf.js
|
108
|
-
- assets/3rd-party/crypto-js/format-hex.js
|
109
|
-
- assets/3rd-party/crypto-js/format-openssl.js
|
110
|
-
- assets/3rd-party/crypto-js/hmac-md5.js
|
111
|
-
- assets/3rd-party/crypto-js/hmac-ripemd160.js
|
112
|
-
- assets/3rd-party/crypto-js/hmac-sha1.js
|
113
|
-
- assets/3rd-party/crypto-js/hmac-sha224.js
|
114
|
-
- assets/3rd-party/crypto-js/hmac-sha256.js
|
115
|
-
- assets/3rd-party/crypto-js/hmac-sha3.js
|
116
|
-
- assets/3rd-party/crypto-js/hmac-sha384.js
|
117
|
-
- assets/3rd-party/crypto-js/hmac-sha512.js
|
118
|
-
- assets/3rd-party/crypto-js/hmac.js
|
119
|
-
- assets/3rd-party/crypto-js/index.js
|
120
|
-
- assets/3rd-party/crypto-js/lib-typedarrays.js
|
121
|
-
- assets/3rd-party/crypto-js/md5.js
|
122
|
-
- assets/3rd-party/crypto-js/mode-cfb.js
|
123
|
-
- assets/3rd-party/crypto-js/mode-ctr-gladman.js
|
124
|
-
- assets/3rd-party/crypto-js/mode-ctr.js
|
125
|
-
- assets/3rd-party/crypto-js/mode-ecb.js
|
126
|
-
- assets/3rd-party/crypto-js/mode-ofb.js
|
127
|
-
- assets/3rd-party/crypto-js/package.json
|
128
|
-
- assets/3rd-party/crypto-js/pad-ansix923.js
|
129
|
-
- assets/3rd-party/crypto-js/pad-iso10126.js
|
130
|
-
- assets/3rd-party/crypto-js/pad-iso97971.js
|
131
|
-
- assets/3rd-party/crypto-js/pad-nopadding.js
|
132
|
-
- assets/3rd-party/crypto-js/pad-pkcs7.js
|
133
|
-
- assets/3rd-party/crypto-js/pad-zeropadding.js
|
134
|
-
- assets/3rd-party/crypto-js/pbkdf2.js
|
135
|
-
- assets/3rd-party/crypto-js/rabbit-legacy.js
|
136
|
-
- assets/3rd-party/crypto-js/rabbit.js
|
137
|
-
- assets/3rd-party/crypto-js/rc4.js
|
138
|
-
- assets/3rd-party/crypto-js/ripemd160.js
|
139
|
-
- assets/3rd-party/crypto-js/sha1.js
|
140
|
-
- assets/3rd-party/crypto-js/sha224.js
|
141
|
-
- assets/3rd-party/crypto-js/sha256.js
|
142
|
-
- assets/3rd-party/crypto-js/sha3.js
|
143
|
-
- assets/3rd-party/crypto-js/sha384.js
|
144
|
-
- assets/3rd-party/crypto-js/sha512.js
|
145
|
-
- assets/3rd-party/crypto-js/tripledes.js
|
146
|
-
- assets/3rd-party/crypto-js/x64-core.js
|
147
91
|
- assets/css/style.scss
|
148
92
|
- assets/ecmascripts/index.js
|
149
93
|
- assets/images/avatar.png
|
@@ -154,7 +98,6 @@ licenses:
|
|
154
98
|
- MIT
|
155
99
|
metadata:
|
156
100
|
plugin_type: theme
|
157
|
-
post_install_message:
|
158
101
|
rdoc_options: []
|
159
102
|
require_paths:
|
160
103
|
- lib
|
@@ -162,15 +105,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
162
105
|
requirements:
|
163
106
|
- - ">="
|
164
107
|
- !ruby/object:Gem::Version
|
165
|
-
version: '0'
|
108
|
+
version: '3.0'
|
166
109
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
167
110
|
requirements:
|
168
111
|
- - ">="
|
169
112
|
- !ruby/object:Gem::Version
|
170
113
|
version: '0'
|
171
114
|
requirements: []
|
172
|
-
rubygems_version: 3.
|
173
|
-
signing_key:
|
115
|
+
rubygems_version: 3.6.7
|
174
116
|
specification_version: 4
|
175
117
|
summary: spring theme for Jekyll.
|
176
118
|
test_files: []
|
@@ -1,28 +0,0 @@
|
|
1
|
-
# Contribution
|
2
|
-
|
3
|
-
# Git Flow
|
4
|
-
|
5
|
-
The crypto-js project uses [git flow](https://github.com/nvie/gitflow) to manage branches.
|
6
|
-
Do your changes on the `develop` or even better on a `feature/*` branch. Don't do any changes on the `master` branch.
|
7
|
-
|
8
|
-
# Pull request
|
9
|
-
|
10
|
-
Target your pull request on `develop` branch. Other pull request won't be accepted.
|
11
|
-
|
12
|
-
# How to build
|
13
|
-
|
14
|
-
1. Clone
|
15
|
-
|
16
|
-
2. Run
|
17
|
-
|
18
|
-
```sh
|
19
|
-
npm install
|
20
|
-
```
|
21
|
-
|
22
|
-
3. Run
|
23
|
-
|
24
|
-
```sh
|
25
|
-
npm run build
|
26
|
-
```
|
27
|
-
|
28
|
-
4. Check `build` folder
|
@@ -1,24 +0,0 @@
|
|
1
|
-
# License
|
2
|
-
|
3
|
-
[The MIT License (MIT)](http://opensource.org/licenses/MIT)
|
4
|
-
|
5
|
-
Copyright (c) 2009-2013 Jeff Mott
|
6
|
-
Copyright (c) 2013-2016 Evan Vosberg
|
7
|
-
|
8
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
9
|
-
of this software and associated documentation files (the "Software"), to deal
|
10
|
-
in the Software without restriction, including without limitation the rights
|
11
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
12
|
-
copies of the Software, and to permit persons to whom the Software is
|
13
|
-
furnished to do so, subject to the following conditions:
|
14
|
-
|
15
|
-
The above copyright notice and this permission notice shall be included in
|
16
|
-
all copies or substantial portions of the Software.
|
17
|
-
|
18
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
19
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
20
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
21
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
22
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
23
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
24
|
-
THE SOFTWARE.
|
@@ -1,249 +0,0 @@
|
|
1
|
-
# crypto-js [](https://travis-ci.org/brix/crypto-js)
|
2
|
-
|
3
|
-
JavaScript library of crypto standards.
|
4
|
-
|
5
|
-
## Node.js (Install)
|
6
|
-
|
7
|
-
Requirements:
|
8
|
-
|
9
|
-
- Node.js
|
10
|
-
- npm (Node.js package manager)
|
11
|
-
|
12
|
-
```bash
|
13
|
-
npm install crypto-js
|
14
|
-
```
|
15
|
-
|
16
|
-
### Usage
|
17
|
-
|
18
|
-
ES6 import for typical API call signing use case:
|
19
|
-
|
20
|
-
```javascript
|
21
|
-
import sha256 from 'crypto-js/sha256';
|
22
|
-
import hmacSHA512 from 'crypto-js/hmac-sha512';
|
23
|
-
import Base64 from 'crypto-js/enc-base64';
|
24
|
-
|
25
|
-
const message, nonce, path, privateKey; // ...
|
26
|
-
const hashDigest = sha256(nonce + message);
|
27
|
-
const hmacDigest = Base64.stringify(hmacSHA512(path + hashDigest, privateKey));
|
28
|
-
```
|
29
|
-
|
30
|
-
Modular include:
|
31
|
-
|
32
|
-
```javascript
|
33
|
-
var AES = require("crypto-js/aes");
|
34
|
-
var SHA256 = require("crypto-js/sha256");
|
35
|
-
...
|
36
|
-
console.log(SHA256("Message"));
|
37
|
-
```
|
38
|
-
|
39
|
-
Including all libraries, for access to extra methods:
|
40
|
-
|
41
|
-
```javascript
|
42
|
-
var CryptoJS = require("crypto-js");
|
43
|
-
console.log(CryptoJS.HmacSHA1("Message", "Key"));
|
44
|
-
```
|
45
|
-
|
46
|
-
## Client (browser)
|
47
|
-
|
48
|
-
Requirements:
|
49
|
-
|
50
|
-
- Node.js
|
51
|
-
- Bower (package manager for frontend)
|
52
|
-
|
53
|
-
```bash
|
54
|
-
bower install crypto-js
|
55
|
-
```
|
56
|
-
|
57
|
-
### Usage
|
58
|
-
|
59
|
-
Modular include:
|
60
|
-
|
61
|
-
```javascript
|
62
|
-
require.config({
|
63
|
-
packages: [
|
64
|
-
{
|
65
|
-
name: 'crypto-js',
|
66
|
-
location: 'path-to/bower_components/crypto-js',
|
67
|
-
main: 'index'
|
68
|
-
}
|
69
|
-
]
|
70
|
-
});
|
71
|
-
|
72
|
-
require(["crypto-js/aes", "crypto-js/sha256"], function (AES, SHA256) {
|
73
|
-
console.log(SHA256("Message"));
|
74
|
-
});
|
75
|
-
```
|
76
|
-
|
77
|
-
Including all libraries, for access to extra methods:
|
78
|
-
|
79
|
-
```javascript
|
80
|
-
// Above-mentioned will work or use this simple form
|
81
|
-
require.config({
|
82
|
-
paths: {
|
83
|
-
'crypto-js': 'path-to/bower_components/crypto-js/crypto-js'
|
84
|
-
}
|
85
|
-
});
|
86
|
-
|
87
|
-
require(["crypto-js"], function (CryptoJS) {
|
88
|
-
console.log(CryptoJS.HmacSHA1("Message", "Key"));
|
89
|
-
});
|
90
|
-
```
|
91
|
-
|
92
|
-
### Usage without RequireJS
|
93
|
-
|
94
|
-
```html
|
95
|
-
<script type="text/javascript" src="path-to/bower_components/crypto-js/crypto-js.js"></script>
|
96
|
-
<script type="text/javascript">
|
97
|
-
var encrypted = CryptoJS.AES(...);
|
98
|
-
var encrypted = CryptoJS.SHA256(...);
|
99
|
-
</script>
|
100
|
-
```
|
101
|
-
|
102
|
-
## API
|
103
|
-
|
104
|
-
See: https://cryptojs.gitbook.io/docs/
|
105
|
-
|
106
|
-
### AES Encryption
|
107
|
-
|
108
|
-
#### Plain text encryption
|
109
|
-
|
110
|
-
```javascript
|
111
|
-
var CryptoJS = require("crypto-js");
|
112
|
-
|
113
|
-
// Encrypt
|
114
|
-
var ciphertext = CryptoJS.AES.encrypt('my message', 'secret key 123').toString();
|
115
|
-
|
116
|
-
// Decrypt
|
117
|
-
var bytes = CryptoJS.AES.decrypt(ciphertext, 'secret key 123');
|
118
|
-
var originalText = bytes.toString(CryptoJS.enc.Utf8);
|
119
|
-
|
120
|
-
console.log(originalText); // 'my message'
|
121
|
-
```
|
122
|
-
|
123
|
-
#### Object encryption
|
124
|
-
|
125
|
-
```javascript
|
126
|
-
var CryptoJS = require("crypto-js");
|
127
|
-
|
128
|
-
var data = [{id: 1}, {id: 2}]
|
129
|
-
|
130
|
-
// Encrypt
|
131
|
-
var ciphertext = CryptoJS.AES.encrypt(JSON.stringify(data), 'secret key 123').toString();
|
132
|
-
|
133
|
-
// Decrypt
|
134
|
-
var bytes = CryptoJS.AES.decrypt(ciphertext, 'secret key 123');
|
135
|
-
var decryptedData = JSON.parse(bytes.toString(CryptoJS.enc.Utf8));
|
136
|
-
|
137
|
-
console.log(decryptedData); // [{id: 1}, {id: 2}]
|
138
|
-
```
|
139
|
-
|
140
|
-
### List of modules
|
141
|
-
|
142
|
-
|
143
|
-
- ```crypto-js/core```
|
144
|
-
- ```crypto-js/x64-core```
|
145
|
-
- ```crypto-js/lib-typedarrays```
|
146
|
-
|
147
|
-
---
|
148
|
-
|
149
|
-
- ```crypto-js/md5```
|
150
|
-
- ```crypto-js/sha1```
|
151
|
-
- ```crypto-js/sha256```
|
152
|
-
- ```crypto-js/sha224```
|
153
|
-
- ```crypto-js/sha512```
|
154
|
-
- ```crypto-js/sha384```
|
155
|
-
- ```crypto-js/sha3```
|
156
|
-
- ```crypto-js/ripemd160```
|
157
|
-
|
158
|
-
---
|
159
|
-
|
160
|
-
- ```crypto-js/hmac-md5```
|
161
|
-
- ```crypto-js/hmac-sha1```
|
162
|
-
- ```crypto-js/hmac-sha256```
|
163
|
-
- ```crypto-js/hmac-sha224```
|
164
|
-
- ```crypto-js/hmac-sha512```
|
165
|
-
- ```crypto-js/hmac-sha384```
|
166
|
-
- ```crypto-js/hmac-sha3```
|
167
|
-
- ```crypto-js/hmac-ripemd160```
|
168
|
-
|
169
|
-
---
|
170
|
-
|
171
|
-
- ```crypto-js/pbkdf2```
|
172
|
-
|
173
|
-
---
|
174
|
-
|
175
|
-
- ```crypto-js/aes```
|
176
|
-
- ```crypto-js/tripledes```
|
177
|
-
- ```crypto-js/rc4```
|
178
|
-
- ```crypto-js/rabbit```
|
179
|
-
- ```crypto-js/rabbit-legacy```
|
180
|
-
- ```crypto-js/evpkdf```
|
181
|
-
|
182
|
-
---
|
183
|
-
|
184
|
-
- ```crypto-js/format-openssl```
|
185
|
-
- ```crypto-js/format-hex```
|
186
|
-
|
187
|
-
---
|
188
|
-
|
189
|
-
- ```crypto-js/enc-latin1```
|
190
|
-
- ```crypto-js/enc-utf8```
|
191
|
-
- ```crypto-js/enc-hex```
|
192
|
-
- ```crypto-js/enc-utf16```
|
193
|
-
- ```crypto-js/enc-base64```
|
194
|
-
|
195
|
-
---
|
196
|
-
|
197
|
-
- ```crypto-js/mode-cfb```
|
198
|
-
- ```crypto-js/mode-ctr```
|
199
|
-
- ```crypto-js/mode-ctr-gladman```
|
200
|
-
- ```crypto-js/mode-ofb```
|
201
|
-
- ```crypto-js/mode-ecb```
|
202
|
-
|
203
|
-
---
|
204
|
-
|
205
|
-
- ```crypto-js/pad-pkcs7```
|
206
|
-
- ```crypto-js/pad-ansix923```
|
207
|
-
- ```crypto-js/pad-iso10126```
|
208
|
-
- ```crypto-js/pad-iso97971```
|
209
|
-
- ```crypto-js/pad-zeropadding```
|
210
|
-
- ```crypto-js/pad-nopadding```
|
211
|
-
|
212
|
-
|
213
|
-
## Release notes
|
214
|
-
|
215
|
-
### 4.0.0
|
216
|
-
|
217
|
-
This is an update including breaking changes for some environments.
|
218
|
-
|
219
|
-
In this version `Math.random()` has been replaced by the random methods of the native crypto module.
|
220
|
-
|
221
|
-
For this reason CryptoJS might does not run in some JavaScript environments without native crypto module. Such as IE 10 or before or React Native.
|
222
|
-
|
223
|
-
### 3.3.0
|
224
|
-
|
225
|
-
Rollback, `3.3.0` is the same as `3.1.9-1`.
|
226
|
-
|
227
|
-
The move of using native secure crypto module will be shifted to a new `4.x.x` version. As it is a breaking change the impact is too big for a minor release.
|
228
|
-
|
229
|
-
### 3.2.1
|
230
|
-
|
231
|
-
The usage of the native crypto module has been fixed. The import and access of the native crypto module has been improved.
|
232
|
-
|
233
|
-
### 3.2.0
|
234
|
-
|
235
|
-
In this version `Math.random()` has been replaced by the random methods of the native crypto module.
|
236
|
-
|
237
|
-
For this reason CryptoJS might does not run in some JavaScript environments without native crypto module. Such as IE 10 or before.
|
238
|
-
|
239
|
-
If it's absolute required to run CryptoJS in such an environment, stay with `3.1.x` version. Encrypting and decrypting stays compatible. But keep in mind `3.1.x` versions still use `Math.random()` which is cryptographically not secure, as it's not random enough.
|
240
|
-
|
241
|
-
This version came along with `CRITICAL` `BUG`.
|
242
|
-
|
243
|
-
DO NOT USE THIS VERSION! Please, go for a newer version!
|
244
|
-
|
245
|
-
### 3.1.x
|
246
|
-
|
247
|
-
The `3.1.x` are based on the original CryptoJS, wrapped in CommonJS modules.
|
248
|
-
|
249
|
-
|
@@ -1,234 +0,0 @@
|
|
1
|
-
;(function (root, factory, undef) {
|
2
|
-
if (typeof exports === "object") {
|
3
|
-
// CommonJS
|
4
|
-
module.exports = exports = factory(require("./core"), require("./enc-base64"), require("./md5"), require("./evpkdf"), require("./cipher-core"));
|
5
|
-
}
|
6
|
-
else if (typeof define === "function" && define.amd) {
|
7
|
-
// AMD
|
8
|
-
define(["./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core"], factory);
|
9
|
-
}
|
10
|
-
else {
|
11
|
-
// Global (browser)
|
12
|
-
factory(root.CryptoJS);
|
13
|
-
}
|
14
|
-
}(this, function (CryptoJS) {
|
15
|
-
|
16
|
-
(function () {
|
17
|
-
// Shortcuts
|
18
|
-
var C = CryptoJS;
|
19
|
-
var C_lib = C.lib;
|
20
|
-
var BlockCipher = C_lib.BlockCipher;
|
21
|
-
var C_algo = C.algo;
|
22
|
-
|
23
|
-
// Lookup tables
|
24
|
-
var SBOX = [];
|
25
|
-
var INV_SBOX = [];
|
26
|
-
var SUB_MIX_0 = [];
|
27
|
-
var SUB_MIX_1 = [];
|
28
|
-
var SUB_MIX_2 = [];
|
29
|
-
var SUB_MIX_3 = [];
|
30
|
-
var INV_SUB_MIX_0 = [];
|
31
|
-
var INV_SUB_MIX_1 = [];
|
32
|
-
var INV_SUB_MIX_2 = [];
|
33
|
-
var INV_SUB_MIX_3 = [];
|
34
|
-
|
35
|
-
// Compute lookup tables
|
36
|
-
(function () {
|
37
|
-
// Compute double table
|
38
|
-
var d = [];
|
39
|
-
for (var i = 0; i < 256; i++) {
|
40
|
-
if (i < 128) {
|
41
|
-
d[i] = i << 1;
|
42
|
-
} else {
|
43
|
-
d[i] = (i << 1) ^ 0x11b;
|
44
|
-
}
|
45
|
-
}
|
46
|
-
|
47
|
-
// Walk GF(2^8)
|
48
|
-
var x = 0;
|
49
|
-
var xi = 0;
|
50
|
-
for (var i = 0; i < 256; i++) {
|
51
|
-
// Compute sbox
|
52
|
-
var sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4);
|
53
|
-
sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63;
|
54
|
-
SBOX[x] = sx;
|
55
|
-
INV_SBOX[sx] = x;
|
56
|
-
|
57
|
-
// Compute multiplication
|
58
|
-
var x2 = d[x];
|
59
|
-
var x4 = d[x2];
|
60
|
-
var x8 = d[x4];
|
61
|
-
|
62
|
-
// Compute sub bytes, mix columns tables
|
63
|
-
var t = (d[sx] * 0x101) ^ (sx * 0x1010100);
|
64
|
-
SUB_MIX_0[x] = (t << 24) | (t >>> 8);
|
65
|
-
SUB_MIX_1[x] = (t << 16) | (t >>> 16);
|
66
|
-
SUB_MIX_2[x] = (t << 8) | (t >>> 24);
|
67
|
-
SUB_MIX_3[x] = t;
|
68
|
-
|
69
|
-
// Compute inv sub bytes, inv mix columns tables
|
70
|
-
var t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100);
|
71
|
-
INV_SUB_MIX_0[sx] = (t << 24) | (t >>> 8);
|
72
|
-
INV_SUB_MIX_1[sx] = (t << 16) | (t >>> 16);
|
73
|
-
INV_SUB_MIX_2[sx] = (t << 8) | (t >>> 24);
|
74
|
-
INV_SUB_MIX_3[sx] = t;
|
75
|
-
|
76
|
-
// Compute next counter
|
77
|
-
if (!x) {
|
78
|
-
x = xi = 1;
|
79
|
-
} else {
|
80
|
-
x = x2 ^ d[d[d[x8 ^ x2]]];
|
81
|
-
xi ^= d[d[xi]];
|
82
|
-
}
|
83
|
-
}
|
84
|
-
}());
|
85
|
-
|
86
|
-
// Precomputed Rcon lookup
|
87
|
-
var RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36];
|
88
|
-
|
89
|
-
/**
|
90
|
-
* AES block cipher algorithm.
|
91
|
-
*/
|
92
|
-
var AES = C_algo.AES = BlockCipher.extend({
|
93
|
-
_doReset: function () {
|
94
|
-
var t;
|
95
|
-
|
96
|
-
// Skip reset of nRounds has been set before and key did not change
|
97
|
-
if (this._nRounds && this._keyPriorReset === this._key) {
|
98
|
-
return;
|
99
|
-
}
|
100
|
-
|
101
|
-
// Shortcuts
|
102
|
-
var key = this._keyPriorReset = this._key;
|
103
|
-
var keyWords = key.words;
|
104
|
-
var keySize = key.sigBytes / 4;
|
105
|
-
|
106
|
-
// Compute number of rounds
|
107
|
-
var nRounds = this._nRounds = keySize + 6;
|
108
|
-
|
109
|
-
// Compute number of key schedule rows
|
110
|
-
var ksRows = (nRounds + 1) * 4;
|
111
|
-
|
112
|
-
// Compute key schedule
|
113
|
-
var keySchedule = this._keySchedule = [];
|
114
|
-
for (var ksRow = 0; ksRow < ksRows; ksRow++) {
|
115
|
-
if (ksRow < keySize) {
|
116
|
-
keySchedule[ksRow] = keyWords[ksRow];
|
117
|
-
} else {
|
118
|
-
t = keySchedule[ksRow - 1];
|
119
|
-
|
120
|
-
if (!(ksRow % keySize)) {
|
121
|
-
// Rot word
|
122
|
-
t = (t << 8) | (t >>> 24);
|
123
|
-
|
124
|
-
// Sub word
|
125
|
-
t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff];
|
126
|
-
|
127
|
-
// Mix Rcon
|
128
|
-
t ^= RCON[(ksRow / keySize) | 0] << 24;
|
129
|
-
} else if (keySize > 6 && ksRow % keySize == 4) {
|
130
|
-
// Sub word
|
131
|
-
t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff];
|
132
|
-
}
|
133
|
-
|
134
|
-
keySchedule[ksRow] = keySchedule[ksRow - keySize] ^ t;
|
135
|
-
}
|
136
|
-
}
|
137
|
-
|
138
|
-
// Compute inv key schedule
|
139
|
-
var invKeySchedule = this._invKeySchedule = [];
|
140
|
-
for (var invKsRow = 0; invKsRow < ksRows; invKsRow++) {
|
141
|
-
var ksRow = ksRows - invKsRow;
|
142
|
-
|
143
|
-
if (invKsRow % 4) {
|
144
|
-
var t = keySchedule[ksRow];
|
145
|
-
} else {
|
146
|
-
var t = keySchedule[ksRow - 4];
|
147
|
-
}
|
148
|
-
|
149
|
-
if (invKsRow < 4 || ksRow <= 4) {
|
150
|
-
invKeySchedule[invKsRow] = t;
|
151
|
-
} else {
|
152
|
-
invKeySchedule[invKsRow] = INV_SUB_MIX_0[SBOX[t >>> 24]] ^ INV_SUB_MIX_1[SBOX[(t >>> 16) & 0xff]] ^
|
153
|
-
INV_SUB_MIX_2[SBOX[(t >>> 8) & 0xff]] ^ INV_SUB_MIX_3[SBOX[t & 0xff]];
|
154
|
-
}
|
155
|
-
}
|
156
|
-
},
|
157
|
-
|
158
|
-
encryptBlock: function (M, offset) {
|
159
|
-
this._doCryptBlock(M, offset, this._keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX);
|
160
|
-
},
|
161
|
-
|
162
|
-
decryptBlock: function (M, offset) {
|
163
|
-
// Swap 2nd and 4th rows
|
164
|
-
var t = M[offset + 1];
|
165
|
-
M[offset + 1] = M[offset + 3];
|
166
|
-
M[offset + 3] = t;
|
167
|
-
|
168
|
-
this._doCryptBlock(M, offset, this._invKeySchedule, INV_SUB_MIX_0, INV_SUB_MIX_1, INV_SUB_MIX_2, INV_SUB_MIX_3, INV_SBOX);
|
169
|
-
|
170
|
-
// Inv swap 2nd and 4th rows
|
171
|
-
var t = M[offset + 1];
|
172
|
-
M[offset + 1] = M[offset + 3];
|
173
|
-
M[offset + 3] = t;
|
174
|
-
},
|
175
|
-
|
176
|
-
_doCryptBlock: function (M, offset, keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX) {
|
177
|
-
// Shortcut
|
178
|
-
var nRounds = this._nRounds;
|
179
|
-
|
180
|
-
// Get input, add round key
|
181
|
-
var s0 = M[offset] ^ keySchedule[0];
|
182
|
-
var s1 = M[offset + 1] ^ keySchedule[1];
|
183
|
-
var s2 = M[offset + 2] ^ keySchedule[2];
|
184
|
-
var s3 = M[offset + 3] ^ keySchedule[3];
|
185
|
-
|
186
|
-
// Key schedule row counter
|
187
|
-
var ksRow = 4;
|
188
|
-
|
189
|
-
// Rounds
|
190
|
-
for (var round = 1; round < nRounds; round++) {
|
191
|
-
// Shift rows, sub bytes, mix columns, add round key
|
192
|
-
var t0 = SUB_MIX_0[s0 >>> 24] ^ SUB_MIX_1[(s1 >>> 16) & 0xff] ^ SUB_MIX_2[(s2 >>> 8) & 0xff] ^ SUB_MIX_3[s3 & 0xff] ^ keySchedule[ksRow++];
|
193
|
-
var t1 = SUB_MIX_0[s1 >>> 24] ^ SUB_MIX_1[(s2 >>> 16) & 0xff] ^ SUB_MIX_2[(s3 >>> 8) & 0xff] ^ SUB_MIX_3[s0 & 0xff] ^ keySchedule[ksRow++];
|
194
|
-
var t2 = SUB_MIX_0[s2 >>> 24] ^ SUB_MIX_1[(s3 >>> 16) & 0xff] ^ SUB_MIX_2[(s0 >>> 8) & 0xff] ^ SUB_MIX_3[s1 & 0xff] ^ keySchedule[ksRow++];
|
195
|
-
var t3 = SUB_MIX_0[s3 >>> 24] ^ SUB_MIX_1[(s0 >>> 16) & 0xff] ^ SUB_MIX_2[(s1 >>> 8) & 0xff] ^ SUB_MIX_3[s2 & 0xff] ^ keySchedule[ksRow++];
|
196
|
-
|
197
|
-
// Update state
|
198
|
-
s0 = t0;
|
199
|
-
s1 = t1;
|
200
|
-
s2 = t2;
|
201
|
-
s3 = t3;
|
202
|
-
}
|
203
|
-
|
204
|
-
// Shift rows, sub bytes, add round key
|
205
|
-
var t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++];
|
206
|
-
var t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++];
|
207
|
-
var t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++];
|
208
|
-
var t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++];
|
209
|
-
|
210
|
-
// Set output
|
211
|
-
M[offset] = t0;
|
212
|
-
M[offset + 1] = t1;
|
213
|
-
M[offset + 2] = t2;
|
214
|
-
M[offset + 3] = t3;
|
215
|
-
},
|
216
|
-
|
217
|
-
keySize: 256/32
|
218
|
-
});
|
219
|
-
|
220
|
-
/**
|
221
|
-
* Shortcut functions to the cipher's object interface.
|
222
|
-
*
|
223
|
-
* @example
|
224
|
-
*
|
225
|
-
* var ciphertext = CryptoJS.AES.encrypt(message, key, cfg);
|
226
|
-
* var plaintext = CryptoJS.AES.decrypt(ciphertext, key, cfg);
|
227
|
-
*/
|
228
|
-
C.AES = BlockCipher._createHelper(AES);
|
229
|
-
}());
|
230
|
-
|
231
|
-
|
232
|
-
return CryptoJS.AES;
|
233
|
-
|
234
|
-
}));
|