System.out.println("Signals that an I/O exception of some sort has occurred.");
}
catch(IllegalBlockSizeExceptionibse)
{
System.out.println(" no padding has been requested (only in encryption mode), and the total input length of the data processed by this cipher is not a multiple of block size; or if this encryption algorithm is unable to process the input data provided");
}
catch(BadPaddingExceptionbpe)
{
System.out.println("if this cipher is in decryption mode, and (un)padding has been requested, but the decrypted data is not bounded by the appropriate padding bytes");
}
catch(NoSuchPaddingExceptionnspe)
{
@ -29,6 +78,83 @@ public class AESEncryption
{
System.out.println("cryptographic algorithm is requested but is not available in the environment");
}
}
}
catch(InvalidKeyExceptionike)
{
System.out.println("the given key is inappropriate for initializing this cipher");
}
}//endofencryptmethod
publicstaticvoiddecrypt()
{
Scannerinput=newScanner(System.in);
System.out.print("Enter the file name of whats to be decrypted: ");
StringfileName=input.nextLine();
System.out.print("Enter the file name of the key: ");
System.out.println("Signals that an I/O exception of some sort has occurred.");
}
catch(IllegalBlockSizeExceptionibse)
{
System.out.println(" no padding has been requested (only in encryption mode), and the total input length of the data processed by this cipher is not a multiple of block size; or if this encryption algorithm is unable to process the input data provided");
}
catch(NoSuchPaddingExceptionnspe)
{
System.out.println("a particular padding mechanism is requested but is not available in the environment");
}
catch(NoSuchAlgorithmExceptionnsae)
{
System.out.println("cryptographic algorithm is requested but is not available in the environment");
}
catch(InvalidKeyExceptionike)
{
System.out.println("the given key is inappropriate for initializing this cipher");
}
catch(NullPointerExceptionnpe)
{
System.out.println("specified algorithm is null");
}
catch(GeneralSecurityExceptiongse)
{
System.out.println("bad or invalid padding/block");