JavaFX and Scene Builder - IntelliJ: AES encryption using JAVA

preview_player
Показать описание
AES Advanced Encryption Standard is quite complicated, but in this video, I am showing a relatively simple way of using it with Java and then creating a GUI with JavaFX. I hope you enjoyed this video if you did place leave a like and feel free to ask any questions in the comment section.

My channel publishes videos that focus on programming and software engineering. If that sounds like it could be helpful for you, please join me!

Subscribe to my YouTube channel:

Source code:

How to setup JavaFX with IntelliJ:

How to install and use Scene Builder:
Рекомендации по теме
Комментарии
Автор

Awesome video, can't believe that cryptography like AES is complicated in Java! Keep up the good work!!

dan-xdyh
Автор

Great demonstration of AES cryptography in JavaFX!!! :)

MedenMal
Автор

Can this same program work with encrypting and decrypting TripleDES(3DES) or does it have to be expanded further? Love the content on this channel all ur videos are top notch 🔥🔥

barrygleas
Автор

​ @SoftwareEngineeringStudent Im not even good with cryptography myself im just getting started with that in JAVA I built up a class file for the TripleDES encryption and decryption part I worked on it for a couple of days, can you do a tutorial on how to implement it it into the same program so the program has both AES/TripleDES all in one for encryption and decryption? Can you make a donation link I would donate I like the content you put out :) Here is my class file
import java.security.*;
import java.security.spec.*;

import javax.crypto.*;
import javax.crypto.spec.*;

public class TripleDES {

private SecretKey key;
private IvParameterSpec iv;
private String transformation;

public TripleDES(String _key)
throws InvalidKeyException, InvalidKeySpecException, NoSuchAlgorithmException {

String algorithm = "DESede";
transformation = "DESede/CBC/PKCS5Padding";

byte[] keyValue = _key.getBytes();

DESedeKeySpec keySpec = new DESedeKeySpec(keyValue);

/* Initialization Vector of 8 bytes set to zero. */
iv = new IvParameterSpec(new byte[8]);

key =
keySpec);
}

public byte[] encrypt(String plaintext) throws InvalidKeyException,
NoSuchPaddingException, InvalidAlgorithmParameterException,
IllegalBlockSizeException, BadPaddingException, NoSuchAlgorithmException {


Cipher encrypter =
encrypter.init(Cipher.ENCRYPT_MODE, key, iv);

byte[] input = plaintext.getBytes();

byte[] encrypted = encrypter.doFinal(input);
return encrypted;
}


public String decrypt(byte[] ciphertext)
throws InvalidKeyException, NoSuchPaddingException,
InvalidAlgorithmParameterException, IllegalBlockSizeException,
BadPaddingException, NoSuchAlgorithmException {

Cipher decrypter =
decrypter.init(Cipher.DECRYPT_MODE, key, iv);

byte[] decrypted =

return new String(decrypted);
}
}

jakeadams