Package crypto.analysis
Class CrySLRulesetSelector
- java.lang.Object
-
- crypto.analysis.CrySLRulesetSelector
-
public class CrySLRulesetSelector extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCrySLRulesetSelector.RuleFormatthe supported rule formatsstatic classCrySLRulesetSelector.Rulesetcurrent RuleSets
-
Constructor Summary
Constructors Constructor Description CrySLRulesetSelector()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static List<CrySLRule>makeFromPath(File resourcesPath, CrySLRulesetSelector.RuleFormat ruleFormat)Deprecated.static List<CrySLRule>makeFromRuleset(String rulesBasePath, CrySLRulesetSelector.RuleFormat ruleFormat, CrySLRulesetSelector.Ruleset... set)static List<CrySLRule>makeFromRulesetString(String rulesBasePath, CrySLRulesetSelector.RuleFormat ruleFormat, String rulesetString)Computes the ruleset from a string.static List<CrySLRule>makeFromZip(File resourcesPath)Deprecated.static CrySLRulemakeSingleRule(String rulesBasePath, CrySLRulesetSelector.RuleFormat ruleFormat, CrySLRulesetSelector.Ruleset ruleset, String rulename)Creates and returns a singleCrySLRuleobject for the given RuleSet argument.
-
-
-
Method Detail
-
makeFromRuleset
public static List<CrySLRule> makeFromRuleset(String rulesBasePath, CrySLRulesetSelector.RuleFormat ruleFormat, CrySLRulesetSelector.Ruleset... set) throws CryptoAnalysisException
- Parameters:
rulesBasePath- aStringpath giving the location of the CrySL ruleset base folderruleFormat- the file extension of the CrySL filesset- theCrySLRulesetSelector.Rulesetfor which theCrySLRuleobjects should be created for- Returns:
- the
ListwithCrySLRuleobjects - Throws:
CryptoAnalysisException- If there is an error reading a ruleset
-
makeFromRulesetString
public static List<CrySLRule> makeFromRulesetString(String rulesBasePath, CrySLRulesetSelector.RuleFormat ruleFormat, String rulesetString) throws CryptoAnalysisException
Computes the ruleset from a string.- Parameters:
rulesBasePath- aStringpath giving the location of the CrySL ruleset base folderruleFormat- the file extension of the CrySL filerulesetString- String- Returns:
- a list of the rules from the ruleset
- Throws:
CryptoAnalysisException- If there is no ruleset
-
makeSingleRule
public static CrySLRule makeSingleRule(String rulesBasePath, CrySLRulesetSelector.RuleFormat ruleFormat, CrySLRulesetSelector.Ruleset ruleset, String rulename) throws CryptoAnalysisException
Creates and returns a singleCrySLRuleobject for the given RuleSet argument.- Parameters:
rulesBasePath- aStringpath giving the location of the CrySL ruleset base folderruleFormat- the file extension of the CrySL fileruleset- theCrySLRulesetSelector.Rulesetwhere the rule belongs torulename- the name of the rule- Returns:
- the
CrySLRuleobject - Throws:
CryptoAnalysisException- If the rule cannot be found
-
makeFromPath
@Deprecated public static List<CrySLRule> makeFromPath(File resourcesPath, CrySLRulesetSelector.RuleFormat ruleFormat) throws CryptoAnalysisException
Deprecated.- Parameters:
resourcesPath- aFilewith the path giving the location of the CrySL file folderruleFormat- theCrySLRulesetSelector.Rulesetwhere the rules belongs to- 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
-
makeFromZip
@Deprecated public static List<CrySLRule> makeFromZip(File resourcesPath) throws CryptoAnalysisException
Deprecated.- Parameters:
resourcesPath- the ZipFilewhich contains the CrySL files- Returns:
- the
ListwithCrySLRuleobjects from the Zip file. If no rules are found it returns an empty list. - Throws:
CryptoAnalysisException- Throws when a file could not get processed to aCrySLRule
-
-