static byte[] decryptData(byte[] password,byte[] encryptedData){
  try {
    Cipher c=Cipher.getInstance(ENCRYPT_DATA_ALGORITHM);
    c.init(Cipher.DECRYPT_MODE,new SecretKeySpec(password,SECRET_KEY_ALGORITHM),CBC_SALT_DATA);
    return c.doFinal(encryptedData);
  }
 catch (  Exception e) {
    throw new IllegalStateException(ENCRYPT_DATA_ALGORITHM + " is not available",e);
  }
}

static byte [ ] decryptData ( byte [ ] password , byte [ ] encryptedData ) { try { Cipher c = Cipher . getInstance ( ENCRYPT_DATA_ALGORITHM ) ; c . init ( Cipher . DECRYPT_MODE , new SecretKeySpec ( password , SECRET_KEY_ALGORITHM ) , CBC_SALT_DATA ) ; return c . doFinal ( encryptedData ) ; } catch ( Exception e ) { throw new IllegalStateException ( ENCRYPT_DATA_ALGORITHM + " is not available" , e ) ; } }
decrypt key ( does not use salting , so the encryption result is the same for the same input )
