Botan  1.11.15
Public Types | Public Member Functions | Static Public Member Functions
Botan::PSSR Class Reference

#include <pssr.h>

Inheritance diagram for Botan::PSSR:
Botan::EMSA

List of all members.

Public Types

typedef SCAN_Name Spec

Public Member Functions

 PSSR (HashFunction *hash)
 PSSR (HashFunction *hash, size_t salt_size)

Static Public Member Functions

static PSSRmake (const Spec &spec)

Detailed Description

PSSR (called EMSA4 in IEEE 1363 and in old versions of the library)

Definition at line 19 of file pssr.h.


Member Typedef Documentation

typedef SCAN_Name Botan::EMSA::Spec [inherited]

Definition at line 23 of file emsa.h.


Constructor & Destructor Documentation

Parameters:
hashthe hash object to use

Definition at line 146 of file pssr.cpp.

Referenced by make().

                          :
   SALT_SIZE(h->output_length()), hash(h)
   {
   }
Botan::PSSR::PSSR ( HashFunction hash,
size_t  salt_size 
)
Parameters:
hashthe hash object to use
salt_sizethe size of the salt to use in bytes

Definition at line 151 of file pssr.cpp.

                                            :
   SALT_SIZE(salt_size), hash(h)
   {
   }

Member Function Documentation

PSSR * Botan::PSSR::make ( const Spec spec) [static]

Definition at line 15 of file pssr.cpp.

References Botan::SCAN_Name::arg(), Botan::SCAN_Name::arg_as_integer(), and PSSR().

   {
   if(request.arg(1, "MGF1") != "MGF1")
      return nullptr;

   auto hash = make_a<HashFunction>(request.arg(0));

   if(!hash)
      return nullptr;

   const size_t salt_size = request.arg_as_integer(2, hash->output_length());

   return new PSSR(hash, salt_size);
   }

The documentation for this class was generated from the following files: