Decryption XML string question - javax.crypto.IllegalBlockSizeException?

I am new to this and try to encrypt and decrpyt one string XML with AES and Base64 en_decoder but I get the following error. I don't know what the problem is. Without using a decoder and encoder Base64, so it's good, but I need to.

Error: javax.crypto.IllegalBlockSizeException: input length must be a multiple of 16 when with padded decrypting cipher

Appreciate all the help!

My simple program
===============
Encryption by aesCipher;

try {}

Byte [secretKey] is Base64.decode ("fqqwZu9U1PCAZQUX + 3nUTA is");.
SecretKeySpec keySpec = new SecretKeySpec (secretKey, "AES");

Create the encryption algorithm
aesCipher = Cipher.getInstance("AES/ECB/PKCS5Padding");

Initialize the encryption for the encryption algorithm
aesCipher.init (Cipher.ENCRYPT_MODE, keySpec);

Byte [] plaintext = "< RQLastName > TESTLastname < / RQLastName > < RQFirstName > TestFirstName < / RQFirstName > '. getBytes();

Encrypt the plaintext
Byte [] ciphertext = aesCipher.doFinal (cleartext);

Base64encodedCiphertext string = Base64.encode (ciphertext);

System.out.println (base64encodedCiphertext);

Initialize the same cipher for the decryption algorithm
aesCipher.init (Cipher.DECRYPT_MODE, keySpec);

Byte [] base64decodedCiphertext = Base64.decode (base64encodedCiphertext);

Decrypt the ciphertext
Byte [] cleartext1 = aesCipher.doFinal (base64decodedCiphertext); <-exception on that line

System.out.println (new String (cleartext1));

clear and cleartext1 are the same.
}
catch (Exception ex) {}
ex.printStackTrace ();
}

================
I use Base64.java, written by Stephen investigation.

public class {Base64
public static byte [] encodeData;
public static String charSet =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 + /";

{public static
encodeData = new ubyte [64];
for (int i = 0; i < 64; i ++) {}
c byte = (bytes) charSet.charAt (i);
encodeData [i] = c;
}
}

private Base64() {}

/**
* base64 encode a string
@param s the string ascii coding
* @returns the base64 encoded result
*/

Public Shared Function
Encode(String s) throws Exception {}
Return encodes (s.getBytes ("UTF8"));
}

/**
* base64 encode a byte array
@param CBC byte array to encode
* @returns the base64 encoded result
*/

Public Shared Function
Encode (byte [] src) {}
return encode (src, 0, src.length);
}

/**
* base64 encode a byte array
@param CBC byte array to encode
@param start starting index
@param len the number of bytes
* @returns the base64 encoded result
*/

Public Shared Function
Encode (byte [], int start, int length src) {}
Byte [] dst = new byte [(length+2)/3 * 4 + length: 72];
int x = 0;
int dstIndex = 0;
Int State = 0;     What jacquard tank
old int = 0;     previous byte
int len = 0;     length decoded so far
int max = length + start;
for (int srcIndex = start; srcIndex < max; srcIndex ++) {}
x = src [srcIndex];
switch (++ State) {}
case 1:
DST [dstIndex ++] = encodeData [(x >> 2) & 0x3f];
break;
case 2:
DST [dstIndex ++] = encodeData [((vieux << 4) & 0 x 30)]
| [((x >> 4) & 0xf)] ;
break;
case 3:
DST [dstIndex ++] = encodeData [((vieux << 2) & 0x3C)]
| [((x >> 6) & 0x3)] ;
DST [dstIndex ++] = encodeData [x & 0x3F;
State = 0;
break;
}
old = x;
If (++ len > = 72) {}
DST [dstIndex ++] = (byte) "\n";
Len = 0;
}
}

/*
* now to clean the end bytes
*/

switch (State) {}
case 1: dst [dstIndex ++] = encodeData [(vieux << 4) & 0 x 30];
DST [dstIndex ++] = (byte) '=';
DST [dstIndex ++] = (byte) '=';
break;
case 2: dst [dstIndex ++] = encodeData [(vieux << 2) & 0x3c];
DST [dstIndex ++] = (byte) '=';
break;
}
return new String (dst);
}

/**
* A Base64 decoder. This implementation is slow, and
* does not handle wrapped lines.
* The output is not set if there are errors in the entry.
s @param a Base64 encoded string
* @returns the byte array eith the decoded result
*/

public static ubyte]
Decode (String s) {}
int end = 0;     final State
If (s.endsWith ("=")) {}
end ++;
}
If (s.endsWith ("is")) {}
end ++;
}
int len = (s.length () + 3) / 4 * 3 - end;
Byte [] result = new ubyte [len];
int dst = 0;
try {}
for (CBC int = 0; src < s.length (); src ++) {}
code int = charSet.indexOf (s.charAt (src));
If (code ==-1) {}
break;
}
switch (src %4) {}
case 0:
result [dst] = (byte) (code < < 2);
break;
case 1:
result [dst ++] | = (byte) ((code >> 4) & 0x3);
result [dst] = (byte) (code < < 4);
break;
case 2:
result [dst ++] | = (byte) ((code >> 2) & 0xf);
result [dst] = (byte) (code < < 6);
break;
case 3:
result [dst ++] | = (byte) (code & 0x3f);
break;
}
}
} catch (ArrayIndexOutOfBoundsException e) {}
return the result;
}

/**
* Test the encoder and the decoder.
* Call as < code > Base64 [channel] < code >.
*/

public static void
survey of hand (String [] args) {Exception
System.out.println ("encode:" + args [0] + ""-> () "")
+ encode(args[0]) + ")");
System.out.println ("decode:" + args [0] + ""-> () "")
+ New String (decode(args[0])) + ")");
}
}

903857 wrote:
I use Base64.java, written by Stephen investigation.

Your code works when you use a decent Base64 encoder/decoder (for example http://commons.apache.org/codec/) then throw the investigation one.

Note: block ECB is not secure because it allows counterfeit by splicing of the ciphertext. You must use one of the methods of feedback as a random IV with CBC.

PS one obvious fault with the encoder/decoder Uhler Base64 is that the encoder adds a new line after 72 characters but the decoder does not correctly remove the new line. He is the likely cause of the IllegalBlockSizeException.

Tags: Java

Similar Questions

  • javax.crypto.IllegalBlockSizeException: input length must be a multiple of...

    Hi guys
    I encrypted a string and then converted to byte [], string and put it in db
    now, I want to encrypt it and I get this error
    javax.crypto.IllegalBlockSizeException: input length must be a multiple of 16 when with padded decrypting cipher

    Thanks in advance for your help :)

    The error message seems pretty self-explanatory, and the explanation in the javadocs for this exception is straight to the point. Are what part you not understand?

  • XML document in XML string

    Hello
    I'm new to BPEL, so please don't mind ask me fundamental questions.

    I want to know how we can edit a document xml into xml string in BPEL (11G). Please notify.


    Thanks for your help.

    function ora:getContentAsString('Varaible') to convert the XML to a string.

  • Update the xml string values.

    Hello

    I'm on 11.2.0.2 and got table with column nclob that stores the long xml string.

    {code}

    "<? XML version = "1.0" encoding = "UTF - 8"? >

    <? Fuego version = "6.5.2" build "101272 =? >

    < Game >

    < configuration name = "TEST database" type = subtype "SQL" = "DDORACLE" >

    < name = "jdbc.pool.idle_timeout property" value = "5" / > "

    < name = "jdbc.pool.entry.max property" value = "10" / > "

    < name = "oracle.dateEqualsTimestamp property" value = "false" / > "

    < name = "jdbc.schema property" value = "user1" / > "

    < name = "jdbc.host property" value = "hostname" / > "

    < property name = "user" value = "user1" / >

    < name = "jdbc.port property" value = "1521" / > "

    < name = "jdbc.pool.min property" value = "0" / > "

    < name = "jdbc.pool.maxopencursors property" value = "50" / > "

    < name = "oracle.sid property" value = "dbsid" / > "

    < property name = "password" value = "user101" / >

    < name = "jdbc.xa property" value = "false" / > "

    < name = "jdbc.pool.max property" value = "10" / > "

    < / configuration >

    < configuration name = 'TEST base2' type = subtype "SQL" = "DDORACLE" >

    < name = "jdbc.pool.idle_timeout property" value = "5" / > "

    < name = "jdbc.pool.entry.max property" value = "10" / > "

    < name = "oracle.dateEqualsTimestamp property" value = "false" / > "

    < name = "jdbc.schema property" value = "user2" / > "

    < name = "jdbc.host property" value = "hostname" / > "

    < property name = "user" value = "user2" / >

    < name = "jdbc.port property" value = "1521" / > "

    < name = "jdbc.pool.min property" value = "0" / > "

    < name = "jdbc.pool.maxopencursors property" value = "50" / > "

    < name = "oracle.sid property" value = "dbsid2" / > "

    < property name = "password" value = "user201" / >

    < name = "jdbc.xa property" value = "false" / > "

    < name = "jdbc.pool.max property" value = "10" / > "

    < / configuration >

    < / set >

    "

    {code}

    My goal is to update the value of the password so that it is equal to the value of jdbc.schema value < property name = "jdbc.schema" value = "user2" / > in this case user2 | " '01'

    < property name = "password" value = "user201" / > <-that's my goal.

    Concerning

    Greg

    Hello

    You can find a few methods here: How To: nodes of XML update with values from the same document. Oracle of Odie's blog

    They are not applicable to your options and version though.

    This is the first applied to your case:

    declare

    v_xmldoc xmltype.

    Start

    Select xmlparse (document to_clob (t.xmldoc))

    in v_xmldoc

    of my_nclob_table t

    where t.id = 1;

    for r in)

    Select idx, schema_name

    of my_nclob_table t

    xmltable)

    "/ game/configuration.

    passage v_xmldoc

    columns idx for ordinalite

    , schema_name varchar2 (30) path 'property[@name="jdbc.schema"]/@value '.

    )

    )

    loop

    Select updatexml)

    v_xmldoc

    , "configuration/game / ['|]» [to_char (r.idx) |'] Property[@name="password"]/@value'

    r.schema_name | '01'

    )

    in v_xmldoc

    Double;

    end loop;

    Update my_nclob_table t

    Set t.xmldoc = to_nclob (xmlserialize (dash, document v_xmldoc))

    where t.id = 1;

    end;

    /

    Here's another, using DOM:

    declare

    CLOB doc;

    p dbms_xmlparser. Analyzer;

    domdoc dbms_xmldom. DOMDocument;

    docnode dbms_xmldom. DOMNode;

    conf_list dbms_xmldom. DOMNodeList;

    conf_node dbms_xmldom. DOMNode;

    password_node dbms_xmldom. DOMNode;

    schema_name varchar2 (30);

    password_value varchar2 (256);

    Start

    Select to_clob (xmldoc)

    in the doc

    of my_nclob_table

    where id = 1;

    p: = dbms_xmlparser.newParser;

    dbms_xmlparser.parseClob (p, doc);

    domdoc: = dbms_xmlparser.getDocument (p);

    dbms_xmlparser.freeParser (p);

    docnode: = dbms_xmldom.makeNode (domdoc);

    conf_list: = dbms_xslprocessor.selectNodes (docnode, ' / game/configuration ');

    for i from 0... dbms_xmldom.GetLength (conf_list) - 1 loop

    conf_node: = dbms_xmldom.item(conf_list, i);

    dbms_xslprocessor.valueOf (conf_node, 'property[@name="jdbc.schema"]/@value', schema_name);

    password_node: = dbms_xslprocessor.selectSingleNode (conf_node, 'property[@name="password"]/@value');

    dbms_xmldom.setNodeValue (password_node, schema_name |) '01');

    end loop;

    dbms_xmldom.writeToClob (domdoc, doc);

    dbms_xmldom.freeDocument (domdoc);

    Update my_nclob_table t

    Set t.xmldoc = to_nclob (doc)

    where t.id = 1;

    end;

    /

    Post edited by: odie_63 - added DOM example

  • XML is not displayed as XML (hierarchical format) but as the xml string

    The condition is:

    To retrieve data of a table and are displayed in a table on a page in the ADF. One of the columns in the DB table is a "Type of XML", which stores the XML.  For each record in the table on page ADF, there is a hyper link, clicking on which the XML code must be displayed in a pop-up window.

    There is no problem to display data in the pop-up window.  But the popup does not display the data as a hierarchy XML (wrapping of lines at the end of each element).  It shows that the XML string...

    If someone could help?

    Concerning

    Christiane

    Add a property row to your inputtext to multi line. otherwise, you will never see the brakes of the line.

    Timo

  • Need help to parse the xml string to populate the drop-down list

    Here is my: problem

    I have a hidden text field that contains the text of an xml

    <>facilities
    < building >
    < name > Building A < / name >
    < name > building B < / name >
    < name > building C < / name >
    < name > building D < / name >
    < name > building E < / name >
    < name > building F < / name >
    < name > building G < / name >
    < name > building H < / name >
    < / build >
    < / facilities >

    My goal is to read this with JavaScript xml string to populate a drop-down list with values of element (name). Does anyone know how script that?

    Attached is a sample .xdp

    See you soon,.

    Jesse

    Here is an example of change. I put the code click on the button, so you can see it in operation... You can place this code in the event that makes sense for you. I also added another field to show the DOM (this is for debugging purposes and you can remove this field if you want).

    Paul

  • escaping from xml string

    How to escape from <>, in the xml string of & lt; , & gt; is it possible to convert the entire xml string in this format
    ex:
    < root > < example > < id > 89 < /ID > < / sample > < / root >
    This must be converted to

    & lt; root & gt;. & lt; sample & gt;. & lt; ID & gt;. 89 & lt; /ID & gt;. & lt; / Sample & gt; & lt; / root & gt;

    myString = " 89 ".

    myString.split(")<>

  • Select the value of the xml string property where certain conditions

    Hi, I'm on 11.2.0.2 and just started with XPath. "got the string xml like this: [code]"

    "[code] should output jdbc.schema password - User1, User2 user101 user201 tried: select x.schema_name, obpmdir.test x.password t, xmltable ("for $i in property/configuration/set return {$i/@name}' from xmltype (t.fuego_strvalue) schema_name varchar2 columns (1234) PATH 'value', password varchar2 (1234) PATH 'value') x; " has received the error: ORA-19276: XPST0005 - XPath step specifies an invalid element/attribute name: 19276 (value). 00000 - "XP0005 - XPath step specifies an invalid element/attribute name: (%s) ' * Cause: step the XPath specified is not a valid element or the attribute name that does not match all nodes according to the entry or the structure XML schema. * Action: Correct the name of element or attribute name may be misspelled. Regards Greg

    See my first example here in response to your previous question: update the values of string xml.

    BTW, to format your code, go to the so-called 'Advanced Editor ' and choose the formatting that you want in the menu behind the > icon.

    Note that, as of now, none of the available options are really satisfactory to shape the code because he doesn't use fixed-width fonts.

    Personally, I manually change the font "Courier New" and apply the effect 'Quote' for formatting my code snippets, that mimicks a little previous rendering allows us to get through the {code} tags (before the migration of the forum).

  • How to read an XML string that is not an XML file?

    I have a script I'm trying to setup that communicates via a socket to retrieve the different directions of a custom Java program.  The Java program listening to requests from the Adobe scripting engine (in my case it is a Photoshop script) on a socket and respond immediately with the next set of directions.  These directions are currently in XML format.  The question I have, is that I can not parse XML data because he entered a new XML object from a string rather than be read from a file.  Even without the socket code, you can see the problem as follows:

    var xml = new XML("<test><data>hey!</data></test>");
    alert(xml.test.data);
    alert(xml);
    

    The first alert "must" return "Hey!" (without the quotes, of course), but it doesn't, while the second warning refers to what you would expect it to:

    <test>
        <data>hey!</data>
    </test>
    

    It works very well if read from an XML file, but from a string, as indicated above, it is just an empty box when attempting to access 'xml.test.data '.  Any ideas on how to solve this problem?  Can it be fixed?  Has it been fixed in more recent versions (I am currently using CS4)?

    Thanks in advance for any help!

    Duh... found my mistake... I was trying to access the data by making reference to the created element 'root '.  Given that is the first tag of the element, it is the installer as the root element, which you don't need to reference.  Change alert to alert (xml.data); fixed.

    Now I feel stupid, lol...

  • The analysis of an XML string

    Hi, I wonder if it is possible to skip creating a physics .xml file and parse the XML message I receive directly?

    normally, it takes

    builder.parse(fileConn.openInputStream());
    

    but it is not possible to open an InputStream on a string...

    ByteArrayInputStream built from String.getBytes () [or whatever we call.]

    It implements something like the idea of stringstream c ++.

  • Eception java.lang.error trying to create format XML string

    I am trying to create XML documents without having to build everything manually whenever I want to do this.  I created a XMLFile class to create the document.  When I try to launch my app TestFoo, I get untrapped Exception java.lang.error.  I tried kxml2, using org.w3c.dom, java XML, banging my head against the wall as to why it will not work until I finally just rolled my own simple implementation.  I always get the error!  No details are provided.  There is no stack trace.  I use the emulator 9000 "BOLD" crossing os 4.6.0 eclipse 3.4.1

    Console:

    Starting TestFooStarted TestFoo(154)Exit TestFoo(154)ErrorNo detail messageTestFoo Document  0x171TestFoo XMLFile  0x381TestFoo TestFoo  0x297TestFoo TestFoo main 0x276
    

    TestFoo.java

    import net.rim.device.api.system.Application;
    
    public class TestFoo extends Application {
    
      public static void main(String[] args) {      TestFoo foo = new TestFoo();      foo.enterEventDispatcher();   }
    
      public TestFoo() {        XMLFile xml = new XMLFile("rootNode");        xml.addProperty("myprop", "some value");      System.out.println(xml.toFormattedXMLString());       System.exit(0);   }}
    

    XMLFile.java

    public class XMLFile {   Document document;    public XMLFile(String rootElement) {      document = new Document(rootElement); }
    
      public void addProperty(String pName, String pText) {     Element elm = new Element("property");        elm.addAttribute("name", pName);      elm.setTextContent(pText);        document.appendChild(elm);    }    public String toFormattedXMLString() {     return document.toFormattedXML();    }}
    

    Element.Java

    import java.util.Enumeration;import java.util.Hashtable;import java.util.Vector;
    
    public class Element {   private Vector children;  private String name;  private String textContent;   private Hashtable attributes;
    
      public Element(String name) {     this.children = new Vector();     this.attributes = new Hashtable();        this.name = name; } public void appendChild(Element child) {      this.children.addElement(child);  } public Vector getChildren() {     return children;  } public String getName() {     return name;  } public void setName(String name) {        this.name = name; } public String getTextContent() {      return textContent;   } public void setTextContent(String textContent) {      this.textContent = textContent;   } public Hashtable getAttributes() {        return attributes;    } public boolean hasChildren() {        return (this.children.size() > 0); } public int childrenCount() {      return this.children.size();  } public String getAttributeValue(String name) {        return this.attributes.get(name).toString();  } public void addAttribute(String key, String value) {      this.attributes.put(key, value);  } public void addAttribute(String key, int value) {     addAttribute(key,Integer.toString(value));    } public void addAttribute(String key, long value) {        addAttribute(key,Long.toString(value));   } public void addAttribute(String key, boolean value) {     addAttribute(key, String.valueOf(value)); } public boolean hasAttribute(String name) {        return this.attributes.containsKey(name); } public Element getChild(int position) {       return (Element) this.children.elementAt(position);   } public Enumeration getAttributeKeys() {       return this.attributes.keys();    }}
    

    Document.Java

    import java.util.Enumeration;
    
    public class Document { private static final char _gt = '>';   private static final char _lt = '<';   private static final char _eq = '=';  private static final char _dqt = '"'; private static final char _cl = '/';  private static final char _sp = ' ';  private static final char _tab = '\t';    private static final byte[] _nl = System.getProperty("line.separator").getBytes();
    
      private Element rootNode; private StringBuffer sb;
    
      public Document(String rootName) {        this.rootNode = new Element(rootName);    } public void appendChild(Element child) {      this.rootNode.appendChild(child); } public String toFormattedXML() {      sb = new StringBuffer();      format(this.rootNode,0);      return sb.toString(); }
    
      private void format(Element node, int depth) {        writeOpenTag(node, depth);        for (int i=0;i0;i--) {            sb.append(_tab);      } }    private void writeOpenTag(Element node, int depth) {       indent(depth);        sb.append(_lt);       sb.append(node.getName());        for (Enumeration keys = node.getAttributeKeys();keys.hasMoreElements();) {            String key = keys.nextElement().toString();           sb.append(_sp).append(key);           sb.append(_eq).append(_dqt);          sb.append(node.getAttributeValue(key).toString());            sb.append(_dqt);      }    }    private void writeCloseTag(Element node, int depth) {       if (node.hasChildren()) {         sb.append(_lt).append(node.getName());        } else {          sb.append(_cl);       }     sb.append(_gt).append(_nl);    }}
    

    This line:

    private static final byte[] _nl = System.getProperty("line.separator").getBytes();
    

    is originally a NullPointerException because line.separator is not well supported. The line terminator standard for XML is CR/LF, so you can use:

    private static final byte[] _nl = { '\r', '\n' };
    
  • get the response XML string

    Hello friends, I get an XML response like below. Now, I want to get is the string ' hello world '. How can I retrieve the XML response? I have to change something in the side Server? Y at - it a tutorial for sending xml soap request?

    
    
    
    http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    
    
    
    http://www.XYZ.com/abc">
    
    Hello World from XYZ
    
    
    
    
    
    
    

    Are you absolutely sure that tempStream contains your XML file? It seems that XML is not reached the parser.

  • Question card crypto for VPN gateway router

    I'm moving my VPN environment at 2811 routers. I move a seller more tomorrow which has two sources who need to connect to each of our IPs, those inside the IPs are NAT had real IPS at the firewall behind the router. I know I'll find out tomorrow, but thought I would see if anyone see a problem with this ACL that is used for the encryption card, is there a problem with multiple sources (50.50.50.1 et.2 in file) connection to the same destinations? The IP addresses in this file are not real output IPs. Thank you.

    If I understand you correctly, no it should not be a problem at all. Each entry in your crypto ACLs card will create a separate IPSEC security association pair and there is no overlap.

    Let me know if I misunderstood your question.

    Jon

  • Extract the contents of an XML string in offline mode

    HI gentlemen,

    Could you help me solve this problem? I had a string of Java (see below) read in a smart German eHealth card. I have to extract the tag values and put them in local variables for further processing in my Java module. How to move forward without connecting to a database, it is enough to analyze the source - the string variable? Note that the lines are separated by only 0x0A.
    <?xml version="1.0" encoding="ISO-8859-15" standalone="yes"?>
    <UC_PersoenlicheVersichertendatenXML CDM_VERSION="5.1.0" xmlns="http://ws.gematik.de/fa/vsds/UC_PersoenlicheVersichertendatenXML/v5.1">
        <Versicherter>
            <Versicherten_ID>X110101627</Versicherten_ID>
            <Person>
                <Geburtsdatum>19840717</Geburtsdatum>
                <Vorname>Johanna</Vorname>
                <Nachname>Düsterbehn</Nachname>
                <Geschlecht>W</Geschlecht>
                <StrassenAdresse>
                    <Postleitzahl>93055</Postleitzahl>
                    <Ort>Regensburg</Ort>
                    <Land>
                        <Wohnsitzlaendercode>D</Wohnsitzlaendercode>
                    </Land>
                    <Strasse>Sulzfeldstraße</Strasse>
                    <Hausnummer>7</Hausnummer>
                </StrassenAdresse>
            </Person>
        </Versicherter>
    </UC_PersoenlicheVersichertendatenXML>
    Thank you very much for your help,
    sincere friendships of

    Miklós HERBOLY
    java.lang.NoClassDefFoundError: XpathSampleClass (wrong name: XPathSampleClass)
    

    If you use my code sample in extenso, the class is named 'XPathSampleClass' (capital P), and of course the .class file must have the same name.

  • The XML string to time (?) to do the calculations

    Hello

    I have a XML file which I receive channels such as + 115:50, 55:25 + which represents the time in a format mmm: ss. It's supposed to be for a football game.

    I need to find a way to make calculations and then put it back in the database. Tell me, if I added 90/10 and 112:55 I would get 203:05.

    What would be the best way to go about this?
    I have to create a custom for this class? Or is it possible to use Date to accomplish what I need?


    Thank you

    Karl

    I don't know if it is possible to achieve with Date, but in any case, it is easy to solve like this:

    Dim a = '11:50;
    String b = "05:45;

    int min = Integer.valueOf (a.substring (0, a.lastIndexOf (":"))) + Integer.valueOf (b.substring (0, b.lastIndexOf (":")));) ")))
    dry int = Integer.valueOf (a.substring (a.lastIndexOf(":") + 1, a.length (())) + Integer.valueOf (b.substring (b.lastIndexOf(":") + 1, b.length (()));
    mins = minutes + dry/60;
    seconds = seconds % 60;
    System.out.println(mins+":"+secs);

    Edited by: Diegolas A, December 16, 2011 04:00

Maybe you are looking for

  • iTunes not able to sync pictures

    I want to sync photos to my iPhone from iTunes. He did it in the past, but now I see that under photos in iTunes, I can't choose Photos (or opening) as an option, just my folder of photos. How can I fix this please? Thank you

  • Size of printing HP Photosmart Plus e-All-In-One B210 series has sent a

    Hi, sorry in advance if I am dumb. How can I make sure the photo by email to my HP Photosmart Plus e-All-In-One B210 series are printed on 10x15cm photo paper? In fact, how I want to print any photo is printed on paper 10x15cm. Thanks for the researc

  • Satellite A300 - 20 p - the restoration of the Toshiba Recovery?

    Hello.. my friend has this laptop: Satellite A300 - 20 p. I'm not sure what he was doing, but he installed Windows Vista Home Premium 64-bit, 32-bit and then again. All messed up.Anyway, it did not a recovery disk for his laptop (garbage). Now, becau

  • Cancel pairing bluetooth

    How do I désapparier my Bluetooth Trackpad of my MacBook Pro running Yosemite?

  • The new a30 model Iconia Tab 10 has a card reader?

    I'm checking online comments and they all say there's a reader of card memory up to 128 GB. but the specs of Acer say no memory card reader.  Thank you!!