public class AlgorithmId extends Object implements Serializable
get(String)
The OID is handled in it's String format in this class. example 1.2.840.113549.1.1.11 for "SHA256withRSA"Constructor and Description |
---|
AlgorithmId()
Deprecated.
use one of the other constructors.
|
AlgorithmId(String oid)
Constructs a parameterless algorithm ID.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(AlgorithmId other)
Returns true iff the argument indicates the same algorithm with the same parameters.
|
boolean |
equals(Object other)
Compares this AlgorithmID to another.
|
boolean |
equals(String id)
Compares two algorithm IDs for equality.
|
static AlgorithmId |
get(String algname)
Returns one of the algorithm IDs most commonly associated with this algorithm name.
|
static AlgorithmId |
getAlgorithmId(String algname)
Deprecated.
use the short get form of this method.
|
static String |
getDigAlgFromSigAlg(String signatureAlgorithm)
Extracts the digest algorithm name from a signature algorithm name.
|
static String |
getEncAlgFromSigAlg(String signatureAlgorithm)
Extracts the encryption algorithm name from a signature algorithm name.
|
String |
getOID()
Returns the ISO OID for this algorithm.
|
int |
hashCode()
Returns a hashcode for this AlgorithmId.
|
static String |
makeSigAlg(String digAlg,
String encAlg)
Creates a signature algorithm name from a digest algorithm name and a encryption algorithm name.
|
@Deprecated public AlgorithmId()
public AlgorithmId(String oid)
oid
- the identifier for the algorithmpublic final String getOID()
getName
call when you do not need to
ensure cross-system portability of algorithm names, or need a user friendly name.public boolean equals(AlgorithmId other)
other
- public boolean equals(@Nullable Object other)
equals
in class Object
other
- preferably an AlgorithmId, else an ObjectIdentifiertrue
if this object is the same as the obj argument; false
otherwise.Object.hashCode()
,
HashMap
public final boolean equals(String id)
public int hashCode()
hashCode
in class Object
Object.equals(java.lang.Object)
,
System.identityHashCode(java.lang.Object)
@Deprecated public static AlgorithmId getAlgorithmId(String algname) throws NoSuchAlgorithmException
algname
- the name being usedNoSuchAlgorithmException
- on error.public static AlgorithmId get(String algname) throws NoSuchAlgorithmException
algname
- the name being usedNoSuchAlgorithmException
- on error.public static String makeSigAlg(String digAlg, String encAlg)
public static String getEncAlgFromSigAlg(String signatureAlgorithm)