AlgorithmIdentifierpublic class AlgorithmIdentifier extends Object The class encapsulates the ASN.1 DER encoding/decoding work
with the Algorithm Identifier which is a part of X.509 certificate
(as specified in RFC 3280 -
Internet X.509 Public Key Infrastructure.
Certificate and Certificate Revocation List (CRL) Profile.
http://www.ietf.org/rfc/rfc3280.txt):
AlgorithmIdentifier ::= SEQUENCE {
algorithm OBJECT IDENTIFIER,
parameters ANY DEFINED BY algorithm OPTIONAL
}
|
Fields Summary |
---|
private String | algorithm | private String | algorithmName | private byte[] | parameters | private byte[] | encoding | public static final org.apache.harmony.security.asn1.ASN1Sequence | ASN1Custom AlgorithmIdentifier DER encoder/decoder |
Constructors Summary |
---|
public AlgorithmIdentifier(String algorithm)TODO
this(algorithm, null, null);
| public AlgorithmIdentifier(String algorithm, byte[] parameters)TODO
this(algorithm, parameters, null);
| private AlgorithmIdentifier(String algorithm, byte[] parameters, byte[] encoding)
this.algorithm = algorithm;
this.parameters = parameters;
this.encoding = encoding;
|
Methods Summary |
---|
public void | dumpValue(java.lang.StringBuffer buffer)Places the string representation into the StringBuffer object.
buffer.append(getAlgorithmName());
if (parameters == null) {
buffer.append(", no params, "); //$NON-NLS-1$
} else {
buffer.append(", params unparsed, "); //$NON-NLS-1$
}
buffer.append("OID = "); //$NON-NLS-1$
buffer.append(getAlgorithm());
| public boolean | equals(java.lang.Object ai)
if (!(ai instanceof AlgorithmIdentifier)) {
return false;
}
AlgorithmIdentifier algid = (AlgorithmIdentifier) ai;
return (algorithm.equals(algid.algorithm))
&& ((parameters == null)
? algid.parameters == null
: Arrays.equals(parameters, algid.parameters));
| public java.lang.String | getAlgorithm()Returns the value of algorithm field of the structure.
return algorithm;
| public java.lang.String | getAlgorithmName()Returns the name of the algorithm corresponding to
its OID. If there is no the such correspondence,
algorithm OID is returned.
if (algorithmName == null) {
algorithmName = AlgNameMapper.map2AlgName(algorithm);
if (algorithmName == null) {
algorithmName = algorithm;
}
}
return algorithmName;
| public byte[] | getEncoded()Returns ASN.1 encoded form of this X.509 AlgorithmIdentifier value.
if (encoding == null) {
encoding = ASN1.encode(this);
}
return encoding;
| public byte[] | getParameters()Returns the value of parameters field of the structure.
return parameters;
|
|