Skip to content

Commit

Permalink
Delete project
Browse files Browse the repository at this point in the history
  • Loading branch information
DamnClin committed Aug 27, 2022
1 parent f6421f1 commit ee28074
Show file tree
Hide file tree
Showing 46 changed files with 135 additions and 1,512 deletions.
57 changes: 0 additions & 57 deletions src/main/java/tech/jhipster/lite/common/domain/FileUtils.java

This file was deleted.

24 changes: 0 additions & 24 deletions src/main/java/tech/jhipster/lite/common/domain/WordUtils.java

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,27 +1,23 @@
package tech.jhipster.lite.common.domain;
package tech.jhipster.lite.generator.base64.domain;

import java.security.SecureRandom;
import java.util.Base64;

public final class Base64Utils {

private static final SecureRandom random = new SecureRandom();
private static final SecureRandom RANDOM = new SecureRandom();

private Base64Utils() {}

public static String getBase64Secret() {
return getBase64Secret(64);
}

private static String getBase64Secret(int length) {
return Base64.getEncoder().encodeToString(getRandomHexString(length).getBytes());
return Base64.getEncoder().encodeToString(getRandomHexString(64).getBytes());
}

private static String getRandomHexString(int length) {
StringBuilder result = new StringBuilder();

while (result.length() < length) {
result.append(Integer.toHexString(random.nextInt()));
result.append(Integer.toHexString(RANDOM.nextInt()));
}

return result.substring(0, length);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@tech.jhipster.lite.SharedKernel
package tech.jhipster.lite.generator.base64;

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit ee28074

Please sign in to comment.