mirror of
https://github.com/jedisct1/libsodium.git
synced 2024-12-19 18:15:18 -07:00
Simplify
This commit is contained in:
parent
6a81ad2b25
commit
3105de25da
@ -358,14 +358,7 @@ gh_ad_blocks(const State *st, GHash *sth, const unsigned char *ad, size_t ad_len
|
||||
sth->acc = gcm_reduce(u);
|
||||
}
|
||||
if (i < ad_len) {
|
||||
const size_t n = (ad_len - i) / 16;
|
||||
I256 u = gh_update0(sth, ad + i, st->hx[n - 1 - 0]);
|
||||
size_t j;
|
||||
|
||||
for (j = 1; j < n; j += 1) {
|
||||
gh_update(&u, ad + i + j * 16, st->hx[n - 1 - j]);
|
||||
}
|
||||
i += n * 16;
|
||||
I256 u = gh_update0(sth, ad + i, st->hx[0]);
|
||||
sth->acc = gcm_reduce(u);
|
||||
}
|
||||
}
|
||||
|
@ -372,14 +372,7 @@ gh_ad_blocks(const State *st, GHash *sth, const unsigned char *ad, size_t ad_len
|
||||
sth->acc = gcm_reduce(u);
|
||||
}
|
||||
if (i < ad_len) {
|
||||
const size_t n = (ad_len - i) / 16;
|
||||
I256 u = gh_update0(sth, ad + i, st->hx[n - 1 - 0]);
|
||||
size_t j;
|
||||
|
||||
for (j = 1; j < n; j += 1) {
|
||||
gh_update(&u, ad + i + j * 16, st->hx[n - 1 - j]);
|
||||
}
|
||||
i += n * 16;
|
||||
I256 u = gh_update0(sth, ad + i, st->hx[0]);
|
||||
sth->acc = gcm_reduce(u);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user