com.dstc.security.cms.atts
Interface AlgorithmAndKeyLength


public interface AlgorithmAndKeyLength
extends SMIMECapability

An interface for an SMIMECapability denoting an algorithm and an optional key length. Existence of an AlgorithmAndkeyLength in a signed SMIMECapabilities attribute for a signed message indicates support for the algorithm (and key length, if present) contained within by the signer of the message. Non-existence of such an AlgorithmAndKeyLength in a signed SMIMECapabilities indicates lack of support thereof.

See Also:
SMIMECapability, SMIMECapabilities

Method Summary
 String getAlgorithmName()
          Returns the algorithm name if there is a mapping from the corresponding object identifier.
 int getKeyLength()
          Returns the key length for the algorithm, or 0 if undefined (indicating no special length restrictions) or is inappropriate (eg.
 String getObjectIdentifier()
          Returns the Object Identifier for this SMIMECapability as a dotted String, eg "1.2.840.113549.3.7".
 

Method Detail

getObjectIdentifier

public String getObjectIdentifier()
Returns the Object Identifier for this SMIMECapability as a dotted String, eg "1.2.840.113549.3.7".

getAlgorithmName

public String getAlgorithmName()
Returns the algorithm name if there is a mapping from the corresponding object identifier. Mappings are defined for "DESede/CBC", "RC2/CBC", "SHA1withRSA", "SHA1withDSA" as specified in RFC2633 "S/MIME Version 3 Message Specification".

getKeyLength

public int getKeyLength()
Returns the key length for the algorithm, or 0 if undefined (indicating no special length restrictions) or is inappropriate (eg. if the algorithm is a signature algorithm).