Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/y4roc/vue-crypt
Vue plugin to encrypt and decrypt messages
https://github.com/y4roc/vue-crypt
Last synced: 12 days ago
JSON representation
Vue plugin to encrypt and decrypt messages
- Host: GitHub
- URL: https://github.com/y4roc/vue-crypt
- Owner: y4roc
- License: mit
- Created: 2019-06-13T10:27:35.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-06-13T10:34:54.000Z (over 5 years ago)
- Last Synced: 2024-04-25T14:43:59.047Z (7 months ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Crypto Vue-Plugin
Easy way to encrypt and decrypt with AES and RSA in Vue with pure JavaScript.
## Installation
```ecmascript 6
import Vue from 'vue'
import vueCrypt from 'vue-crypt'Vue.use(VueCrypt)
```## AES Example
```ecmascript 6
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
```ecmascript 6
// 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)
```