Botan  1.11.15
src/lib/kdf/prf_x942/prf_x942.h
Go to the documentation of this file.
00001 /*
00002 * X9.42 PRF
00003 * (C) 1999-2007 Jack Lloyd
00004 *
00005 * Botan is released under the Simplified BSD License (see license.txt)
00006 */
00007 
00008 #ifndef BOTAN_ANSI_X942_PRF_H__
00009 #define BOTAN_ANSI_X942_PRF_H__
00010 
00011 #include <botan/kdf.h>
00012 
00013 namespace Botan {
00014 
00015 /**
00016 * PRF from ANSI X9.42
00017 */
00018 class BOTAN_DLL X942_PRF : public KDF
00019    {
00020    public:
00021       std::string name() const { return "X942_PRF(" + m_key_wrap_oid + ")"; }
00022 
00023       KDF* clone() const { return new X942_PRF(m_key_wrap_oid); }
00024 
00025       size_t kdf(byte key[], size_t key_len,
00026                  const byte secret[], size_t secret_len,
00027                  const byte salt[], size_t salt_len) const override;
00028 
00029       X942_PRF(const std::string& oid);
00030    private:
00031       std::string m_key_wrap_oid;
00032    };
00033 
00034 }
00035 
00036 #endif