void SHA_3::final_result(uint8_t output[]) { SHA_3::finish(m_bitrate, m_S, m_S_pos, 0x06, 0x80); /* * We never have to run the permutation again because we only support * limited output lengths */ copy_out_vec_le(output, m_output_bits/8, m_S); clear(); }
//static void SHA_3::expand(size_t bitrate, secure_vector<uint64_t>& S, uint8_t output[], size_t output_length) { BOTAN_ARG_CHECK(bitrate % 64 == 0, "SHA-3 bitrate must be multiple of 64"); const size_t byterate = bitrate / 8; while(output_length > 0) { const size_t copying = std::min(byterate, output_length); copy_out_vec_le(output, copying, S); output += copying; output_length -= copying; if(output_length > 0) { SHA_3::permute(S.data()); } } }
/* * Copy out the digest */ void MD5::copy_out(uint8_t output[]) { copy_out_vec_le(output, output_length(), m_digest); }
/* * Copy out the digest */ void RIPEMD_160::copy_out(uint8_t output[]) { copy_out_vec_le(output, output_length(), m_digest); }