1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:47:44 +00:00

LibCrypto: Make Digests able to return bytes

This commit is contained in:
Michel Hermier 2022-01-04 02:34:00 +01:00 committed by Ali Mohammad Pur
parent 3f0e425f1e
commit 22efc34ec5
3 changed files with 10 additions and 2 deletions

View file

@ -64,8 +64,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
while (!file->eof() && !file->has_error())
hash.update(file->read(PAGE_SIZE));
auto digest = hash.digest();
outln("{:hex-dump} {}", ReadonlyBytes(digest.immutable_data(), digest.data_length()), path);
outln("{:hex-dump} {}", hash.digest().bytes(), path);
}
return has_error ? 1 : 0;
}