Skip to content

Commit d04bd24

Browse files
committed
v1.6.0 Cherus
1 parent 9222c01 commit d04bd24

File tree

22 files changed

+273
-217
lines changed

22 files changed

+273
-217
lines changed

package-lock.json

Lines changed: 59 additions & 67 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "make-zero",
3-
"version": "1.5.2",
3+
"version": "1.6.0",
44
"description": "Encrypt & decrypt your texts in any site. / 文字加密、解密工具",
55
"directories": {
66
"lib": "lib"
@@ -20,7 +20,7 @@
2020
"@types/jest": "^26.0.22",
2121
"@types/jquery": "^3.5.4",
2222
"babel-loader": "^8.2.2",
23-
"babel-plugin-import": "^1.13.3",
23+
"babel-plugin-component": "^1.1.1",
2424
"copy-webpack-plugin": "^6.3.2",
2525
"css-loader": "^5.0.1",
2626
"deepmerge": "^4.2.2",
@@ -50,4 +50,4 @@
5050
"vue-i18n": "^8.22.2",
5151
"vue-router": "^3.4.9"
5252
}
53-
}
53+
}

src/locale/components/app.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
module.exports = {
22
en: {
3-
name: "Make Zero - Dec/Enc Your Words",
3+
name: "Make Zero - Text Encryption",
44
description: 'Encrypt & decrypt your texts in any site.'
55
},
66
zh_CN: {
77
name: "Make Zero - 文字加密工具",
8-
description: '便捷地加解密你在社交网站上的文字发言,只有拥有相同密码的人才能阅读。'
8+
description: '便捷地加解密你在网络上的文本,只有知晓密码的人才能阅读。'
99
}
1010
}

src/locale/components/setting.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ module.exports = {
1313
remark: {
1414
1: 'Fixed and short',
1515
2: 'Random and short',
16-
3: 'Morse code'
16+
3: 'Morse code',
17+
4: 'Cherus'
1718
}
1819
}
1920
},
@@ -31,7 +32,8 @@ module.exports = {
3132
remark: {
3233
1: '等长唯一',
3334
2: '等长随机',
34-
3: '摩斯码'
35+
3: '摩斯码',
36+
4: '切噜语'
3537
}
3638
}
3739
},

src/locale/components/version.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ module.exports = {
4545
},
4646
"1_5_2": {
4747
"0": "Fix some bugs of cryptor1 and cryptor2"
48+
},
49+
"1_6_0": {
50+
"0": "Support new ciphertext format: Cherus"
4851
}
4952
},
5053
zh_CN: {
@@ -96,6 +99,9 @@ module.exports = {
9699
},
97100
"1_5_2": {
98101
"0": "修复加密器1和加密器2的一些 bug"
102+
},
103+
"1_6_0": {
104+
"0": "支持新的密文风格:切噜语"
99105
}
100106
}
101107
}

src/view/guide/components/AutoDecryption.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export default {
3232
this.foo = this.$t('guide.welcome')
3333
cryptorConfig.getAutoDecrypt(ad => {
3434
this.on = ad
35-
if (!this.on) this.foo = cryptor.encrypt(this.foo)
35+
!ad && cryptor.encrypt(this.foo, cipher => this.foo = cipher)
3636
})
3737
}
3838
}

src/view/guide/element.js

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,13 @@ import {
1010
} from 'element-ui'
1111

1212
Vue.use(Alert)
13-
import 'element-ui/lib/theme-chalk/alert.css'
1413
Vue.use(Aside)
15-
import 'element-ui/lib/theme-chalk/aside.css'
1614
Vue.use(Button)
17-
import 'element-ui/lib/theme-chalk/button.css'
1815
Vue.use(Container)
19-
import 'element-ui/lib/theme-chalk/container.css'
2016
Vue.use(Form)
21-
import 'element-ui/lib/theme-chalk/form.css'
2217
Vue.use(FormItem)
23-
import 'element-ui/lib/theme-chalk/form-item.css'
2418
Vue.use(Icon)
25-
import 'element-ui/lib/theme-chalk/icon.css'
2619
Vue.use(Input)
27-
import 'element-ui/lib/theme-chalk/input.css'
2820
Vue.use(Main)
29-
import 'element-ui/lib/theme-chalk/main.css'
3021
Vue.use(Menu)
31-
import 'element-ui/lib/theme-chalk/menu.css'
32-
Vue.use(MenuItem)
33-
import 'element-ui/lib/theme-chalk/menu-item.css'
22+
Vue.use(MenuItem)

src/view/plugin/element-ui.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/view/popup/element.js

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -14,42 +14,22 @@ import {
1414
} from 'element-ui'
1515

1616
Vue.use(Aside)
17-
import 'element-ui/lib/theme-chalk/aside.css'
1817
Vue.use(Button)
19-
import 'element-ui/lib/theme-chalk/button.css'
2018
Vue.use(Col)
21-
import 'element-ui/lib/theme-chalk/col.css'
2219
Vue.use(Container)
23-
import 'element-ui/lib/theme-chalk/container.css'
2420
Vue.use(Form)
25-
import 'element-ui/lib/theme-chalk/form.css'
2621
Vue.use(FormItem)
27-
import 'element-ui/lib/theme-chalk/form-item.css'
2822
Vue.use(Icon)
29-
import 'element-ui/lib/theme-chalk/icon.css'
3023
Vue.use(Input)
31-
import 'element-ui/lib/theme-chalk/input.css'
3224
Vue.use(Main)
33-
import 'element-ui/lib/theme-chalk/main.css'
3425
Vue.use(Menu)
35-
import 'element-ui/lib/theme-chalk/menu.css'
3626
Vue.use(MenuItem)
37-
import 'element-ui/lib/theme-chalk/menu-item.css'
3827
Vue.prototype.$notify = Notification
39-
import 'element-ui/lib/theme-chalk/notification.css'
4028
Vue.use(Option)
41-
import 'element-ui/lib/theme-chalk/option.css'
4229
Vue.use(Row)
43-
import 'element-ui/lib/theme-chalk/row.css'
4430
Vue.use(Select)
45-
import 'element-ui/lib/theme-chalk/select.css'
4631
Vue.use(Switch)
47-
import 'element-ui/lib/theme-chalk/switch.css'
4832
Vue.use(Tag)
49-
import 'element-ui/lib/theme-chalk/tag.css'
5033
Vue.use(Timeline)
51-
import 'element-ui/lib/theme-chalk/timeline.css'
5234
Vue.use(TimelineItem)
53-
import 'element-ui/lib/theme-chalk/timeline-item.css'
54-
Vue.use(Tooltip)
55-
import 'element-ui/lib/theme-chalk/tooltip.css'
35+
Vue.use(Tooltip)

src/zero/cryptor/algorithm/string-process.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,22 @@ export function ringToUnicodes(passwordNumber: number, source: string): number[]
5050
*/
5151
export function ringFromUnicodes(passwordNumber: number, source: number[]): string {
5252
return unicodes2Str(source.map(mn => mn ^ passwordNumber))
53+
}
54+
55+
/**
56+
* Get the max length of unicodes
57+
*
58+
* @param cipherUnicodes
59+
*/
60+
export function maxUnicodeLength(cipherUnicodes: number[]) {
61+
let length = 1
62+
let max = 1
63+
cipherUnicodes.forEach(unicode => {
64+
while (max < unicode) {
65+
max <<= 1
66+
max += 1
67+
length++
68+
}
69+
})
70+
return length
5371
}

0 commit comments

Comments
 (0)