summaryrefslogtreecommitdiff
path: root/secblockfwd.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2019-10-03 04:12:16 -0400
committerJeffrey Walton <noloader@gmail.com>2019-10-03 04:12:16 -0400
commit366fdce86f968500994d9fb81bd0d37053a01126 (patch)
tree38ab77659e3142dabad73e860b339faf1a004dcc /secblockfwd.h
parentf5c817221bace9baec5ace88b3c7588d21a34c0e (diff)
downloadcryptopp-git-366fdce86f968500994d9fb81bd0d37053a01126.tar.gz
Add BytePtr and ConstBytePtr overloads for SecByteBlock (GH #890)
Diffstat (limited to 'secblockfwd.h')
-rw-r--r--secblockfwd.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/secblockfwd.h b/secblockfwd.h
new file mode 100644
index 00000000..d17068ee
--- /dev/null
+++ b/secblockfwd.h
@@ -0,0 +1,29 @@
+// secblockfwd.h - written and placed in the public domain by Jeffrey Walton
+
+/// \file secblockfwd.h
+/// \brief Forward declarations for SecBlock
+/// \details secblock.h and misc.h have a circular dependency. secblockfwd.h
+/// allows the library to sidestep the circular dependency, and reference
+/// SecBlock classes without the full implementation.
+/// \since Crypto++ 8.3
+
+#ifndef CRYPTOPP_SECBLOCKFWD_H
+#define CRYPTOPP_SECBLOCKFWD_H
+
+#include "config.h"
+
+NAMESPACE_BEGIN(CryptoPP)
+
+template <class T, class A>
+class SecBlock;
+
+template <class T, bool A>
+class AllocatorWithCleanup;
+
+typedef SecBlock<byte, AllocatorWithCleanup<byte, false> > SecByteBlock;
+typedef SecBlock<word, AllocatorWithCleanup<word, false> > SecWordBlock;
+typedef SecBlock<byte, AllocatorWithCleanup<byte, true> > AlignedSecByteBlock;
+
+NAMESPACE_END
+
+#endif // CRYPTOPP_SECBLOCKFWD_H