package burp; import java.util.regex.Pattern; import java.io.Serializable; /** * Each instance of this object represent one hash algorithm and contains everything needed to search * for hashes generated by the algorithm. */ class HashAlgorithm implements Serializable { private static final long serialVersionUID = -110268321075344518L; int id = 0; int charWidth; HashAlgorithmName name; Pattern pattern; final String hexRegex = "([a-fA-F0-9]+)"; boolean enabled; HashAlgorithm(int charWidth, HashAlgorithmName name, int id, boolean enabled) { this.charWidth = charWidth; this.name = name; pattern = Pattern.compile(String.format(hexRegex, charWidth)); this.id = id; this.enabled = enabled; } }