Package io.keikai.util
Interface Oid
-
public interface Oid
-
-
Field Summary
Fields Modifier and Type Field Description static int_CC_0static int_CC_astatic int_CC_Astatic int[]_CC_EXTRAstatic int_CC_RANGEstatic int_CHAR_PER_INTstatic int_INT_LENstatic java.util.regex.Pattern_oidPatternstatic java.security.SecureRandom_randomstatic intOID_LENGTH
-
Method Summary
Static Methods Modifier and Type Method Description static int_escOid(int v)static int[]getRandomInts(int length)The function used to generate a list of random integers to construct OID.static booleanisValidOid(java.lang.String value)static java.lang.StringmergeOid(java.lang.String oid1, java.lang.String oid2)Creates a new OID based two OIDs.static java.lang.StringnextOid()Returns the next unique object ID.
-
-
-
Field Detail
-
OID_LENGTH
static final int OID_LENGTH
- See Also:
- Constant Field Values
-
_CC_EXTRA
static final int[] _CC_EXTRA
-
_CC_RANGE
static final int _CC_RANGE
- See Also:
- Constant Field Values
-
_CC_0
static final int _CC_0
- See Also:
- Constant Field Values
-
_CC_A
static final int _CC_A
- See Also:
- Constant Field Values
-
_CC_a
static final int _CC_a
- See Also:
- Constant Field Values
-
_INT_LEN
static final int _INT_LEN
- See Also:
- Constant Field Values
-
_CHAR_PER_INT
static final int _CHAR_PER_INT
- See Also:
- Constant Field Values
-
_oidPattern
static final java.util.regex.Pattern _oidPattern
-
_random
static final java.security.SecureRandom _random
-
-
Method Detail
-
nextOid
static java.lang.String nextOid()
Returns the next unique object ID.
-
mergeOid
static java.lang.String mergeOid(java.lang.String oid1, java.lang.String oid2)Creates a new OID based two OIDs.> To shorten the result OID, we retrieve the substring of [oid1] and [oid2] and concatenate them together. Of course, there might be conflict but the chance is so low that we can ignore (like OID generator),
-
isValidOid
static boolean isValidOid(java.lang.String value)
-
getRandomInts
static int[] getRandomInts(int length)
The function used to generate a list of random integers to construct OID.The default implementation uses [Random] to generate the random number. When running at the browser, it is better to replace with `Crypto.getRandomValues`.
-
_escOid
static int _escOid(int v)
-
-