-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated PredicateHandler to handle OR-ed predicates #265
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good so far just some minor stuff.
Do we have a unit test for this issue already? If not, please create one.
CryptoAnalysis/src/main/java/crypto/analysis/errors/RequiredPredicateError.java
Outdated
Show resolved
Hide resolved
@@ -33,7 +36,7 @@ public void accept(ErrorVisitor visitor){ | |||
public String toErrorMarkerString() { | |||
String msg = extractedValues.toString(); | |||
msg += " was not properly generated as "; | |||
String predicateName = getContradictedPredicate().getPredName(); | |||
String predicateName = getContradictedPredicate().stream().map(e -> e.toString()).collect(Collectors.joining(" OR ")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do getPredName
and toString
yield the same result? Because i wonder why you changed the method call
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where is that " OR "
comming from ? Also please use a constant for such important strings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have a unit test for this issue already? If not, please create one.
Please find the updated tests here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where is that
" OR "
comming from ? Also please use a constant for such important strings.
It is used to generate error statements like below
Second parameter was not properly generated as generated E C Public Key Parameters(params) O R generated R S A Private Crt Key Parameters(params) O R generated R S A Key Parameters(params)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do
getPredName
andtoString
yield the same result? Because i wonder why you changed the method call
No, they don't. getPredName
only returns the predicate name. Whereas toString
returns predicate name with respective parameter, like in above comment.
Have changed it to getPredName in commit 6f00e0c
Initial FN counts for <crypto.RSAEngineTest: void testDecryptOne(byte[])>, <params.ECPrivateKeyParametersTest: void testOne(java.lang.String)>, <transforms.ECNewRandomessTransformTest: void testFive(java.lang.String)> were specified improperly. They have been changed and verified.
Fixes issue #216