UNPKG

vue-cryptojs

Version:

A small wrapper for integrating crypto-js into VueJS

29 lines (21 loc) 596 B
# vue-cryptojs A small wrapper for integrating crypto-js into VueJS ## How to install: ```bash npm install vue-cryptojs ``` And in your entry file: ```js import Vue from 'vue' import VueCryptojs from 'vue-cryptojs' Vue.use(VueCryptojs) ``` ## Usage: This wrapper bind `CryptoJS` to `Vue` or `this` if you're using single file component. You can use `crypto-js` like this: ```js Vue.CryptoJS.HmacSHA1('Message','Key') this.CryptoJS.HmacSHA1('Message','Key') this.$CryptoJS.HmacSHA1('Message','Key') ``` Please kindly check full documention of [crypto-js](https://github.com/brix/crypto-js)