# More Binary when Decrypt binary by AES in Java

i want to decrypt binary ciphertext, but when i'm try to decrypt , it was failed.

i'm check the binary and convert to HEX, it was padding 00 in Hex.

here is my code

private final byte[] key;

private static final String ALGORITHM = "AES";

public AES_Algorithm(byte[] key)

{

this.key = key;

}

/**

* Encrypts the given plain text

*

* @param plainText The plain text to encrypt

* @return

* @throws java.lang.Exception

*/

public byte[] encrypt(byte[] plainText) throws Exception

{

SecretKeySpec secretKey = new SecretKeySpec(key, ALGORITHM);

Cipher cipher = Cipher.getInstance(ALGORITHM);

cipher.init(Cipher.ENCRYPT_MODE, secretKey);

return cipher.doFinal(plainText);

}

/**

* Decrypts the given byte array

*

* @param cipherText The data to decrypt

* @return

*...

By: StackOverFlow - Wednesday, 14 March

# Related Posts

- Older News
- binary search tree - l dont know how to do this in code StackOverFlow (Today) - Given a binary search tree you have to answer the question if a given number X belongs to the tree. A binary search tree is such a tree that each...
- Print String ArrayList in decimal and binary format StackOverFlow (Yesterday) - I have an ArrayList that I want to print in decimal and binary format. Current output: decimal: S:2 S:3 S:3 S:3 S:1 S:2 Expected: decimal: 2 3 3 3 1...
- "bad operand types for binary operator '+' " with Generic
class StackOverFlow (Yesterday) - I have some problems with generic class in Java. I write this simple code to try understand but I receive this errors:GenericoT.java:12: error: bad operand types for binary operator '+'return... - Checking if logged user is administrator StackOverFlow (Yesterday) - I'm working on netbeans, building a POS.I am logged and can all users will be able to do almost everything, except clicking the Config button.I wanted to make a checker...
- Binary vs. Source Releases? coderanchjavageneral (2 days ago) - I am not really sure where to post this question so I apologize if it's in the wrong forum. Can someone please confirm that I have the correct understanding of...
- Binary to Int Using Recursion StackOverFlow (2 days ago) - I have the following code for a recursive function to convert binary to int: public static int binaryToInt( String b ) {if(b.length() < 2) {return 0;}return b.charAt(0) * (int) Math.pow(2,...
- Is a binary op-tree considered never, sometimes, or always "regular"? StackOverFlow (3 days ago) - A binary op-tree is a heterogeneous (mixed data types) binary tree where all leaves are the operands and all non-leaves are the operators. The children of a node containing an...