java.lang.Object
io.github.astrapi69.random.SecureRandomBuilder
The class
SecureRandomBuilder
builds a SecureRandom
from the given algorithm and
provider. If nothing is set the default SecureRandom
object with the default algorithm
will be build.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionSets the algorithm.build()
Builds aSecureRandom
from the given algorithm and provider.static SecureRandomBuilder
Gets an instance ofSecureRandomBuilder
with the default algorithm and providerstatic SecureRandomBuilder
getInstance
(String algorithm) Gets an instance ofSecureRandomBuilder
from the given algorithm and providerstatic SecureRandomBuilder
getInstance
(String algorithm, String provider) Gets an instance ofSecureRandomBuilder
from the given algorithm and providerstatic SecureRandomBuilder
getInstance
(String algorithm, String provider, long seed) Gets an instance ofSecureRandomBuilder
from the given algorithm and providerstatic SecureRandomBuilder
getInstance
(String algorithm, String provider, Date seed) Gets an instance ofSecureRandomBuilder
from the given algorithm and providerSets the provider.seed
(long seed) Sets the seed.
-
Field Details
-
DEFAULT_ALGORITHM
The Constant DEFAULT_ALGORITHM- See Also:
-
-
Method Details
-
getInstance
Gets an instance ofSecureRandomBuilder
with the default algorithm and provider- Returns:
- the new
SecureRandomBuilder
object
-
getInstance
Gets an instance ofSecureRandomBuilder
from the given algorithm and provider- Parameters:
algorithm
- the algorithm- Returns:
- the new
SecureRandomBuilder
object
-
getInstance
Gets an instance ofSecureRandomBuilder
from the given algorithm and provider- Parameters:
algorithm
- the algorithmprovider
- the provider- Returns:
- the new
SecureRandomBuilder
object
-
getInstance
Gets an instance ofSecureRandomBuilder
from the given algorithm and provider- Parameters:
algorithm
- the algorithmprovider
- the providerseed
- the seed- Returns:
- the new
SecureRandomBuilder
object
-
getInstance
Gets an instance ofSecureRandomBuilder
from the given algorithm and provider- Parameters:
algorithm
- the algorithmprovider
- the providerseed
- the seed asDate
object- Returns:
- the new
SecureRandomBuilder
object
-
algorithm
Sets the algorithm.- Parameters:
algorithm
- the algorithm- Returns:
- this
SecureRandomBuilder
object. For chaining.
-
build
Builds aSecureRandom
from the given algorithm and provider. If nothing is set the defaultSecureRandom
object with the default algorithm will be build.- Returns:
- the new
SecureRandom
object
-
provider
Sets the provider.- Parameters:
provider
- the provider- Returns:
- this
SecureRandomBuilder
object. For chaining.
-
seed
Sets the seed.- Parameters:
seed
- the seed- Returns:
- this
SecureRandomBuilder
object. For chaining.
-