Generate verification code, verification code generation
String mobile = phone; // mobile number, multiple numbers using "," Split // generate random 6-bit code String s = ""; while (S.length () < 6) + = (int) (Math.random () *); = "Your Verification code is:" + s+ "[Effective time 10 minutes]"; // SMS Content
Math.random () * 10 generate single-digit random number
Effective Time Setting method
One: Returns the creation time, the verification time compares with the creation time, if is less than the creation time is valid, otherwise is the invalidation code
Two: Set up the configuration database, the user sent multiple requests to send the verification code-each time the verification code inserted into the database, the verification of the last one to prevail, time verification as above;
Third: If the technology can, using the OTP algorithm, enabling dynamic password is also possible
Java SMS Verification Code = = = Random number