aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/misc/aont/package.h
diff options
context:
space:
mode:
authorlloyd <[email protected]>2015-02-05 07:44:25 +0000
committerlloyd <[email protected]>2015-02-05 07:44:25 +0000
commitcb0f83ae63c4555cbdd0607e3a5f6e9260c0d19c (patch)
tree4981027a25fa8074177b97c3a3ca7431f3337deb /src/lib/misc/aont/package.h
parent2c14faf0aa1cfe0f8d70af1938dcad5b4d6d3b59 (diff)
Clean up root dir, remove some unneeded dependencies
Diffstat (limited to 'src/lib/misc/aont/package.h')
-rw-r--r--src/lib/misc/aont/package.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/lib/misc/aont/package.h b/src/lib/misc/aont/package.h
new file mode 100644
index 000000000..76e679490
--- /dev/null
+++ b/src/lib/misc/aont/package.h
@@ -0,0 +1,44 @@
+/*
+* Rivest's Package Tranform
+* (C) 2009 Jack Lloyd
+*
+* Botan is released under the Simplified BSD License (see license.txt)
+*/
+
+#ifndef BOTAN_AONT_PACKAGE_TRANSFORM_H__
+#define BOTAN_AONT_PACKAGE_TRANSFORM_H__
+
+#include <botan/block_cipher.h>
+#include <botan/rng.h>
+
+namespace Botan {
+
+/**
+* Rivest's Package Tranform
+* @param rng the random number generator to use
+* @param cipher the block cipher to use
+* @param input the input data buffer
+* @param input_len the length of the input data in bytes
+* @param output the output data buffer (must be at least
+* input_len + cipher->BLOCK_SIZE bytes long)
+*/
+void BOTAN_DLL aont_package(RandomNumberGenerator& rng,
+ BlockCipher* cipher,
+ const byte input[], size_t input_len,
+ byte output[]);
+
+/**
+* Rivest's Package Tranform (Inversion)
+* @param cipher the block cipher to use
+* @param input the input data buffer
+* @param input_len the length of the input data in bytes
+* @param output the output data buffer (must be at least
+* input_len - cipher->BLOCK_SIZE bytes long)
+*/
+void BOTAN_DLL aont_unpackage(BlockCipher* cipher,
+ const byte input[], size_t input_len,
+ byte output[]);
+
+}
+
+#endif