Port changes from
bug 777122 to mfbt/SHA1.h, which makes using SHA1 not a linker error.
--- a/mfbt/SHA1.h
+++ b/mfbt/SHA1.h
@@ -20,27 +20,29 @@
* The finish method may only be called once and cannot be followed by calls
* to update.
*/
#ifndef mozilla_SHA1_h_
#define mozilla_SHA1_h_
#include "mozilla/StandardInteger.h"
+#include "mozilla/Types.h"
+
namespace mozilla {
class SHA1Sum {
union {
uint32_t w[16]; /* input buffer */
uint8_t b[64];
} u;
uint64_t size; /* count of hashed bytes. */
unsigned H[22]; /* 5 state variables, 16 tmp values, 1 extra */
bool mDone;
public:
static const unsigned int HashSize = 20;
- SHA1Sum();
- void update(const void* dataIn, uint32_t len);
- void finish(uint8_t hashout[20]);
+ MFBT_API() SHA1Sum();
+ MFBT_API(void) update(const void* dataIn, uint32_t len);
+ MFBT_API(void) finish(uint8_t hashout[20]);
};
}
#endif /* mozilla_SHA1_h_ */