8 #include <botan/comb4p.h>     9 #include <botan/internal/xor_buf.h>    16 void comb4p_round(MemoryRegion<byte>& out,
    17                   const MemoryRegion<byte>& in,
    25    h1->update(&in[0], in.size());
    26    h2->update(&in[0], in.size());
    28    SecureVector<byte> h_buf = h1->final();
    41       throw std::invalid_argument(
"Comb4P: Must use two distinct hashes");
    44       throw std::invalid_argument(
"Comb4P: Incompatible hashes " +
    45                                   hash1->
name() + 
" and " +
    73 void Comb4P::add_data(
const byte input[], 
size_t length)
    75    hash1->
update(input, length);
    76    hash2->
update(input, length);
    79 void Comb4P::final_result(
byte out[])
    88    comb4p_round(h2, h1, 1, hash1, hash2);
    91    comb4p_round(h1, h2, 2, hash1, hash2);
 
Comb4P(HashFunction *h1, HashFunction *h2)
size_t hash_block_size() const
void update(const byte in[], size_t length)
void copy_mem(T *out, const T *in, size_t n)
virtual std::string name() const =0
virtual size_t hash_block_size() const
void xor_buf(byte out[], const byte in[], size_t length)
virtual size_t output_length() const =0