[prev in list] [next in list] [prev in thread] [next in thread]
List: ceph-devel
Subject: [PATCH 1/2] extended crypto classes
From: Christian Brunner <chb () muc ! de>
Date: 2011-08-25 11:02:31
Message-ID: 20110825110231.GA6517 () sir ! fritz ! box
[Download RAW message or body]
This patch extends the ceph crypto classes:
- map CryptoPP::HashTransformation to ceph::crypto::Digest (for cryptopp)
- add DigestSize() to ceph::crypto::Digest (for libnss)
Thanks,
Christian
---
src/common/ceph_crypto.h | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/src/common/ceph_crypto.h b/src/common/ceph_crypto.h
index 23a0589..7082317 100644
--- a/src/common/ceph_crypto.h
+++ b/src/common/ceph_crypto.h
@@ -11,6 +11,7 @@
#ifdef USE_CRYPTOPP
# define CRYPTOPP_ENABLE_NAMESPACE_WEAK 1
#include <string.h>
+# include <cryptopp/cryptlib.h>
# include <cryptopp/md5.h>
# include <cryptopp/sha.h>
# include <cryptopp/hmac.h>
@@ -32,6 +33,8 @@ namespace ceph {
}
~HMACSHA1();
};
+
+ class Digest : public CryptoPP::HashTransformation { };
}
}
#elif USE_NSS
@@ -86,6 +89,9 @@ namespace ceph {
assert(dummy == digest_size);
Restart();
}
+ size_t DigestSize() {
+ return digest_size;
+ }
};
class MD5 : public Digest {
public:
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic