Top Description Inners Fields Constructors Methods
org.apache.sshd.server.kex

public final Class Moduli

extends Object
Class Inheritance
Imports
java.io.BufferedReader, .FileNotFoundException, .IOException, .InputStream, .InputStreamReader, .Reader, java.math.BigInteger, java.net.URL, java.nio.charset.StandardCharsets, java.util.AbstractMap.SimpleImmutableEntry, .ArrayList, .Collections, .List, .Map, .Objects, java.util.concurrent.atomic.AtomicReference, org.apache.sshd.common.util.GenericUtils

Helper class to load DH group primes from a file.
Author
Apache MINA SSHD Project

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
private static final AtomicReference<Map.Entry<String, List<Moduli.DhGroup>>>
public static final String
INTERNAL_MODULI_RESPATH

Resource path of internal moduli file

public static final int
public static final int

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static Map.Entry<String, List<Moduli.DhGroup>>
public static List<Moduli.DhGroup>
public static List<Moduli.DhGroup>
public static List<Moduli.DhGroup>
parseModuli(InputStream inputStream)

public static List<Moduli.DhGroup>
public static List<Moduli.DhGroup>
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INTERNAL_MODULI_HOLDERback to summary
private static final AtomicReference<Map.Entry<String, List<Moduli.DhGroup>>> INTERNAL_MODULI_HOLDER
INTERNAL_MODULI_RESPATHback to summary
public static final String INTERNAL_MODULI_RESPATH

Resource path of internal moduli file

MODULI_TESTS_COMPOSITEback to summary
public static final int MODULI_TESTS_COMPOSITE
MODULI_TYPE_SAFEback to summary
public static final int MODULI_TYPE_SAFE

Constructor Detail

Moduliback to summary
private Moduli()

Method Detail

clearInternalModuliCacheback to summary
public static Map.Entry<String, List<Moduli.DhGroup>> clearInternalModuliCache()
loadInternalModuliback to summary
public static List<Moduli.DhGroup> loadInternalModuli(URL url) throws IOException
parseModuliback to summary
public static List<Moduli.DhGroup> parseModuli(URL url) throws IOException
parseModuliback to summary
public static List<Moduli.DhGroup> parseModuli(InputStream inputStream) throws IOException
parseModuliback to summary
public static List<Moduli.DhGroup> parseModuli(Reader reader) throws IOException
parseModuliback to summary
public static List<Moduli.DhGroup> parseModuli(BufferedReader r) throws IOException
org.apache.sshd.server.kex back to summary

public Class Moduli.DhGroup

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final BigInteger
g

private final BigInteger
p

private final int

Constructor Summary

AccessConstructor and Description
public
DhGroup(int size, BigInteger g, BigInteger p)

Method Summary

Modifier and TypeMethod and Description
public BigInteger
getG()

public BigInteger
getP()

public int
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

gback to summary
private final BigInteger g
pback to summary
private final BigInteger p
sizeback to summary
private final int size

Constructor Detail

DhGroupback to summary
public DhGroup(int size, BigInteger g, BigInteger p)

Method Detail

getGback to summary
public BigInteger getG()
getPback to summary
public BigInteger getP()
getSizeback to summary
public int getSize()
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override