CJohnston079 / obfuscator

0 stars 0 forks source link

`obfuscator` should return a formatted string ready for writing in the same format as `file_to_obfuscate` #10

Closed CJohnston079 closed 4 months ago

CJohnston079 commented 4 months ago

Issue

obfuscator currently returns a general serialised string. It would be more useful to return a string in the same format as the file that has been obfuscated, ready to be written.

Proposed resolution

Replace serialise_data function call in obfuscator with a format_data function, which calls an appropriate file handler to format the data in the correct way. If formatting fails, format_data should serialise the data with serialise_data as before.

CJohnston079 commented 4 months ago

Resolved in 5c45de9f723af352c1f93897826b936c1fb3e7ef with proposed solution.