You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
897 B
34 lines
897 B
import java.lang.Object;
|
|
import javax.crypto.Cipher;
|
|
import java.security.GeneralSecurityException;
|
|
import javax.crypto.NoSuchPaddingException;
|
|
import java.security.NoSuchAlgorithmException;
|
|
public class AESEncryption
|
|
{
|
|
public static void main(String[] args)
|
|
{
|
|
|
|
}
|
|
public void encrypt()
|
|
{
|
|
|
|
}
|
|
public static final Cipher getInstance(String transformation)
|
|
{
|
|
try
|
|
{
|
|
KeyGenerator keyGen = KeyGenerator.getInstance("AES");
|
|
keyGen.init(128);
|
|
SecretKey key = keyGen.generateKey();
|
|
}
|
|
catch(NoSuchPaddingException nspe)
|
|
{
|
|
System.out.println("a particular padding mechanism is requested but is not available in the environment");
|
|
}
|
|
catch(NoSuchAlgorithmException nsae)
|
|
{
|
|
System.out.println("cryptographic algorithm is requested but is not available in the environment");
|
|
}
|
|
}
|
|
}
|
|
|