{"size": 1454, "ext": "js", "max_stars_repo_path": "WebSites/WebSiteTestJSCrypto/pkcs5.js", "max_stars_repo_name": "amoedo/crmlicensing", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "WebSites/WebSiteTestJSCrypto/pkcs5.js", "max_issues_repo_name": "amoedo/crmlicensing", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "WebSites/WebSiteTestJSCrypto/pkcs5.js", "max_forks_repo_name": "amoedo/crmlicensing", "max_forks_repo_forks_event_min_datetime": "2020-05-04T03:03:17.000Z", "max_forks_repo_forks_event_max_datetime": "2020-05-04T03:03:17.000Z"}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 21.3823529412, "max_line_length": 72, "alphanum_fraction": 0.6629986245}
/* jscrypto library, aes in cbc mode with padding
 *   by GUAN Zhi <guanzhi at guanzhi dot org>
 */

if (typeof(jscrypto) == 'undefined') { jscrypto = {}; };
if (typeof(jscrypto.pkcs5) == 'undefined') { jscrypto.pkcs5 = {}; };

jscrypto.pkcs5.kdf1 = function(passwd, salt, count, digest) {
	this.salt = typeof(salt) != 'undefined' ? salt : 
		jscrypto.rand.bytes(jscrypto.pkcs5.defaultSaltLength);
	this.count = typeof(count) == 'undefined' ? count :
		jscrypto.pkcs5.defaultCount;
	this.digest = typeof(digest) != 'undefined' ? digest :
		jscrypto.pkcs5.defaultDigest;
	this.key = password.toBytes().concat(salt);
	for (var i = 0; i < count; i++) {
		this.key = digest.digest(this.key);
	}
};

jscrypto.pkcs5.kdf1.prototype = {
	
	generateKey: function(password, salt) {
		this.salt = typeof(salt) != 'undefined' ? salt : 
		jscrypto.rand.bytes(jscrypto.pkcs5.defaultSaltLength);
	},
	
	toString: function() {
	}
	
};

jscrypto.pkcs5.pbkdf2 = function(digest, password, salt, count) {
	
	var prf = function(p, s, c, n) {
	};
	
};

jscrypto.pkcs5.pbes1 = function(password, salt, count, digest, cipher) {
	this.digest = digest;
	this.salt = salt.slice(0);
	this.key = jscrypto.pkcs5.kdf1
};

jscrypto.pkcs5.pbes1.prototype = {
	
	encryptUpdate: function(d) {
	},
	
	encryptFinal: function(d) {
	},
	
	decryptUpdate: function(d) {
	},
	
	decryptFinal: function(d) {
	}
	
};


jscrypto.pkcs5.pbes2 = function(password, salt, count, digest, cipher) {
};



