/// /** * An obfuscator which employs the Caesar cipher. *This does not provide any * real security!* It's intended to help prototype the interface between * transport and obfuscation and was chosen because even though it's trivial to * implement it still requires some configuration. */ declare class CaesarCipher implements Transformer { /** Value by which bytes' values are shifted. */ private shift_; constructor(); /** * Caesar cipher requires just one parameter: the value by which to shift * each byte. key should be an ArrayBuffer of just one byte, the value of * which will be used for the shift amount (the byte is interpreted as * an unsigned integer, so negative shift is not possible). */ setKey: (key: ArrayBuffer) => void; /** Nothing to configure -- all this transformer needs is a key. */ configure: (json: string) => void; transform: (buffer: ArrayBuffer) => ArrayBuffer; restore: (buffer: ArrayBuffer) => ArrayBuffer; dispose: () => void; /** Applies mapper to each byte of buffer. */ private map_; transformByte: (i: number) => number; restoreByte: (i: number) => number; } export = CaesarCipher;