assignment 3

This commit is contained in:
2024-12-23 03:12:44 +03:00
parent 16ffb9844f
commit a616052ff5
14 changed files with 192 additions and 0 deletions

View File

@ -0,0 +1,22 @@
public class Cryptabletest {
public static void main(String[] args) {
try {
// Blowfish Example
Cryptable blowfish = new Blowfish();
String blowfishEncrypted = blowfish.encrypt("Hello, Blowfish!");
System.out.println("Blowfish Encrypted: " + blowfishEncrypted);
String blowfishDecrypted = blowfish.decrypt(blowfishEncrypted);
System.out.println("Blowfish Decrypted: " + blowfishDecrypted);
// Twofish Example
Cryptable twofish = new Twofish();
String twofishEncrypted = twofish.encrypt("Hello, Twofish!");
System.out.println("Twofish Encrypted: " + twofishEncrypted);
String twofishDecrypted = twofish.decrypt(twofishEncrypted);
System.out.println("Twofish Decrypted: " + twofishDecrypted);
} catch (Exception e) {
e.printStackTrace();
}
}
}