Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - TripleDES and Android

TripleDES and Android

Common bugs/problems with the Android SDK the Emulator and the ADT-Plugin.

TripleDES and Android

Postby joaquin » Wed Jul 27, 2011 2:03 pm

Hello, I have problems with this code

Code: Select all
public static byte[] decryptByte(byte[] cryptoByte,
         Context applicationContext) throws IllegalBlockSizeException, BadPaddingException, NoSuchAlgorithmException, UnsupportedEncodingException, InvalidKeyException, InvalidAlgorithmParameterException, NoSuchPaddingException {
      final SecretKey key = new SecretKeySpec(new UniqueIdentifier(
            applicationContext).getUuidBytes(), "DESede");
      
      final IvParameterSpec iv = new IvParameterSpec(new byte[8]);

      final Cipher cipher = Cipher.getInstance("DESede/CBC/PKCS5Padding");

      cipher.init(Cipher.DECRYPT_MODE, key, iv);
      
      return cipher.doFinal(cryptoByte);
   }


when I call the method doFinal (-----) javax.crypt.BadPaddingException: pad block corrupted !!!

Browsing on google I found the problem is BoucyCastle. Can be true?

Someone can help me?
joaquin
Freshman
Freshman
 
Posts: 5
Joined: Thu May 19, 2011 4:52 pm

Top

Return to SDK/ADT/Emulator Problems

Who is online

Users browsing this forum: No registered users and 4 guests