前后端加密的方法
1. nodejs自带的cryptoconst crypto = require('crypto');function aesEncrypt(data, key) { const cipher = crypto.createCipher('aes192', key); var crypted = cipher.update(data, 'utf8', 'hex'); crypted += cipher.final('hex'); return crypted;}f
原创
2021-10-06 09:54:56 ·
2130 阅读 ·
0 评论