vue-crypt

1.0.0 • Public • Published

Crypto Vue-Plugin

Easy way to encrypt and decrypt with AES and RSA in Vue with pure JavaScript.

Installation

import Vue from 'vue'
import vueCrypt from 'vue-crypt'
 
Vue.use(VueCrypt)

AES Example

this.$aes.setKey('myPassword')
 
let encrypted = this.$aes.encrypt('Secret message')
let decrypted = this.$aes.decrypt(encrypted)
 
// Console print message "Secret message"
console.log(decrypted)

RSA Example

// Generate new Key with 1024 Bits
this.$rsa.setBit(1024)
 
let encrypted = this.$rsa.encrypt('Top-Secret message')
let decrypted = this.$rsa.decrypt(encrypted)
 
// Console print message "Top-Secret message"
console.log(decrypted)

Package Sidebar

Install

npm i vue-crypt

Weekly Downloads

105

Version

1.0.0

License

MIT

Unpacked Size

4.33 kB

Total Files

6

Last publish

Collaborators

  • thhan