mirror of
https://github.com/google/nomulus.git
synced 2025-05-15 00:47:11 +02:00
Create GenerateAllocationTokens nomulus tool command
This creates a specified number of tokens of a given schema, with a dryrun option to not persist them. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=181403775
This commit is contained in:
parent
ccbe958063
commit
646dcecd7e
8 changed files with 307 additions and 14 deletions
|
@ -16,17 +16,17 @@ package google.registry.util;
|
|||
|
||||
import static com.google.common.base.Preconditions.checkArgument;
|
||||
|
||||
import java.util.Random;
|
||||
import java.security.SecureRandom;
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Named;
|
||||
|
||||
/** Random string generator. */
|
||||
public class RandomStringGenerator extends StringGenerator {
|
||||
|
||||
private final Random random;
|
||||
private final SecureRandom random;
|
||||
|
||||
@Inject
|
||||
public RandomStringGenerator(@Named("alphabet") String alphabet, Random random) {
|
||||
public RandomStringGenerator(@Named("alphabetBase64") String alphabet, SecureRandom random) {
|
||||
super(alphabet);
|
||||
this.random = random;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue