You can not select more than 25 topics
Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- package homework.pkg4;
-
- import java.security.MessageDigest;
- import java.util.Scanner;
-
-
- public class Password {
- public static void main( String[] args ) throws Exception {
- Scanner keyboard = new Scanner(System.in);
- String un, pw, encrypt_psswrd;
-
- MessageDigest digest = MessageDigest.getInstance("SHA-256");
-
- System.out.print("Please create a username: ");
- un = keyboard.nextLine();
-
- System.out.print("Please create a password: ");
- pw = keyboard.nextLine();
-
- System.out.println( "Your username is: " + un + ". Your password is: " + pw);
- }
- }
|