1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 07:37:35 +00:00

LibCrypto: Convert StringBuilder::appendf() => AK::Format

This commit is contained in:
Andreas Kling 2021-05-07 11:42:33 +02:00
parent c2a8869c1f
commit e76956f712
2 changed files with 9 additions and 13 deletions

View file

@ -26,8 +26,8 @@ constexpr void swap_keys(u32* keys, size_t i, size_t j)
String AESCipherBlock::to_string() const
{
StringBuilder builder;
for (size_t i = 0; i < BlockSizeInBits / 8; ++i)
builder.appendf("%02x", m_data[i]);
for (auto value : m_data)
builder.appendff("{:02x}", value);
return builder.build();
}
@ -35,7 +35,7 @@ String AESCipherKey::to_string() const
{
StringBuilder builder;
for (size_t i = 0; i < (rounds() + 1) * 4; ++i)
builder.appendf("%02x", m_rd_keys[i]);
builder.appendff("{:02x}", m_rd_keys[i]);
return builder.build();
}