<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -466,21 +466,3 @@ function authS3(channel, resource) {
     channel.setRequestHeader(&quot;Authorization&quot;, authString, false);
   }
 }
-
-function hmacSHA1(data, secret) {
-  var uconv = CC[&quot;@mozilla.org/intl/scriptableunicodeconverter&quot;]
-              .createInstance(CI.nsIScriptableUnicodeConverter);
-  uconv.charset = &quot;utf-8&quot;;
-
-  var dataarray = uconv.convertToByteArray(data, []);
-
-  var keyObject = CC[&quot;@mozilla.org/security/keyobjectfactory;1&quot;]
-                  .getService(CI.nsIKeyObjectFactory)
-                  .keyFromString(CI.nsIKeyObject.HMAC, secret);
-
-  var cryptoHMAC = CC[&quot;@mozilla.org/security/hmac;1&quot;]
-                   .createInstance(CI.nsICryptoHMAC);
-  cryptoHMAC.init(CI.nsICryptoHMAC.SHA1, keyObject);
-  cryptoHMAC.update(dataarray, dataarray.length);
-  return cryptoHMAC.finish(true);
-}</diff>
      <filename>components/S3Protocol.js</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
-var EXPORTED_SYMBOLS = ['s3_auth'];
+var EXPORTED_SYMBOLS = ['s3_auth', 'hmacSHA1'];
 
 var loginManager = Components.classes[&quot;@mozilla.org/login-manager;1&quot;]
                      .getService(Components.interfaces.nsILoginManager);
@@ -7,6 +7,25 @@ var nsLoginInfo = new Components.Constructor(&quot;@mozilla.org/login-manager/loginIn
                                              Components.interfaces.nsILoginInfo,
 					     &quot;init&quot;);
 
+function hmacSHA1(data, secret) {
+  var uconv = Components.classes[&quot;@mozilla.org/intl/scriptableunicodeconverter&quot;]
+              .createInstance(Components.interfaces.nsIScriptableUnicodeConverter);
+  uconv.charset = &quot;utf-8&quot;;
+
+  var dataarray = uconv.convertToByteArray(data, []);
+
+  var keyObject = Components.classes[&quot;@mozilla.org/security/keyobjectfactory;1&quot;]
+                  .getService(Components.interfaces.nsIKeyObjectFactory)
+                  .keyFromString(Components.interfaces.nsIKeyObject.HMAC, secret);
+
+  var cryptoHMAC = Components.classes[&quot;@mozilla.org/security/hmac;1&quot;]
+                   .createInstance(Components.interfaces.nsICryptoHMAC);
+  cryptoHMAC.init(Components.interfaces.nsICryptoHMAC.SHA1, keyObject);
+  cryptoHMAC.update(dataarray, dataarray.length);
+  return cryptoHMAC.finish(true);
+}
+
+
 function getLogins() {
   return loginManager.findLogins({}, 'chrome://s3', 'S3 Credentials', null);
 }</diff>
      <filename>modules/auth.js</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>aaabd3753a0104d877fda79773774c96835840fa</id>
    </parent>
  </parents>
  <author>
    <name>Jesse Andrews</name>
    <email>anotherjesse@gmail.com</email>
  </author>
  <url>http://github.com/anotherjesse/s3/commit/8ea9277caa72fd1fd66934d46b7158b47bcf7bee</url>
  <id>8ea9277caa72fd1fd66934d46b7158b47bcf7bee</id>
  <committed-date>2008-09-22T07:58:02-07:00</committed-date>
  <authored-date>2008-09-22T07:58:02-07:00</authored-date>
  <message>move hmacSHA1 into module so it can be used from chrome</message>
  <tree>0ee77cf72a879be18e053880548bca60e50969cd</tree>
  <committer>
    <name>Jesse Andrews</name>
    <email>anotherjesse@gmail.com</email>
  </committer>
</commit>
