encrypt.js 721 B

1234567891011121314151617181920
  1. /**
  2. * 加密配置
  3. * @param {String} type - bytecode || confusion || strict (first confusion and then bytecode)
  4. * @param {Array} directory - directory to be encrypted
  5. * @param {Array} fileExt - file suffix to be encrypted, currently only .js is supported
  6. * @param {Array} confusionOptions options
  7. */
  8. module.exports = {
  9. type: 'confusion',
  10. directory: [
  11. 'electron'
  12. ],
  13. fileExt: ['.js'],
  14. confusionOptions: {
  15. compact: true, // 将代码压缩为1行
  16. stringArray: true, // 删除字符串文本并将其放置在特殊数组中
  17. stringArrayEncoding: ['base64'], // 对stringArray编码 'none', 'base64', 'rc4',增加安全性
  18. deadCodeInjection: false, // 是否注入死代码
  19. }
  20. };