![JAR search and dependency download from the Maven repository](/logo.png)
com.telesign.Util Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of TeleSign-SDK Show documentation
Show all versions of TeleSign-SDK Show documentation
The TeleSign Java SDK is a Java library that provides an interface to TeleSign Web Services. TeleSign Web Services conform to the REST Web Service Design Model. Services are exposed as URI-addressable resources through the set of RESTful procedures in our TeleSign REST API.
The newest version!
package com.telesign;
import java.security.SecureRandom;
public class Util {
private static SecureRandom random = new SecureRandom();
/**
* Helper function to generate a random number n digits in length using a system random.
*/
public static String randomWithNDigits(int n) {
n = Math.abs(n);
return String.format("%s", ((int) (Math.pow(10, (n - 1))) + random.nextInt((9 * (int) (Math.pow(10, (n - 1)))))));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy