You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -301,17 +299,15 @@ impl<'de> Deserialize<'de> for LargeBlobsResponse {
301
299
let(mut large_blob,mut hash_slice) =
302
300
payload.split_at(payload.len() - 16);
303
301
304
-
letmut hasher = Sha256::new();
305
-
hasher.update(large_blob);
306
-
let expected_hash = hasher.finalize();
302
+
let expected_hash = Sha256::digest(large_blob);
307
303
// The initial serialized large-blob array is the value of the serialized large-blob array on a fresh authenticator, as well as immediately after a reset. It is the byte string h'8076be8b528d0075f7aae98d6fa57a6d3c', which is an empty CBOR array (80) followed by LEFT(SHA-256(h'80'), 16).
// Once complete, the platform MUST confirm that the embedded SHA-256 hash is correct, based on the definition above. If not, the configuration is corrupt and the platform MUST discard it and act as if the initial serialized large-blob array was received.
0 commit comments