/* * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template */ package com.megatim.module.encryption; import com.megatim.module.encryption.impl.AESImpl; import com.megatim.module.encryption.ifaces.EncryptionFace; /** * * @author STEPHANIE */ public class App { static String password = "megatim1"; static String inputPath = "C:\\Users\\STEPHANIE\\Documents\\NetBeansProjects\\share_sources\\Encryption\\files\\symetric\\toEncrypt\\dynamicreports.pdf"; static String outputPath = "C:\\Users\\STEPHANIE\\Documents\\NetBeansProjects\\share_sources\\Encryption\\files\\symetric\\toDecrypt\\dynamicreports.pdf"; static String decrypt = "C:\\Users\\STEPHANIE\\Documents\\NetBeansProjects\\share_sources\\Encryption\\files\\symetric\\toDecrypt\\dynamicreports"; // static String inputPath = "C:\\Users\\STEPHANIE\\Documents\\NetBeansProjects\\share_sources\\Encryption\\files\\symetric\\toEncrypt\\spring-copie.txt"; // static String outputPath = "C:\\Users\\STEPHANIE\\Documents\\NetBeansProjects\\share_sources\\Encryption\\files\\symetric\\toDecrypt\\spring-copie.crypt"; // static String decrypt = "C:\\Users\\STEPHANIE\\Documents\\NetBeansProjects\\share_sources\\Encryption\\files\\symetric\\toDecrypt\\spring-copie"; public static void main(String[] args) throws Exception{ EncryptionFace aes = new AESImpl(); aes.encryptFile(password, 128, inputPath, outputPath); String encrypted = aes.encryptString(password, 256, "mela"); String decrypted = aes.decryptString(password, 256, encrypted); System.out.println("encrypted = "+encrypted); System.out.println("decrypted = "+decrypted); // aes.encryptFile(password,192,inputPath, outputPath); // aes.decryptFile(password,192,outputPath, decrypt); } }