title: How to decrypt on the server side with java code?
body: <p>I am using CryptoJS to encrypt at the client side I have created a fiddle of the client side code as following - </p>
  
  <pre><code>var onClick = function() {
     var iv = "3ad5485e60a4fecde36fa49ff63817dc"; 
  
              var key = "0a948a068f5d4d8b9cc45df90b58d382d2b916c25822b6f74ea96fe6823132f4"; 
  
              var encrypted = CryptoJS.AES.encrypt("{'This is ' : 'A Nice day'}",
                      key, {
                          iv : CryptoJS.enc.Hex.parse(iv),
                          mode : CryptoJS.mode.CBC,
                          padding : CryptoJS.pad.Pkcs7
                      }); 
              var encryptedInHex = encrypted.ciphertext
                      .toString(CryptoJS.enc.Hex); // converting the encrypted data in Hexadecimal
      document.getElementById("thisDiv").innerHTML  = encryptedInHex.toUpperCase();
              return encryptedInHex.toUpperCase(); // returning the hashed encrypted data.
  };
  </code></pre>
  
  <p>I have also developed a fiddle for it here -</p>
  
  <p><a href="http://jsfiddle.net/akki166786/1c24d1mj/3/" rel="nofollow">http://jsfiddle.net/akki166786/1c24d1mj/3/</a></p>
  
  <p>This is symmetric key cryptography being used here.</p>
  
  <p>when I am trying to decrypt it on server side I am getting, </p>
  
  <p>javax.Crypto.BadPaddingException : Given final block not properly padded exception, </p>
  
  <p>Can there be a problem from Client side as well?</p>
  
  <p>I need a server side(written in java) code to decrypt the out put of the function which i Have written in fiddle.</p>
  
  <p>Thanks for your help.</p>