All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----w3c.www.dsig.SignatureSuite
w3c.www.dsig.SignatureSuite implements a generic
 DSig Signature Suite as specified in the DSig Label specification.
 Implementations of specific Signature Suites need to subclass
 this class, it therefore also defines the basic API for all signature
 suites.
 
 Applications will never need to create instances of this class
 using the constructors. Instances will either be created when
 using w3c.www.dsig.SigSuiteRegistry.getInstance(urlString)
 or automatically by the parser (which uses the same mechanism
 insternally). For a more detailed description of the API for
 application programmers please consult the
 Using the W3C's DSig Reference Implementation document.
 
Programmers who want to write their on signature suite for the DSig implementation will need to do the following:
w3c.www.dsig.SignatureSuite
 sign()
   verify()
   setBy() and getBy() methods
   getKeyLength() method (not required but recommended)
   super(url, shortName) where url is the string
 identifying the algorithm it implements and shortName is the string that
 would identify the algorithm according to the Java Security naming conventions.
 ShortName may also be null.
   w3c.www.dsig.SigSuiteRegistry.addAlgorithm(MyUrl, MySigSuiteClass.getClass());
 w3c.www.dsig.SigSuiteDSS.
 
 SIGSUITE_ID
	SIGSUITE_ID
   suiteValues
	suiteValues
   
 SignatureSuite(String, String)
	SignatureSuite(String, String)
   
 addValuePair(Object, Object, Object)
	addValuePair(Object, Object, Object)
   Base64ToBigInt(String)
	Base64ToBigInt(String)
   Base64ToByteArray(String)
	Base64ToByteArray(String)
   BigInteger2ByteArrayWithLengthPrefix(BigInteger)
	BigInteger2ByteArrayWithLengthPrefix(BigInteger)
   BigIntToBase64(BigInteger)
	BigIntToBase64(BigInteger)
   ByteArrayToBase64(byte[])
	ByteArrayToBase64(byte[])
   getBy()
	getBy()
  ByX field.
   getByType()
	getByType()
   getKeyLength()
	getKeyLength()
   getShortName()
	getShortName()
   getSuiteValues()
	getSuiteValues()
   getURL()
	getURL()
   parse(Vector)
	parse(Vector)
   parse2(Vector)
	parse2(Vector)
   removeBy()
	removeBy()
   setBy(String, Object)
	setBy(String, Object)
  By information in the label.
   sign(DSigLabelInterface, PrivateKey)
	sign(DSigLabelInterface, PrivateKey)
   toString()
	toString()
   toVector()
	toVector()
   verify(DSigLabelInterface, PublicKey)
	verify(DSigLabelInterface, PublicKey)
   
 suiteValues
suiteValues
protected Hashtable suiteValues
 SIGSUITE_ID
SIGSUITE_ID
public static final String SIGSUITE_ID
 
 SignatureSuite
SignatureSuite
 protected SignatureSuite(String suiteURL,
                          String shortName)
 
 getSuiteValues
getSuiteValues
public final Hashtable getSuiteValues()
 getURL
getURL
public final String getURL()
 getShortName
getShortName
public final String getShortName()
Note that this name is purely informational, in particular there is absolutely no guarantee that there is only one signature suite for each short name or that this signature suite performs exactly like the algorithm in the Java Security API, nor does it imply that this algorithm is installed in the Java Security API at all. However, it still might be usefull to determine which types of keys the signature suite accepts.
 addValuePair
addValuePair
 protected void addValuePair(Object entryname,
                             Object key,
                             Object val)
   (Signature
      ...
      (entryname
         (key val)
      )
   )
 
 verify
verify
 public Trivalue verify(DSigLabelInterface label,
                        PublicKey pubkey)
The SignatureSuite base class only provides a dummy function the subclasses need to override.
 sign
sign
 public DSigLabelInterface sign(DSigLabelInterface label,
                                PrivateKey privkey)
The SignatureSuite base class only provides a dummy function the subclasses need to override.
 getKeyLength
getKeyLength
public int getKeyLength()
The SignatureSuite base class only provides a dummy function the subclasses need to override.
 setBy
setBy
 public SignatureSuite setBy(String type,
                             Object signer)
By information in the label. Set the ByX
 type to type with the value signer. If
 a signature suite does not support the given type, the by information
 remains unchanged and this method returns null.
 
 How signer is interpreted and what type it needs to have
 is signature suite dependent. However, when using ByKey or
 ByHash signer always has to be an instance of PublicKey,
 for ByName it has to be a string.
 
This method has to be called after after signing to have any effect.
The SignatureSuite base class only provides a dummy function the subclasses need to override.
 getByType
getByType
public String getByType()
The SignatureSuite base class only provides a dummy function the subclasses need to override.
 getBy
getBy
public Object getBy()
ByX field. The type of the
 returned object will be the same as the type of the object when
 using setBy(), however, for ByHash this method
 of course cannot return the key itself, it will a byte array of the hash
 of the key as it is contained in the label. 
 In case of an error, this method returns null.
The SignatureSuite base class only provides a dummy function the subclasses need to override.
 removeBy
removeBy
protected void removeBy()
 parse
parse
public void parse(Vector data) throws DSigException
 parse2
parse2
public static SignatureSuite parse2(Vector data) throws DSigException
 ByteArrayToBase64
ByteArrayToBase64
public static String ByteArrayToBase64(byte ba[])
 Base64ToByteArray
Base64ToByteArray
public static byte[] Base64ToByteArray(String b64)
 BigIntToBase64
BigIntToBase64
public static String BigIntToBase64(BigInteger bi)
 Base64ToBigInt
Base64ToBigInt
public static BigInteger Base64ToBigInt(String b64)
 BigInteger2ByteArrayWithLengthPrefix
BigInteger2ByteArrayWithLengthPrefix
public static byte[] BigInteger2ByteArrayWithLengthPrefix(BigInteger bi)
The format produced is compatible with ASN.1 BER encoding of integers, it only lacks the leading object identifier.
 toVector
toVector
public Vector toVector()
 toString
toString
public final String toString()
All Packages Class Hierarchy This Package Previous Next Index