PyRIT icon indicating copy to clipboard operation
PyRIT copied to clipboard

FEAT Create a generic Encoding Converter

Open nina-msft opened this issue 1 year ago • 0 comments

Describe the solution you'd like

We currently have two converters which are encoding based: base-64 converter and a rot-13 converter

ROT-13 Makes use of the codecs Python library, which supports standard encodings such as ascii, utf_8, base64 hex bz2 zip, etc (see link for full list).

We should have a generic EncodingConverter for these implementations of ROT13 and BASE64. Then it will be easy for us to add support for the remainder of the binary transforms and other encodings that may be useful.

Describe alternatives you've considered, if relevant

Additional context

  1. The binary transforms may need to use specific encoding/decoding functions (note they are not supported by bytes.decode(), so keep that in mind for the base64 etc. implementation(s).

  2. Think through how a user might specify which encoding they want. Can this be completely generic for standard encodings? Do binary transforms need a bit more custom handling?

nina-msft avatar Oct 02 '24 18:10 nina-msft