redesign the challenge provider interface to be Java compatible

This commit is contained in:
hrj
2019-03-05 17:49:20 +05:30
parent 618823fa7d
commit d99b120b2c
4 changed files with 35 additions and 19 deletions

View File

@@ -0,0 +1,13 @@
package lc;
public class Challenge {
public final byte[] content;
public final String contentType;
public final String secret;
public Challenge(final byte[] content, final String contentType, final String secret) {
this.content = content;
this.contentType = contentType;
this.secret = secret;
}
}

View File

@@ -0,0 +1,10 @@
package lc;
interface ChallengeProvider {
public String getId();
public Challenge returnChallenge();
public boolean checkAnswer(String secret, String answer);
//TODO: def configure(): Unit
}