summaryrefslogtreecommitdiff
path: root/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/utils/Random.java
diff options
context:
space:
mode:
Diffstat (limited to 'eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/utils/Random.java')
-rw-r--r--eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/utils/Random.java20
1 files changed, 8 insertions, 12 deletions
diff --git a/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/utils/Random.java b/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/utils/Random.java
index 14d54b0b..aedbbb7f 100644
--- a/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/utils/Random.java
+++ b/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/utils/Random.java
@@ -19,7 +19,6 @@
package at.gv.egiz.eaaf.core.impl.utils;
-
import java.io.UnsupportedEncodingException;
import java.nio.ByteBuffer;
import java.security.NoSuchAlgorithmException;
@@ -27,12 +26,13 @@ import java.security.SecureRandom;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
-import at.gv.egiz.eaaf.core.impl.idp.process.support.SecureRandomHolder;
+
import org.apache.commons.codec.binary.Hex;
import org.apache.commons.lang3.ArrayUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import at.gv.egiz.eaaf.core.impl.idp.process.support.SecureRandomHolder;
/**
* Random number generator used to generate ID's.
@@ -44,9 +44,9 @@ public class Random {
private static final Logger log = LoggerFactory.getLogger(Random.class);
private static final char[] allowedPreFix =
- {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r',
+ { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r',
's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J',
- 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'};
+ 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z' };
/** random number generator used. */
private static SecureRandom random;
@@ -63,14 +63,14 @@ public class Random {
}
-
// random = iaik.security.random.SHA256FIPS186Random.getDefault();
}
/**
- * Generate a unique process reference-value [160bit], which always starts with a letter <br>
- * This unique ID consists of single letter, a 64bit date String[yyyyddMM], and a 88bit random
- * value.
+ * Generate a unique process reference-value [160bit], which always starts with
+ * a letter <br>
+ * This unique ID consists of single letter, a 64bit date String[yyyyddMM], and
+ * a 88bit random value.
*
* @return 160bit ID, which is hex encoded
*/
@@ -98,12 +98,8 @@ public class Random {
}
-
-
}
-
-
/**
* Creates a new random number [256bit], and encode it as hex value.
*