{"size": 513, "ext": "js", "max_stars_repo_path": "TriggerProvider/crypto.js", "max_stars_repo_name": "tareqmamari/wsk-pkg-imap", "max_stars_repo_stars_event_min_datetime": "2017-08-04T02:33:05.000Z", "max_stars_repo_stars_event_max_datetime": "2017-08-04T02:33:05.000Z", "max_issues_repo_path": "TriggerProvider/crypto.js", "max_issues_repo_name": "tareqmamari/wsk-pkg-imap", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "TriggerProvider/crypto.js", "max_forks_repo_name": "tareqmamari/wsk-pkg-imap", "max_forks_repo_forks_event_min_datetime": "2016-10-29T13:35:11.000Z", "max_forks_repo_forks_event_max_datetime": "2018-06-01T06:42:41.000Z"}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": 2, "avg_line_length": 25.65, "max_line_length": 58, "alphanum_fraction": 0.7153996101}
var crypto = require('crypto'),
	algorithm = 'aes-128-cbc',
	password = process.env.cryptoPass;

function encrypt(text) {
	var cipher = crypto.createCipher(algorithm, password)
	var crypted = cipher.update(text, 'utf8', 'hex')
	crypted += cipher.final('hex');
	return crypted;
}

function decrypt(text) {
	var decipher = crypto.createDecipher(algorithm, password)
	var dec = decipher.update(text, 'hex', 'utf8')
	dec += decipher.final('utf8');
	return dec;
}

exports.encrypt = encrypt;
exports.decrypt = decrypt;