I have a string uniqueCode of length 16.
String uniqueCode = accountno + extracode;
accountno is of length 6 and extracode is populated in following way:
String extraCode = branch + loanCode + openingDateStr ;
BigInteger hexaCode = new BigInteger(extraCode);
extraCode = hexaCode.toString(16); // hexa bit
Now i want to get back branch,loancode and openingdatestr from this uniquecode.
how to do this?
To get back the original string from
extraCodein hex:Now you can extract the components from
extraCodeby their length. For instance, ifbranchhas 6 digits andloanCodehas 4 digits, you can do: