import java.security.Key; import javax.crypto.spec.SecretKeySpec; public class App { public static void main(String[] args) throws Exception { System.out.println("--Titkostás--"); String key = "1234567890123456"; // 128 bites kulcs Key aeskey = new SecretKeySpec(key.getBytes(), "AES"); String secretText = Coder.encrypt("titok", aeskey); System.out.println(secretText); String clearText = Coder.decrypt(secretText, aeskey); System.out.println(clearText); } }