public final class DHGroupData
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private static java.util.concurrent.ConcurrentHashMap<java.lang.String,byte[]> |
OAKLEY_GROUPS |
| Modifier | Constructor and Description |
|---|---|
private |
DHGroupData() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
getG() |
static byte[] |
getOakleyGroupPrimeValue(java.lang.String name) |
static byte[] |
getP1() |
static byte[] |
getP14() |
static byte[] |
getP15() |
static byte[] |
getP16() |
static byte[] |
getP17() |
static byte[] |
getP18() |
static byte[] |
parseOakleyGroupPrimeValue(java.lang.String str)
Parses the string assumed to contain a HEX-encoded Oakely prime value in big endian format
|
static byte[] |
readOakleyGroupPrimeValue(java.io.BufferedReader br)
Reads a HEX encoded prime value from a possibly multi-line input as follows:
|
static byte[] |
readOakleyGroupPrimeValue(java.io.InputStream stream) |
static byte[] |
readOakleyGroupPrimeValue(java.io.Reader r) |
static byte[] |
readOakleyGroupPrimeValue(java.util.stream.Stream<java.lang.String> lines) |
static byte[] |
readOakleyGroupPrimeValue(java.lang.String name)
Reads a HEX-encoded Oakley prime value from an internal resource file
|
private static final java.util.concurrent.ConcurrentHashMap<java.lang.String,byte[]> OAKLEY_GROUPS
public static byte[] getG()
public static byte[] getP1()
public static byte[] getP14()
public static byte[] getP15()
public static byte[] getP16()
public static byte[] getP17()
public static byte[] getP18()
public static byte[] getOakleyGroupPrimeValue(java.lang.String name)
name - The name of the resource file containing the prime value dataBigIntegerpublic static byte[] readOakleyGroupPrimeValue(java.lang.String name)
throws java.io.IOError
name - The name of the resource file containing the prime value data.
See org.apache.sshd.common.kex package for available primesBigIntegerjava.io.IOError - If failed to access/read the required resourcereadOakleyGroupPrimeValue(InputStream)public static byte[] readOakleyGroupPrimeValue(java.io.InputStream stream)
throws java.io.IOException
java.io.IOExceptionpublic static byte[] readOakleyGroupPrimeValue(java.io.Reader r)
throws java.io.IOException
java.io.IOExceptionpublic static byte[] readOakleyGroupPrimeValue(java.io.BufferedReader br)
throws java.io.IOException
Reads a HEX encoded prime value from a possibly multi-line input as follows:
br - The BufferedReader to read the data fromBigIntegerjava.io.IOException - If invalid data or no encoded value foundparseOakleyGroupPrimeValuepublic static byte[] readOakleyGroupPrimeValue(java.util.stream.Stream<java.lang.String> lines)
throws java.lang.NumberFormatException
java.lang.NumberFormatExceptionpublic static byte[] parseOakleyGroupPrimeValue(java.lang.String str)
throws java.lang.NumberFormatException
str - The HEX-encoded string to decode - ignored if null/emptyBigInteger or empty array if no inputjava.lang.NumberFormatException - if malformed encoded value