26 add_key(c, c_len, 0x36);
27 encoder.write(
d, d_len );
28 H intermediate = encoder.result();
31 add_key(c, c_len, 0x5c);
32 encoder.write( intermediate.data(), intermediate.data_size() );
33 return encoder.result();
37 void add_key(
const char* c,
const uint32_t c_len,
char pad )
39 if ( c_len > internal_block_size() )
41 H hash = H::hash( c, c_len );
42 add_key( hash.data(), hash.data_size(), pad );
45 for (
unsigned int i = 0; i < internal_block_size(); i++ )
47 encoder.put( pad ^ ((i < c_len) ? *c++ : 0) );
51 unsigned int internal_block_size()
const;
54 typename H::encoder encoder;