Vue: Can not use crypto ???

Created on 6 Jul 2016  Â·  1Comment  Â·  Source: vuejs/vue

It is possible to write a demo js ,run with node

test.js

'use strict'

var crypto = require('crypto');
var encrypted = "";
var cip = crypto.createCipher('rc4', 'abc');
encrypted += cip.update('asd', 'binary', 'hex');
encrypted += cip.final('hex');
console.log(encrypted);
$ node text.js
weasdaf // 

qq 20160706180341

qq 20160706180419

but when i use in component,has a mistake

sorry, createCipher is not implemented yet

why?

Most helpful comment

Not related to Vue.js .

>All comments

Not related to Vue.js .

Was this page helpful?
0 / 5 - 0 ratings