// Path: crypto-java/src/main/java/de/dominikschadow/javasecurity/symmetric/AES.java
// public class AES {
//     private final SecretKeySpec secretKeySpec;
//     private final Cipher cipher;
// 
//     public AES(SecretKeySpec secretKeySpec, String algorithm) throws NoSuchPaddingException, NoSuchAlgorithmException {
//         cipher = Cipher.getInstance(algorithm);
// 
//         this.secretKeySpec = secretKeySpec;
//     }
// 
//     public byte[] encrypt(String initialText) throws
//             BadPaddingException, IllegalBlockSizeException, InvalidKeyException {
//         cipher.init(Cipher.ENCRYPT_MODE, secretKeySpec);
// 
//         return cipher.doFinal(initialText.getBytes(StandardCharsets.UTF_8));
//     }
// 
//     public byte[] decrypt(byte[] ciphertext) throws
//             BadPaddingException, IllegalBlockSizeException, InvalidAlgorithmParameterException, InvalidKeyException {
//         cipher.init(Cipher.DECRYPT_MODE, secretKeySpec, new IvParameterSpec(cipher.getIV()));
//         return cipher.doFinal(ciphertext);
//     }
// }


import de.dominikschadow.javasecurity.symmetric.AES;
import java.io.IOException;
import java.io.InputStream;
import java.security.*;
import java.security.cert.CertificateException;
package de.dominikschadow.javasecurity;



public class Keystore {
    private static final String KEYSTORE_PATH = "/samples.ks";

    public static KeyStore loadKeystore(char[] keystorePassword) throws KeyStoreException, CertificateException, NoSuchAlgorithmException, IOException {
// Path: crypto-java/src/main/java/de/dominikschadow/javasecurity/symmetric/AES.java
// public class AES {
//     private final SecretKeySpec secretKeySpec;
//     private final Cipher cipher;
// 
//     public AES(SecretKeySpec secretKeySpec, String algorithm) throws NoSuchPaddingException, NoSuchAlgorithmException {
//         cipher = Cipher.getInstance(algorithm);
// 
//         this.secretKeySpec = secretKeySpec;
//     }
// 
//     public byte[] encrypt(String initialText) throws
//             BadPaddingException, IllegalBlockSizeException, InvalidKeyException {
//         cipher.init(Cipher.ENCRYPT_MODE, secretKeySpec);
// 
//         return cipher.doFinal(initialText.getBytes(StandardCharsets.UTF_8));
//     }
// 
//     public byte[] decrypt(byte[] ciphertext) throws
//             BadPaddingException, IllegalBlockSizeException, InvalidAlgorithmParameterException, InvalidKeyException {
//         cipher.init(Cipher.DECRYPT_MODE, secretKeySpec, new IvParameterSpec(cipher.getIV()));
//         return cipher.doFinal(ciphertext);
//     }
// }


// Path: crypto-shiro/src/main/java/de/dominikschadow/javasecurity/Keystore.java
import de.dominikschadow.javasecurity.symmetric.AES;
import java.io.IOException;
import java.io.InputStream;
import java.security.*;
import java.security.cert.CertificateException;

package de.dominikschadow.javasecurity;



public class Keystore {
    private static final String KEYSTORE_PATH = "/samples.ks";

    public static KeyStore loadKeystore(char[] keystorePassword) throws KeyStoreException, CertificateException, NoSuchAlgorithmException, IOException {
        try (InputStream keystoreStream = AES.class.getResourceAsStream(KEYSTORE_PATH)) {