1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 08:18:11 +00:00
serenity/Libraries/LibCrypto/Cipher
Nico Weber 8d3d0054ed Crypto: Make AES call malloc much less often
ByteBuffer::slice_view() allocates a new ByteBuffer object,
which as a RefPtr and everything.

Nowadays it should probably return a Bytes / Span<u8>, but AES was only
using slice_view() to extract the pointer again.  So just add ady a
range check at the top, and do pointer arithmetic to do the same thing
faster.

Reduces time to run `disasm /bin/id` by a bit under 40%,
from ~8.3s to ~5s (min-of-3 runs).
2020-08-11 16:25:36 +02:00
..
Mode LibTLS + LibCrypto: Suppress unobserved Optoinal<T> return values. 2020-08-05 12:27:15 +02:00
AES.cpp Crypto: Make AES call malloc much less often 2020-08-11 16:25:36 +02:00
AES.h LibCrypto: Add CTR cipher mode 2020-06-25 21:05:40 +02:00
Cipher.h LibCrypto: Format all files with clang-format 10 2020-05-29 20:17:12 +02:00