Botan  1.11.15
src/lib/pk_pad/emsa1_bsi/emsa1_bsi.h
Go to the documentation of this file.
00001 /*
00002 * EMSA1 BSI Variant
00003 * (C) 1999-2008 Jack Lloyd
00004 *     2007 FlexSecure GmbH
00005 *
00006 * Botan is released under the Simplified BSD License (see license.txt)
00007 */
00008 
00009 #ifndef BOTAN_EMSA1_BSI_H__
00010 #define BOTAN_EMSA1_BSI_H__
00011 
00012 #include <botan/emsa1.h>
00013 
00014 namespace Botan {
00015 
00016 /**
00017 * EMSA1_BSI is a variant of EMSA1 specified by the BSI. It accepts
00018 * only hash values which are less or equal than the maximum key
00019 * length. The implementation comes from InSiTo
00020 */
00021 class BOTAN_DLL EMSA1_BSI : public EMSA1
00022    {
00023    public:
00024       /**
00025       * @param hash the hash object to use
00026       */
00027       EMSA1_BSI(HashFunction* hash) : EMSA1(hash) {}
00028    private:
00029       secure_vector<byte> encoding_of(const secure_vector<byte>&, size_t,
00030                                      RandomNumberGenerator& rng);
00031    };
00032 
00033 }
00034 
00035 #endif