void GHASH::add_final_block(secure_vector<uint8_t>& hash, size_t ad_len, size_t text_len) { secure_vector<uint8_t> final_block(GCM_BS); store_be<uint64_t>(final_block.data(), 8*ad_len, 8*text_len); ghash_update(hash, final_block.data(), final_block.size()); }
void GHASH::add_final_block(secure_vector<byte>& hash, size_t ad_len, size_t text_len) { secure_vector<byte> final_block(16); store_be<u64bit>(final_block.data(), 8*ad_len, 8*text_len); ghash_update(hash, final_block.data(), final_block.size()); }