public interface Token {

    // Return the value of the wsu:Id attribute of the token.
    public String getWSUId();

    // Return a string identifier for the type of token.
    public String getType();

    // Return the parent WSSMessage object that wraps this token.
    public WSSMessage getParentWSSMessage();

    // Return the WSS-compliant XML structure of this token.
    public String getXMLString();

    // Return the W3C DOM object representation of the token object.
    public org.w3.DOM.Element getDOMObject();

    // The Token instance will receive an array of bytes (secretBytes) that
    // it will treat as the secret to be used to 
    // produce signatures and decrypt encrypted data.
    public void setSecret(byte[] secretBytes);

    // The sign, signWithXPath, and decrypt methods are included here
    // because the Token knows the secret and the secret is needed to 
    // produce signatures and for decryption.
    // Therefore, the WSSMessage, Signature, and EncryptedData classes will
    // use these methods internally.
    // The Token should never tell the secret to any other class.

    public String sign(String wsuElementID,
                      String digestAlgo,
                      String signatureAlgo,
                      String canonicalizationAlgo);

    public String signWithXPath(String XPathExpression,
                         String digestAlgo,
                         String signatureAlgo,
                         String canonicalizationAlgo);

    public void decrypt(EncyptedData encryptedData);

}//Token