vue-cryptojs 2.3.0 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/vue-cryptojs.es5.js +6 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -26,7 +26,7 @@ This wrapper bind `CryptoJS` to `Vue` or `this` if you're using single file comp
|
|
|
26
26
|
Simple AES text encrypt/decrypt example:
|
|
27
27
|
```js
|
|
28
28
|
const encryptedText = this.$CryptoJS.AES.encrypt("Hi There!", "Secret Passphrase").toString()
|
|
29
|
-
const decryptedText = this.$CryptoJS.AES.decrypt(encryptedText, "Secret Passphrase").toString(this
|
|
29
|
+
const decryptedText = this.$CryptoJS.AES.decrypt(encryptedText, "Secret Passphrase").toString(this.$CryptoJS.enc.Utf8)
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
Directly on a template:
|
package/dist/vue-cryptojs.es5.js
CHANGED
|
@@ -4,15 +4,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
|
-
|
|
8
7
|
var _cryptoJs = _interopRequireDefault(require("crypto-js"));
|
|
9
|
-
|
|
10
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
-
|
|
12
9
|
/* eslint-disable */
|
|
10
|
+
|
|
13
11
|
var VueCryptojs = {
|
|
14
12
|
install: function install(Vue, options) {
|
|
15
|
-
Vue.CryptoJS = _cryptoJs["default"];
|
|
13
|
+
Vue.CryptoJS = _cryptoJs["default"];
|
|
14
|
+
|
|
15
|
+
// VueJS 2
|
|
16
16
|
|
|
17
17
|
if (Vue.prototype) {
|
|
18
18
|
Object.defineProperties(Vue.prototype, {
|
|
@@ -27,17 +27,16 @@ var VueCryptojs = {
|
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
|
-
}
|
|
30
|
+
}
|
|
31
31
|
|
|
32
|
+
// VueJS 3
|
|
32
33
|
|
|
33
34
|
if (Vue.config && Vue.config.globalProperties) {
|
|
34
35
|
Vue.config.globalProperties.$CryptoJS = _cryptoJs["default"];
|
|
35
36
|
}
|
|
36
|
-
|
|
37
37
|
if (Vue.provide && typeof Vue.provide === 'function') {
|
|
38
38
|
Vue.provide('cryptojs', _cryptoJs["default"]);
|
|
39
39
|
}
|
|
40
|
-
|
|
41
40
|
if (typeof window !== 'undefined' && window.Vue) {
|
|
42
41
|
window.Vue.use(VueCryptojs);
|
|
43
42
|
}
|