Skip to main content

hackagent.attacks.techniques.static.cipherchat.encodings.base

Common interface for CipherChat encoding strategies.

EncodeExpert Objects​

class EncodeExpert(ABC)

system_prompt​

def system_prompt() -> str

Return instructions describing this expert's encoding.

encode​

@abstractmethod
def encode(text: str) -> str

Encode text using this expert's representation.

decode​

@abstractmethod
def decode(text: str) -> str

Decode text using this expert's representation.

UnicodeExpert Objects​

class UnicodeExpert(EncodeExpert)

Unicode-escape strategy adapted from RobustNLP/CipherChat.