2019-04-14 12:18:58 +02:00

39 lines
921 B
Java

package mod_pPw;
import java.util.Scanner;
import basics.BasicMod;
public class PPW
extends BasicMod
{
Scanner scn;
Hasher hash;
public void init()
{
setModName("PPW");
setVersion(0.1D);
System.out.println("PPW: Start init");
this.scn = new Scanner(System.in);
this.hash = new Hasher();
System.out.println("PPW: Exit init");
}
public void checkInput(String input)
{
String givenID = "";
String givenLM = "";
if (input.equalsIgnoreCase("ppw"))
{
System.out.println("Please enter your private password ID");
givenID = this.scn.nextLine();
System.out.println("Please enter you personal parameter (1-100) ");
givenLM = this.scn.nextLine();
this.hash.setDecodeFactor(Byte.parseByte(givenLM));
System.out.println("Your encrypted password is:" + this.hash.hash(givenID));
}
}
}