summaryrefslogtreecommitdiff
path: root/port
diff options
context:
space:
mode:
Diffstat (limited to 'port')
-rw-r--r--port/port_android.h8
-rw-r--r--port/port_chromium.h7
-rw-r--r--port/port_example.h5
-rw-r--r--port/port_posix.h5
4 files changed, 0 insertions, 25 deletions
diff --git a/port/port_android.h b/port/port_android.h
index 8680951..13df9c9 100644
--- a/port/port_android.h
+++ b/port/port_android.h
@@ -10,7 +10,6 @@
#include <endian.h>
#include <pthread.h>
#include <stdint.h>
-#include <sha1.h>
#include <cstdatomic>
#include <string>
#include <cctype>
@@ -134,13 +133,6 @@ inline bool Snappy_Uncompress(
return false;
}
-inline void SHA1_Hash(const char* data, size_t len, char* hash_array) {
- SHA1_CTX sha1_ctx;
- SHA1Init(&sha1_ctx);
- SHA1Update(&sha1_ctx, (const u_char*)data, len);
- SHA1Final((u_char*)hash_array, &sha1_ctx);
-}
-
inline uint64_t ThreadIdentifier() {
pthread_t tid = pthread_self();
uint64_t r = 0;
diff --git a/port/port_chromium.h b/port/port_chromium.h
index e349f8f..1851e6e 100644
--- a/port/port_chromium.h
+++ b/port/port_chromium.h
@@ -13,7 +13,6 @@
#include "base/atomicops.h"
#include "base/basictypes.h"
#include "base/logging.h"
-#include "base/sha1.h"
#include "base/synchronization/condition_variable.h"
#include "base/synchronization/lock.h"
@@ -83,12 +82,6 @@ class AtomicPointer {
}
};
-inline void SHA1_Hash(const char* data, size_t len, char* hash_array) {
- return ::base::SHA1HashBytes(reinterpret_cast<const unsigned char*>(data),
- len,
- reinterpret_cast<unsigned char*>(hash_array));
-}
-
bool Snappy_Compress(const char* input, size_t input_length,
std::string* output);
bool Snappy_Uncompress(const char* input_data, size_t input_length,
diff --git a/port/port_example.h b/port/port_example.h
index cf72617..8a624f3 100644
--- a/port/port_example.h
+++ b/port/port_example.h
@@ -89,11 +89,6 @@ class AtomicPointer {
void NoBarrier_Store(void* v);
};
-// ------------------ Checksumming -------------------
-
-// Store a 160-bit hash of "data[0..len-1]" in "hash_array[0]..hash_array[19]"
-extern void SHA1_Hash(const char* data, size_t len, char* hash_array);
-
// ------------------ Compression -------------------
// Store the snappy compression of "input[0,input_length-1]" in *output.
diff --git a/port/port_posix.h b/port/port_posix.h
index 7adbc01..c158db1 100644
--- a/port/port_posix.h
+++ b/port/port_posix.h
@@ -13,7 +13,6 @@
#include <string>
#include <cstdatomic>
#include <cstring>
-#include "port/sha1_portable.h"
namespace leveldb {
namespace port {
@@ -73,10 +72,6 @@ class AtomicPointer {
}
};
-inline void SHA1_Hash(const char* data, size_t len, char* hash_array) {
- SHA1_Hash_Portable(data, len, hash_array);
-}
-
// TODO(gabor): Implement actual compress
inline bool Snappy_Compress(const char* input, size_t input_length,
std::string* output) {