Package crypto.rules
Class CrySLRuleReader
- java.lang.Object
-
- crypto.rules.CrySLRuleReader
-
public class CrySLRuleReader extends Object
-
-
Constructor Summary
Constructors Constructor Description CrySLRuleReader()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<CrySLRule>readFromDirectory(File directory)static List<CrySLRule>readFromDirectory(File directory, boolean recursive)static CrySLRulereadFromSourceFile(File file)Returns aCrySLRuleread from a single CrySL file.static List<CrySLRule>readFromZipFile(File file)
-
-
-
Method Detail
-
readFromSourceFile
public static CrySLRule readFromSourceFile(File file) throws CryptoAnalysisException
Returns aCrySLRuleread from a single CrySL file.- Parameters:
file- the CrySL file- Returns:
- the
CrySLRuleobject - Throws:
CryptoAnalysisException- Throws when a file could not get processed to aCrySLRule
-
readFromDirectory
public static List<CrySLRule> readFromDirectory(File directory) throws CryptoAnalysisException
- Parameters:
directory- theFilewith the directory where the rules are located- Returns:
- the
ListwithCrySLRuleobjects. If no rules are found it returns an empty list. - Throws:
CryptoAnalysisException- Throws when a file could not get processed to aCrySLRule
-
readFromDirectory
public static List<CrySLRule> readFromDirectory(File directory, boolean recursive) throws CryptoAnalysisException
Returns aListofCrySLRuleobjects read from a directory. In the case the directory contains further sub directories, they can also searched if the recursive argument istrue.- Parameters:
directory- theFilewith the directory where the rules are locatedrecursive-truethe subfolders will be searched too- Returns:
- the
ListwithCrySLRuleobjects. If no rules are found it returns an empty list. - Throws:
CryptoAnalysisException- Throws when a file could not get processed to aCrySLRule
-
readFromZipFile
public static List<CrySLRule> readFromZipFile(File file) throws CryptoAnalysisException
- Parameters:
file- Zip that contains the CrySL files- Returns:
- the
ListwithCrySLRuleobjects. If no rules are found it returns an empty list. - Throws:
CryptoAnalysisException- If the directory is not a zip file
-
-