Top Description Inners Fields Constructors Methods
org.apache.sshd.common.digest

public final Enum BuiltinDigests

extends Enum<BuiltinDigests>
implements DigestFactory
Class Inheritance
All Implemented Interfaces
org.apache.sshd.common.digest.DigestFactory, org.apache.sshd.common.OptionalFeature, org.apache.sshd.common.NamedFactory, org.apache.sshd.common.NamedResource, org.apache.sshd.common.Factory, java.util.function.Supplier, org.apache.sshd.common.digest.DigestInformation, org.apache.sshd.common.AlgorithmNameProvider
Imports
java.util.Collections, .EnumSet, .Set, org.apache.sshd.common.NamedFactory, .NamedResource, org.apache.sshd.common.util.GenericUtils

Provides easy access to the currently implemented digests
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 final String
private final int
private final String
public static final BuiltinDigests
public static final BuiltinDigests
public static final BuiltinDigests
public static final BuiltinDigests
public static final BuiltinDigests
public static final BuiltinDigests
private final boolean
public static final Set<BuiltinDigests>

Constructor Summary

AccessConstructor and Description
private
BuiltinDigests(String factoryName, String algorithm, int blockSize)

Method Summary

Modifier and TypeMethod and Description
public final Digest
public static BuiltinDigests

Returns:

The matching org.apache.sshd.common.digest.BuiltinDigests whose algorithm matches (case insensitive) the provided name - null if no match
fromAlgorithm
(String
The algorithm to find - ignored if null/empty
algo
)

public static BuiltinDigests

Returns:

The matching org.apache.sshd.common.digest.BuiltinDigests whose algorithm matches (case insensitive) the digets's algorithm - null if no match
fromDigest
(Digest
The Digest instance - ignored if null
d
)

public static BuiltinDigests

Returns:

The matching org.apache.sshd.common.digest.BuiltinDigests whose factory name matches (case insensitive) the digest factory name
fromFactory
(NamedFactory<? extends Digest>
The org.apache.sshd.common.NamedFactory for the cipher - ignored if null
factory
)

public static BuiltinDigests

Returns:

The matching org.apache.sshd.common.digest.BuiltinDigests whose factory name matches (case insensitive) the provided name - null if no match
fromFactoryName
(String
The factory name - ignored if null/empty
name
)

public static BuiltinDigests

Returns:

The matching org.apache.sshd.common.digest.BuiltinDigests whose Enum#name() matches (case insensitive) the provided argument - null if no match
fromString
(String
The Enum's name - ignored if null/empty
s
)

public final String
public final int
public final String
public final boolean
public final String
toString()

Overrides java.lang.Enum.toString.

Returns the name of this enum constant, as contained in the declaration.

public static BuiltinDigests
public static BuiltinDigests[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinalvalueOf

Field Detail

algorithmback to summary
private final String algorithm
blockSizeback to summary
private final int blockSize
factoryNameback to summary
private final String factoryName
md5back to summary
public static final BuiltinDigests md5
sha1back to summary
public static final BuiltinDigests sha1
sha224back to summary
public static final BuiltinDigests sha224
sha256back to summary
public static final BuiltinDigests sha256
sha384back to summary
public static final BuiltinDigests sha384
sha512back to summary
public static final BuiltinDigests sha512
supportedback to summary
private final boolean supported
VALUESback to summary
public static final Set<BuiltinDigests> VALUES

Constructor Detail

BuiltinDigestsback to summary
private BuiltinDigests(String factoryName, String algorithm, int blockSize)

Method Detail

createback to summary
public final Digest create()

Implements org.apache.sshd.common.Factory.create.

Returns:Digest

Doc from org.apache.sshd.common.Factory.create.

A new instance

Annotations
@Override
fromAlgorithmback to summary
public static BuiltinDigests fromAlgorithm(String algo)
Parameters
algo:String

The algorithm to find - ignored if null/empty

Returns:BuiltinDigests

The matching org.apache.sshd.common.digest.BuiltinDigests whose algorithm matches (case insensitive) the provided name - null if no match

fromDigestback to summary
public static BuiltinDigests fromDigest(Digest d)
Parameters
d:Digest

The Digest instance - ignored if null

Returns:BuiltinDigests

The matching org.apache.sshd.common.digest.BuiltinDigests whose algorithm matches (case insensitive) the digets's algorithm - null if no match

fromFactoryback to summary
public static BuiltinDigests fromFactory(NamedFactory<? extends Digest> factory)
Parameters
factory:NamedFactory<? extends Digest>

The org.apache.sshd.common.NamedFactory for the cipher - ignored if null

Returns:BuiltinDigests

The matching org.apache.sshd.common.digest.BuiltinDigests whose factory name matches (case insensitive) the digest factory name

See Also
fromFactoryName(String)
fromFactoryNameback to summary
public static BuiltinDigests fromFactoryName(String name)
Parameters
name:String

The factory name - ignored if null/empty

Returns:BuiltinDigests

The matching org.apache.sshd.common.digest.BuiltinDigests whose factory name matches (case insensitive) the provided name - null if no match

fromStringback to summary
public static BuiltinDigests fromString(String s)
Parameters
s:String

The Enum's name - ignored if null/empty

Returns:BuiltinDigests

The matching org.apache.sshd.common.digest.BuiltinDigests whose Enum#name() matches (case insensitive) the provided argument - null if no match

getAlgorithmback to summary
public final String getAlgorithm()

Implements org.apache.sshd.common.AlgorithmNameProvider.getAlgorithm.

Annotations
@Override
getBlockSizeback to summary
public final int getBlockSize()

Implements org.apache.sshd.common.digest.DigestInformation.getBlockSize.

Returns:int

Doc from org.apache.sshd.common.digest.DigestInformation.getBlockSize.

The number of bytes in the digest's output

Annotations
@Override
getNameback to summary
public final String getName()

Implements org.apache.sshd.common.NamedResource.getName.

Returns:String

Doc from org.apache.sshd.common.NamedResource.getName.

The resource name

Annotations
@Override
isSupportedback to summary
public final boolean isSupported()

Implements org.apache.sshd.common.OptionalFeature.isSupported.

Annotations
@Override
toStringback to summary
public final String toString()

Overrides java.lang.Enum.toString.

Doc from java.lang.Enum.toString.

Returns the name of this enum constant, as contained in the declaration. This method may be overridden, though it typically isn't necessary or desirable. An enum class should override this method when a more "programmer-friendly" string form exists.

Returns:String

the name of this enum constant

Annotations
@Override
valueOfback to summary
public static BuiltinDigests valueOf(String name)
valuesback to summary
public static BuiltinDigests[] values()
org.apache.sshd.common.digest back to summary

public final Class BuiltinDigests.Constants

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final String
public static final String
public static final String
public static final String
public static final String
public static final String

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

MD5back to summary
public static final String MD5
SHA1back to summary
public static final String SHA1
SHA224back to summary
public static final String SHA224
SHA256back to summary
public static final String SHA256
SHA384back to summary
public static final String SHA384
SHA512back to summary
public static final String SHA512

Constructor Detail

Constantsback to summary
private Constants()