| Top |
| GMimeAnonymizer * | g_mime_anonymizer_new () |
| gboolean | g_mime_anonymizer_add_preserved_header () |
| gboolean | g_mime_anonymizer_remove_preserved_header () |
| gboolean | g_mime_anonymizer_contains_preserved_header () |
| void | g_mime_anonymizer_clear_preserved_headers () |
| char ** | g_mime_anonymizer_get_preserved_headers () |
| gboolean | g_mime_anonymizer_write_headers () |
| gboolean | g_mime_anonymizer_write_message () |
| gboolean | g_mime_anonymizer_write_entity () |
Masks header values without decoding their raw bytes. Address delimiters, encoded-word charset/encoding labels, Received keywords and valid dates, content types and selected MIME parameters remain visible, matching MimeKit. Date, MIME-Version and Content-Transfer-Encoding values are preserved.
This is a diagnostic transformation, not a guarantee of removing all sensitive information. Preserved fields, dates, structural syntax, escape sequences, byte counts and whitespace can reveal information. Message and entity bodies are masked after transfer encoding, preserving their wire whitespace rather than decoding sensitive content into the output.
gboolean g_mime_anonymizer_add_preserved_header (GMimeAnonymizer *anonymizer,const char *name);
Copies name
without trimming. Field matching ignores ASCII case.
Adding an existing name retains its original spelling.
gboolean g_mime_anonymizer_remove_preserved_header (GMimeAnonymizer *anonymizer,const char *name);
gboolean g_mime_anonymizer_contains_preserved_header (GMimeAnonymizer *anonymizer,const char *name);
Tests only the configured set, not the fields preserved by default.
void
g_mime_anonymizer_clear_preserved_headers
(GMimeAnonymizer *anonymizer);
Clears the configured set without changing the default preserved fields.
char **
g_mime_anonymizer_get_preserved_headers
(GMimeAnonymizer *anonymizer);
Returns an independent snapshot in unspecified order.
gboolean g_mime_anonymizer_write_headers (GMimeAnonymizer *anonymizer,GMimeFormatOptions *options,GMimeHeaderList *headers,GMimeStream *stream,GError **error);
Writes every header in order, including duplicates and fields hidden by
ordinary serialization options. No body separator is added. Newlines use
options
; all other masking is byte-oriented, without decoding or changing
the stored headers. Explicitly preserved fields still use normal formatting
and newline conversion. Invalid fields are masked as unstructured bytes.
Unset native placeholder headers are omitted.
Output may be partial on failure; write, formatting and flush failures are
reported without closing stream
or flushing after a failed write.
gboolean g_mime_anonymizer_write_message (GMimeAnonymizer *anonymizer,GMimeFormatOptions *options,GMimeMessage *message,GMimeStream *stream,GError **error);
Writes merged message/body headers and anonymizes the entire MIME tree without recursion. Raw multipart delimiters remain visible and unmodified; preambles, epilogues and transfer-encoded content are masked. Status and notification bodies use header masking, including the preservation set.
As in MimeKit, a constructed message with body headers acquires a missing MIME-Version field. Lazy status-field access may initialize content/caches. Other stored header and content bytes are not rewritten. Output may be partial on error; formatting, content I/O and destination errors propagate.
gboolean g_mime_anonymizer_write_entity (GMimeAnonymizer *anonymizer,GMimeFormatOptions *options,GMimeEntity *entity,GMimeStream *stream,GError **error);
Writes anonymized entity headers and content using the same iterative
traversal as g_mime_anonymizer_write_message(). Native GMimeMessage
instances are handled as messages, including merged body headers.