/*
 * Mootools wrapper for the SHA1 functions.
 * This adds String.sha1 and String.hmac_sha1
 * Requires http://pajhome.org.uk/crypt/md5/sha1src.html
 * usage: "some string".hmac_sha1("key");
 */
String.prototype.sha1 = function(output){
	if(output == 'base64'){
		return b64_sha1(this);
	}
	else if(output == 'hex') {
		return hex_sha1(this);
	}
	else{
		return str_sha1(this);
	}
}

String.prototype.hmac_sha1 = function(key, output){
	if(output == 'base64'){
		return b64_hmac_sha1(key, this);
	}
	else if(output == 'hex'){
		return hex_hmac_sha1(key, this);
	}
	else{
		return str_hmac_sha1(key, this);
	}
}