Package crypto.cryslhandler
Class CrySLModelReader
- java.lang.Object
-
- crypto.cryslhandler.CrySLModelReader
-
public class CrySLModelReader extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static StringcryslFileEnding
-
Constructor Summary
Constructors Constructor Description CrySLModelReader()Creates a CrySLModelReader
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StringfilterQuotes(String dirty)static Set<String>getBuggedKeyRules()CrySLRulereadRule(File ruleFile)Reads the content of a CrySL file and returns aCrySLRuleobject.CrySLRulereadRule(InputStream stream, String virtualFileName)Reads the content of a CrySL file from anInputStream, afterwards theCrySLRulewill be created.
-
-
-
Field Detail
-
cryslFileEnding
public static final String cryslFileEnding
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CrySLModelReader
public CrySLModelReader() throws MalformedURLExceptionCreates a CrySLModelReader- Throws:
MalformedURLException- If there is a problem with the URL
-
-
Method Detail
-
readRule
public CrySLRule readRule(InputStream stream, String virtualFileName) throws IllegalArgumentException, IOException, CryptoAnalysisException
Reads the content of a CrySL file from anInputStream, afterwards theCrySLRulewill be created.- Parameters:
stream- theInputStreamholds the CrySL file contentvirtualFileName- the name needs following structure [HexHashedAbsoluteZipFilePath][SystemFileSeparator][ZipEntryName]- Returns:
- the
CrySLRule - Throws:
IllegalArgumentException- If the file for the rule cannot be foundIOException- If there is a problem with reading the fileCryptoAnalysisException- If the file is not a .crysl file
-
readRule
public CrySLRule readRule(File ruleFile) throws CryptoAnalysisException
Reads the content of a CrySL file and returns aCrySLRuleobject.- Parameters:
ruleFile- the CrySL file- Returns:
- the
CrySLRuleobject - Throws:
CryptoAnalysisException- If the file is not a .crysl file
-
-