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

LibPDF: Add implementation of the Standard security handler

Security handlers manage encryption and decription of PDF files. The
standard security handler uses RC4/MD5 to perform its crypto (AES as
well, but that is not yet implemented).
This commit is contained in:
Matthew Olsson 2022-03-20 14:24:23 -07:00 committed by Andreas Kling
parent c98bda8ce6
commit 5b316462b2
9 changed files with 522 additions and 3 deletions

View file

@ -29,6 +29,7 @@ public:
[[nodiscard]] ALWAYS_INLINE String const& string() const { return m_string; }
[[nodiscard]] ALWAYS_INLINE bool is_binary() const { return m_is_binary; }
void set_string(String string) { m_string = move(string); }
const char* type_name() const override { return "string"; }
String to_string(int indent) const override;
@ -153,6 +154,7 @@ public:
[[nodiscard]] ALWAYS_INLINE NonnullRefPtr<DictObject> dict() const { return m_dict; }
[[nodiscard]] ReadonlyBytes bytes() const { return m_buffer.bytes(); };
[[nodiscard]] ByteBuffer& buffer() { return m_buffer; };
const char* type_name() const override { return "stream"; }
String to_string(int indent) const override;