10225501448 李度 10225101546 陈胤遒 10215501422 高宇菲
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

25 řádky
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_