Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Encrypt / decrypt files
JavaScript
Tag: 0.0.5

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
demo
tasks
.gitignore
EUPL-1.1.txt
README.md
grunt.js
package.json

README.md

grunt-contrib-crypt

Grunt task to encrypt and decrypt files

Usage

Encrypt files :

$ grunt encrypt [--key mysecret]

Decrypt files :

$ grunt decrypt [--key mysecret]

Configuration

Put this in your grunt config :

crypt:{
  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
    }
  ],
  options:{
    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 !

Something went wrong with that request. Please try again.