Mobile Tools for Java
Release 1.0

org.eclipse.mtj.core.model.jad
Interface IJadSignature


public interface IJadSignature

This interface provides the methods used to sign a MIDlet suite.

Note: This class/interface is part of an interim API that is still under development and expected to change before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken as the API evolves.


Method Summary
 void computeSignature(File jarFile)
          Computes the JAR file signature on the specified file.
 String[] getCertificateStrings()
          Returns an array of Strings containing the encoded certificates that can be used to verify the MIDlet suite signature following to a call to computeSignature.
 String getJarSignatureString()
          Returns the JAR signature string that should be added to the JAD file using the key "MIDlet-Jar-RSA-SHA1" following to a call to computeSignature.
 

Method Detail

computeSignature

void computeSignature(File jarFile)
                      throws CoreException
Computes the JAR file signature on the specified file.

Parameters:
jarFile - File of the JAR to be signed.
Throws:
CoreException - A variety of error conditions can occur, which are wrapped in a CoreException. See the SIGNING error codes in MTJCoreErrors.

getJarSignatureString

String getJarSignatureString()
Returns the JAR signature string that should be added to the JAD file using the key "MIDlet-Jar-RSA-SHA1" following to a call to computeSignature.

Returns:
String containing the encrypted JAR signature.

getCertificateStrings

String[] getCertificateStrings()
Returns an array of Strings containing the encoded certificates that can be used to verify the MIDlet suite signature following to a call to computeSignature. These Strings should be added to the JAD file using the tags "MIDlet-Certificate-1-1" through "MIDlet-Certificate-1-n" (where "n" is the number of certificates)

Returns:
Array of Strings containing encoded certificates.

Mobile Tools for Java
Release 1.0