Skip to content

Commit 92dcb36

Browse files
Treehugger Robotcjreynol
authored andcommitted
[skip ci] Merge "Update code for Rust 1.83.0" into main
GitOrigin-RevId: a638868
1 parent e3bdeee commit 92dcb36

File tree

1 file changed

+1
-1
lines changed
  • staging/host/commands/secure_env/rust

1 file changed

+1
-1
lines changed

staging/host/commands/secure_env/rust/tpm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ impl TpmHmac {
6060

6161
fn hkdf_expand(&self, info: &[u8], out_len: usize) -> Result<Vec<u8>, Error> {
6262
// HKDF expand: feed the derivation info into HMAC (using the TPM key) repeatedly.
63-
let n = (out_len + SHA256_DIGEST_LEN - 1) / SHA256_DIGEST_LEN;
63+
let n = out_len.div_ceil(SHA256_DIGEST_LEN);
6464
if n > 256 {
6565
return Err(km_err!(UnknownError, "overflow in hkdf"));
6666
}

0 commit comments

Comments
 (0)