commit 08fde33db86f947303b90770c4fb5a3a79be6c06
Author: Tom Hughes <tom@compton.nu>
Date: Sun Mar 10 18:42:50 2013 +0000
Remove fallback to javascript SHA1 implementation
diff --git a/lib/oauth.js b/lib/oauth.js
index b4873b2..4ec983e 100644
--- a/lib/oauth.js
+++ b/lib/oauth.js
@@ -1,5 +1,4 @@
var crypto= require('crypto'),
- sha1= require('./sha1'),
http= require('http'),
https= require('https'),
URL= require('url'),
@@ -209,12 +208,7 @@ exports.OAuth.prototype._createSignature= function(signatureBase, tokenSecret) {
hash= crypto.createSign("RSA-SHA1").update(signatureBase).sign(key, 'base64');
}
else {
- if( crypto.Hmac ) {
- hash = crypto.createHmac("sha1", key).update(signatureBase).digest("base64");
- }
- else {
- hash= sha1.HMACSHA1(key, signatureBase);
- }
+ hash = crypto.createHmac("sha1", key).update(signatureBase).digest("base64");
}
return hash;
}