Skip to content

Commit f394846

Browse files
authored
Merge pull request #148 from RustCrypto/rename-result-to-finalize
Rename `*result*` to `finalize`
2 parents 355bd75 + 0ec3989 commit f394846

File tree

5 files changed

+22
-22
lines changed

5 files changed

+22
-22
lines changed

Cargo.lock

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

aes-gcm-siv/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ where
367367
block[8..].copy_from_slice(&buffer_bits.to_le_bytes());
368368
self.polyval.update(&block);
369369

370-
let mut tag = self.polyval.result_reset().into_bytes();
370+
let mut tag = self.polyval.finalize_reset().into_bytes();
371371

372372
// XOR the nonce into the resulting tag
373373
for (i, byte) in tag[..12].iter_mut().enumerate() {

aes-gcm/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ where
302302
block[8..].copy_from_slice(&nonce_bits.to_be_bytes());
303303
ghash.update(&block);
304304

305-
ghash.result().into_bytes()
305+
ghash.finalize().into_bytes()
306306
};
307307

308308
Ctr32::new(j0)
@@ -322,6 +322,6 @@ where
322322
block[8..].copy_from_slice(&buffer_bits.to_be_bytes());
323323
ghash.update(&block);
324324

325-
ghash.result().into_bytes()
325+
ghash.finalize().into_bytes()
326326
}
327327
}

aes-siv/src/siv.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ where
263263
T: AsRef<[u8]>,
264264
{
265265
mac.update(&Tag::default());
266-
let mut state = mac.result_reset().into_bytes();
266+
let mut state = mac.finalize_reset().into_bytes();
267267

268268
for (i, header) in headers.into_iter().enumerate() {
269269
if i >= MAX_HEADERS {
@@ -272,7 +272,7 @@ where
272272

273273
state = state.dbl();
274274
mac.update(header.as_ref());
275-
let code = mac.result_reset().into_bytes();
275+
let code = mac.finalize_reset().into_bytes();
276276
xor_in_place(&mut state, &code);
277277
}
278278

@@ -288,7 +288,7 @@ where
288288
};
289289

290290
mac.update(state.as_ref());
291-
Ok(mac.result_reset().into_bytes())
291+
Ok(mac.finalize_reset().into_bytes())
292292
}
293293

294294
/// XOR the second argument into the first in-place. Slices do not have to be

chacha20poly1305/src/cipher.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ where
6464
self.mac.update_padded(buffer);
6565

6666
self.authenticate_lengths(associated_data, buffer)?;
67-
Ok(self.mac.result().into_bytes())
67+
Ok(self.mac.finalize().into_bytes())
6868
}
6969

7070
/// Decrypt the given message, first authenticating ciphertext integrity

0 commit comments

Comments
 (0)