public final class DHGroupData extends Object
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
getG() |
static byte[] |
getOakleyGroupPrimeValue(String name) |
static byte[] |
getP1() |
static byte[] |
getP14() |
static byte[] |
getP15() |
static byte[] |
getP16() |
static byte[] |
getP17() |
static byte[] |
getP18() |
static byte[] |
parseOakleyGroupPrimeValue(String str)
Parses the string assumed to contain a HEX-encoded Oakely prime value in big endian format
|
static byte[] |
readOakleyGroupPrimeValue(BufferedReader br)
Reads a HEX encoded prime value from a possibly multi-line input as follows:
|
static byte[] |
readOakleyGroupPrimeValue(InputStream stream) |
static byte[] |
readOakleyGroupPrimeValue(Reader r) |
static byte[] |
readOakleyGroupPrimeValue(Stream<String> lines) |
static byte[] |
readOakleyGroupPrimeValue(String name)
Reads a HEX-encoded Oakley prime value from an internal resource file
|
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(String name)
name - The name of the resource file containing the prime value dataBigIntegerpublic static byte[] readOakleyGroupPrimeValue(String name) throws IOError
name - The name of the resource file containing the prime value data. See
org.apache.sshd.common.kex package for available primesBigIntegerIOError - If failed to access/read the required resourcereadOakleyGroupPrimeValue(InputStream)public static byte[] readOakleyGroupPrimeValue(InputStream stream) throws IOException
IOExceptionpublic static byte[] readOakleyGroupPrimeValue(Reader r) throws IOException
IOExceptionpublic static byte[] readOakleyGroupPrimeValue(BufferedReader br) throws IOException
Reads a HEX encoded prime value from a possibly multi-line input as follows:
br - The BufferedReader to read the data fromBigIntegerIOException - If invalid data or no encoded value foundparseOakleyGroupPrimeValuepublic static byte[] readOakleyGroupPrimeValue(Stream<String> lines) throws NumberFormatException
NumberFormatExceptionpublic static byte[] parseOakleyGroupPrimeValue(String str) throws NumberFormatException
str - The HEX-encoded string to decode - ignored if null/emptyBigInteger or empty array if
no inputNumberFormatException - if malformed encoded valueCopyright © 2008–2021 The Apache Software Foundation. All rights reserved.