Botan  1.11.15
src/lib/misc/aont/package.h
Go to the documentation of this file.
00001 /*
00002 * Rivest's Package Tranform
00003 * (C) 2009 Jack Lloyd
00004 *
00005 * Botan is released under the Simplified BSD License (see license.txt)
00006 */
00007 
00008 #ifndef BOTAN_AONT_PACKAGE_TRANSFORM_H__
00009 #define BOTAN_AONT_PACKAGE_TRANSFORM_H__
00010 
00011 #include <botan/block_cipher.h>
00012 #include <botan/rng.h>
00013 
00014 namespace Botan {
00015 
00016 /**
00017 * Rivest's Package Tranform
00018 * @param rng the random number generator to use
00019 * @param cipher the block cipher to use
00020 * @param input the input data buffer
00021 * @param input_len the length of the input data in bytes
00022 * @param output the output data buffer (must be at least
00023 *        input_len + cipher->BLOCK_SIZE bytes long)
00024 */
00025 void BOTAN_DLL aont_package(RandomNumberGenerator& rng,
00026                             BlockCipher* cipher,
00027                             const byte input[], size_t input_len,
00028                             byte output[]);
00029 
00030 /**
00031 * Rivest's Package Tranform (Inversion)
00032 * @param cipher the block cipher to use
00033 * @param input the input data buffer
00034 * @param input_len the length of the input data in bytes
00035 * @param output the output data buffer (must be at least
00036 *        input_len - cipher->BLOCK_SIZE bytes long)
00037 */
00038 void BOTAN_DLL aont_unpackage(BlockCipher* cipher,
00039                               const byte input[], size_t input_len,
00040                               byte output[]);
00041 
00042 }
00043 
00044 #endif