// These pesky special agents keep reverse engineering our source code and then // breaking into our secret vaults. THIS will teach those sneaky sneaks a // lesson. // // -Minion #0891 import java.util.*; import javax.crypto.Cipher; import javax.crypto.spec.SecretKeySpec; import java.security.*; class VaultDoor8 { public static void main(String args[]) { Scanner b = new Scanner(System.in); System.out.print("Enter vault password: "); String c = b.next(); String f = c.substring(8,c.length()-1); VaultDoor8 a = new VaultDoor8(); if (a.checkPassword(f)) { System.out.println("Access granted."); } else { System.out.println("Access denied!"); } } public char[] scramble(String password) { /* Scramble a password by transposing pairs of bits. */ char[] a = password.toCharArray(); for (int b=0; b>shift) | rest); return result; } public boolean checkPassword(String password) { char[] scrambled = scramble(password); char[] expected = { 0xF4, 0xC0, 0x97, 0xF0, 0x77, 0x97, 0xC0, 0xE4, 0xF0, 0x77, 0xA4, 0xD0, 0xC5, 0x77, 0xF4, 0x86, 0xD0, 0xA5, 0x45, 0x96, 0x27, 0xB5, 0x77, 0xC2, 0xD2, 0x95, 0xA4, 0xF0, 0xD2, 0xD2, 0xC1, 0x95 }; return Arrays.equals(scrambled, expected); } }