Closed lewgun closed 8 years ago
如: var crypto = require('crypto'); ... function aesEncrypt(text, secKey) { var cipher = crypto.createCipheriv('AES-128-CBC', secKey, '0102030405060708'); return cipher.update(text, 'utf-8', 'base64') + cipher.final('base64'); } 这段代码如何才能在ng2中使用:
我已经进行的步骤如下:
编译时出现错误: ... Uncaught SyntaxError: Unexpected token < Evaluating http://localhost:3000/crypto ...
thx
如: var crypto = require('crypto'); ... function aesEncrypt(text, secKey) { var cipher = crypto.createCipheriv('AES-128-CBC', secKey, '0102030405060708'); return cipher.update(text, 'utf-8', 'base64') + cipher.final('base64'); } 这段代码如何才能在ng2中使用:
我已经进行的步骤如下:
编译时出现错误: ... Uncaught SyntaxError: Unexpected token < Evaluating http://localhost:3000/crypto ...
thx