Encrypt / decrypt files

Grunt task to encrypt and decrypt files

Encrypt files :

$ grunt encrypt [--key mysecret]

Decrypt files :

$ grunt decrypt [--key mysecret]

Put this in your grunt config :

  files:[                                   // files to process
      dir:'demo',                           // root dir of files to encrypt / decrypt
      include:'**/*.js',                    // pattern to include files
      encryptedExtension:'.encrypted'       // extension used for encrypted files
    key:grunt.cli.options.key || 'somekey'  // key used to encrypt / decrypt
                                            // for security purpose, prefer to pass it through command line arguments

Same 'crypt' config object is used to encrypt and decrypt files.

Enjoy !