String « biginteger « Java Data Type Q&A





1. Convert BigInteger to Shorter String in Java    stackoverflow.com

I'm looking for a way to convert a BigInteger into a very short String (shortest possible). The conversion needs to be reversible. The security of the conversion is not a big ...

2. Help! Question on converting String to BigInteger    coderanch.com

With simple strings like that, I would extract the dollar and cents substrings directly and avoid floating point rounding worries. For example: public class Test { public static void main(String[] args) { String s = "8.54"; int point = s.indexOf('.'); int dollars = Integer.parseInt(s.substring(0, point)); int cents = Integer.parseInt(s.substring(point+1)); System.out.println("dollars=" + dollars); System.out.println("cents=" + cents); } } This assumes that your ...

4. convert string to biginteger    forums.oracle.com

HI! Sorry for my english! A have a problem on my RSA algorithm. When i crypt the text it look`s like this: 3462567C857CDF0F1064DCEC837E...... and save me a key like this: 6BCD997A646D.... The private key is (n,d) 1024 and it saved in a file when i can import the key. I read the key from the file like this: String contents = ...

5. Converting a String to BigInteger    forums.oracle.com

7. convert String to BigInteger    forums.oracle.com

I wrote a simple program in Java to decode coded messages using RSA formula. It should decode a text "coded.txt" and writes to another text"decoded.txt". On Line 41, big = new BigInteger(line); gets error. big = BigInteger.valueOf(Double.valueOf(line); which has worked well for 4 years on Forte4j, now gets error on it too. I downloaded Forte4j from disk again and errors appear ...