作者: 韩晨旭 10225101440 李畅 10225102463
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

25 Zeilen
889 B

  1. // Copyright (c) 2011 The LevelDB Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file. See the AUTHORS file for names of contributors.
  4. #ifndef STORAGE_LEVELDB_PORT_SHA1_PORTABLE_H_
  5. #define STORAGE_LEVELDB_PORT_SHA1_PORTABLE_H_
  6. #include <stddef.h>
  7. namespace leveldb {
  8. namespace port {
  9. // Compute the SHA1 hash value of "data[0..len-1]" and store it in
  10. // "hash_array[0..19]". hash_array must have 20 bytes of space available.
  11. //
  12. // This function is portable but may not be as fast as a version
  13. // optimized for your platform. It is provided as a default method
  14. // that can be used when porting leveldb to a new platform if no
  15. // better SHA1 hash implementation is available.
  16. void SHA1_Hash_Portable(const char* data, size_t len, char* hash_array);
  17. }
  18. }
  19. #endif // STORAGE_LEVELDB_PORT_SHA1_PORTABLE_H_