import java.util.Scanner;
public class Encript
{
public static void main (String[] args)
{
Scanner scan = new Scanner (System.in);
System.out.print ("Create a password: ");
String password = scan.nextLine ();
String encrypted = password.replace ('f', '*');
encrypted = encrypted.replace ('i', '!');
encrypted = encrypted.replace ('n', ']');
System.out.print (encrypted);
System.out.print ("Enter your password: ");
password = scan.nextLine ();
String encrypted2 = password.replace ('f', '*');
encrypted2 = encrypted2.replace ('i', '!');
encrypted2 = encrypted2.replace ('n', ']');
System.out.print ("Authorized Access: ");
System.out.print (encrypted.equals (encrypted2));
}
}
public class Encript
{
public static void main (String[] args)
{
Scanner scan = new Scanner (System.in);
System.out.print ("Create a password: ");
String password = scan.nextLine ();
String encrypted = password.replace ('f', '*');
encrypted = encrypted.replace ('i', '!');
encrypted = encrypted.replace ('n', ']');
System.out.print (encrypted);
System.out.print ("Enter your password: ");
password = scan.nextLine ();
String encrypted2 = password.replace ('f', '*');
encrypted2 = encrypted2.replace ('i', '!');
encrypted2 = encrypted2.replace ('n', ']');
System.out.print ("Authorized Access: ");
System.out.print (encrypted.equals (encrypted2));
}
}
(0) Comments
Post a Comment