Class VBScriptCodec

  • All Implemented Interfaces:
    Codec<java.lang.Character>

    public class VBScriptCodec
    extends AbstractCharacterCodec
    Implementation of the Codec interface for 'quote' encoding from VBScript.
    Since:
    June 1, 2007
    Author:
    Jeff Williams (jeff.williams .at. aspectsecurity.com) Aspect Security
    See Also:
    Encoder
    • Constructor Detail

      • VBScriptCodec

        public VBScriptCodec()
    • Method Detail

      • encode

        public java.lang.String encode​(char[] immune,
                                       java.lang.String input)
        Encode a String so that it can be safely used in a specific context.
        Specified by:
        encode in interface Codec<java.lang.Character>
        Overrides:
        encode in class AbstractCodec<java.lang.Character>
        Parameters:
        immune -
        input - the String to encode
        Returns:
        the encoded String
      • decodeCharacter

        public java.lang.Character decodeCharacter​(PushbackSequence<java.lang.Character> input)
        Returns the decoded version of the character starting at index, or null if no decoding is possible. Formats all are legal both upper/lower case: "x - all special characters " + chr(x) + " - not supported yet
        Specified by:
        decodeCharacter in interface Codec<java.lang.Character>
        Overrides:
        decodeCharacter in class AbstractCodec<java.lang.Character>
        Parameters:
        input - the Character to decode
        Returns:
        the decoded Character