MD5Digest: Span-ify

This commit is contained in:
Stenzek
2024-07-18 17:33:15 +10:00
parent 41e15539f9
commit 7217536fdd
5 changed files with 33 additions and 9 deletions

View File

@ -45,7 +45,7 @@ bool CDImageHasher::ReadIndex(CDImage* image, u8 track, u8 index, MD5Digest* dig
return false;
}
digest->Update(sector.data(), static_cast<u32>(sector.size()));
digest->Update(sector);
}
progress_callback->SetProgressValue(index_length);
@ -126,7 +126,7 @@ bool CDImageHasher::GetImageHash(CDImage* image, Hash* out_hash,
}
progress_callback->SetProgressValue(image->GetTrackCount());
digest.Final(out_hash->data());
digest.Final(*out_hash);
return true;
}
@ -137,6 +137,6 @@ bool CDImageHasher::GetTrackHash(CDImage* image, u8 track, Hash* out_hash,
if (!ReadTrack(image, track, &digest, progress_callback))
return false;
digest.Final(out_hash->data());
digest.Final(*out_hash);
return true;
}