]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
common,rgw: rename sha1_digest_t 22987/head
authormyoungwon oh <omwmw@sk.com>
Fri, 7 Sep 2018 17:06:47 +0000 (02:06 +0900)
committermyoungwon oh <omwmw@sk.com>
Fri, 7 Sep 2018 17:06:47 +0000 (02:06 +0900)
rename existing sha1_digest_t to sha1_digest_array_t
and add a new sha1_digest_t

Signed-off-by: Myoungwon Oh <omwmw@sk.com>
src/common/buffer.cc
src/include/buffer.h
src/include/types.h
src/osd/PrimaryLogPG.cc
src/rgw/rgw_common.h

index 60359223afb0f865ee4c061669a60ad438b689dd..10b8815282230ed806a6ef4d2b20d1b0daea8f51 100644 (file)
@@ -2467,7 +2467,7 @@ void buffer::list::invalidate_crc()
 #include "common/ceph_crypto.h"
 using ceph::crypto::SHA1;
 
-boost::optional<sha1_digest_info_t> buffer::list::sha1()
+boost::optional<sha1_digest_t> buffer::list::sha1()
 {
   ptr nb;
   unsigned pos = 0;
@@ -2486,7 +2486,7 @@ boost::optional<sha1_digest_info_t> buffer::list::sha1()
   SHA1 sha1_gen;
   sha1_gen.Update((const unsigned char *)nb.c_str(), size);
   sha1_gen.Final(fingerprint);
-  sha1_digest_info_t fp_t(fingerprint);
+  sha1_digest_t fp_t(fingerprint);
   return fp_t;
 }
 
index 9af7e7869a7fa444fdb93bdf3dc10b7648efdedc..a69fb65eacd2c7b6ae5ee621fe72a8847fd3fa46 100644 (file)
@@ -82,7 +82,7 @@ class packet;
 }
 #endif // HAVE_SEASTAR
 class deleter;
-struct sha1_digest_info_t;
+struct sha1_digest_t;
 
 namespace ceph {
 
@@ -956,7 +956,7 @@ namespace buffer CEPH_BUFFER_API {
     }
     uint32_t crc32c(uint32_t crc) const;
     void invalidate_crc();
-    boost::optional<sha1_digest_info_t> sha1(); 
+    boost::optional<sha1_digest_t> sha1(); 
 
     // These functions return a bufferlist with a pointer to a single
     // static buffer. They /must/ not outlive the memory they
index 4bf8e0182c304a4a125096f86aa9e726132f3cc5..73123bc9733f188365509694dea7ed00e3d704b2 100644 (file)
@@ -541,7 +541,7 @@ WRITE_CLASS_ENCODER(errorcode32_t)
 WRITE_EQ_OPERATORS_1(errorcode32_t, code)
 WRITE_CMP_OPERATORS_1(errorcode32_t, code)
 
-struct sha1_digest_info_t {
+struct sha1_digest_t {
 #define SHA1_DIGEST_SIZE 20
   unsigned char v[SHA1_DIGEST_SIZE] = {0};
 
@@ -553,13 +553,13 @@ struct sha1_digest_info_t {
     }
     return string(str);
   }
-  sha1_digest_info_t(unsigned char *_v) {
+  sha1_digest_t(unsigned char *_v) {
     memcpy(v, _v, 20);
   };
-  sha1_digest_info_t() {}
+  sha1_digest_t() {}
 };
 
-inline ostream& operator<<(ostream& out, const sha1_digest_info_t& b)
+inline ostream& operator<<(ostream& out, const sha1_digest_t& b)
 {
   string str = b.to_str();
   return out << str;
index f4012fb0c3c164a732c7be640a1731327e09e776..ba0efb0d8769e0b44088c21582f5e6f00729ffd0 100644 (file)
@@ -2619,7 +2619,7 @@ int PrimaryLogPG::do_manifest_flush(OpRequestRef op, ObjectContextRef obc, Flush
       switch (fp_algo_t) {
        case pg_pool_t::TYPE_FINGERPRINT_SHA1:
          {
-           boost::optional<sha1_digest_info_t> fp_t = chunk_data.sha1();
+           boost::optional<sha1_digest_t> fp_t = chunk_data.sha1();
            object_t fp_oid;
            bufferlist in;
            if (fp_t != boost::none) {
index f3a0ed928d03729f944e6244d9e6ca6cf88ab849..97a1cbf87f7d3d017cbe8f3696ac41cf79ef8947 100644 (file)
@@ -2319,12 +2319,12 @@ extern std::string url_encode(const std::string& src, bool encode_slash = true);
 extern void calc_hmac_sha1(const char *key, int key_len,
                           const char *msg, int msg_len, char *dest);
 
-using sha1_digest_t = \
+using sha1_digest_array_t = \
   std::array<char, CEPH_CRYPTO_HMACSHA1_DIGESTSIZE>;
 
-static inline sha1_digest_t
+static inline sha1_digest_array_t
 calc_hmac_sha1(const boost::string_view& key, const boost::string_view& msg) {
-  sha1_digest_t dest;
+  sha1_digest_array_t dest;
   calc_hmac_sha1(key.data(), key.size(), msg.data(), msg.size(), dest.data());
   return dest;
 }