From 4d690ffbaaa86ff169c3cd65977a0ba7808abd55 Mon Sep 17 00:00:00 2001 From: Tony Arcieri Date: Tue, 2 Jun 2020 16:49:48 -0700 Subject: [PATCH] Rename `*result*` to `finalize` Implements the API changes from: https://github.com/RustCrypto/traits/pull/161 The `hmac` crate now uses `update` and `finalize` nomenclature ala the Initialize-Update-Finalize (IUF) interface naming scheme. --- hkdf/src/hkdf.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hkdf/src/hkdf.rs b/hkdf/src/hkdf.rs index 33e78dc..8d97271 100644 --- a/hkdf/src/hkdf.rs +++ b/hkdf/src/hkdf.rs @@ -93,7 +93,7 @@ where hmac.update(ikm); - let prk = hmac.result().into_bytes(); + let prk = hmac.finalize().into_bytes(); let hkdf = Hkdf::from_prk(&prk).expect("PRK size is correct"); (prk, hkdf) } @@ -119,7 +119,7 @@ where hmac.update(info); hmac.update(&[blocknum as u8 + 1]); - let output = hmac.result_reset().into_bytes(); + let output = hmac.finalize_reset().into_bytes(); okm_block.copy_from_slice(&output[..block_len]); prev = Some(output);