|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--jain.protocol.ip.sip.header.Header
|
+--jain.protocol.ip.sip.header.GeneralHeader
|
+--jain.protocol.ip.sip.header.EncryptionHeader
This class represents the Encryption general-header. The EncryptionHeader specifies that the content has been encrypted. It is intended for end-to-end encryption of RequestMessages and ResponseMessages. RequestMessages are encrypted based on the public key belonging to the entity named in the ToHeader. ResponseMessages are encrypted based on the public key conveyed in the ResponseKeyHeader. Note that the public keys themselves may not be used for the encryption. This depends on the particular algorithms used.
For any encrypted Message, at least the Message body and possibly other Message Headers are encrypted. An application receiving a RequestMessage or ResponseMessage containing an EncryptionHeader decrypts the body using the private key, which returns the decrypted Message with decrypted body plus any decrypted Headers. Message Headers in the decrypted part completely replace those with the same field name in the unencrypted part. Note that the RequestMessage method and RequestURI cannot be encrypted.
Encryption only provides privacy; the recipient has no guarantee that the RequestMessage or ResponseMessage came from the party listed in the FromHeader, only that the sender used the recipient's public key. However, proxies will not be able to modify the RequestMessage or ResponseMessage.
Since proxies can base their forwarding decision on any combination of Headers, there is no guarantee that an encrypted RequestMessage "hiding" Headers will reach the same destination as an otherwise identical un-encrypted RequestMessage.
| Field Summary | |
static java.lang.String |
token
Token of EncryptionHeader |
| Fields inherited from class jain.protocol.ip.sip.header.Header |
ENTITY_HEADER,
GENERAL_HEADER,
REQUEST_HEADER,
RESPONSE_HEADER |
| Constructor Summary | |
EncryptionHeader(java.lang.String scheme)
Creates an EncryptionHeader based on given scheme |
|
| Method Summary | |
java.lang.Object |
clone()
Creates and returns a copy of EncryptionHeader |
boolean |
equals(EncryptionHeader encryptionHeader)
Indicates whether some other EncryptionHeader is "equal to" this one |
java.lang.String |
getParameter(java.lang.String parameter)
Gets the value of specified parameter in EncryptionHeader |
java.lang.String[] |
getParameters()
Gets an array of EncryptionHeader's parameter names |
java.lang.String |
getScheme()
Gets scheme of EncryptionHeader |
java.lang.String |
getValue()
Gets value of EncryptionHeader |
boolean |
hasParameter(java.lang.String parameter)
Gets boolean value to indicate if the EncryptionHeader has specified parameter |
boolean |
hasParameters()
Gets boolean value to indicate if the EncryptionHeader has parameters |
void |
removeParameter(java.lang.String parameter)
Removes specified parameter from EncryptionHeader |
void |
removeParameters()
Removes all parameters from EncryptionHeader |
void |
setParameter(java.lang.String parameter,
java.lang.String value)
Sets value of parameter to value in EncryptionHeader |
void |
setScheme(java.lang.String scheme)
Sets scheme of EncryptionHeader |
| Methods inherited from class jain.protocol.ip.sip.header.Header |
equals,
getHeaderType,
getToken,
setValue,
toString |
| Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Field Detail |
public static final java.lang.String token
| Constructor Detail |
public EncryptionHeader(java.lang.String scheme)
throws java.lang.IllegalArgumentException
scheme - scheme| Method Detail |
public java.lang.String getParameter(java.lang.String parameter)
throws ParameterNotSetException
parameter - parameter to retrievepublic boolean hasParameters()
public boolean hasParameter(java.lang.String parameter)
public void setParameter(java.lang.String parameter,
java.lang.String value)
parameter - name of parametervalue - value of parameter
public java.lang.String[] getParameters()
throws ParameterNotSetException
public void removeParameter(java.lang.String parameter)
parameter - parameter to remove from EncryptionHeaderpublic void removeParameters()
parameter - parameter to remove from EncryptionHeader
public void setScheme(java.lang.String scheme)
throws java.lang.IllegalArgumentException
scheme - schemepublic java.lang.String getScheme()
public java.lang.String getValue()
public java.lang.Object clone()
public boolean equals(EncryptionHeader encryptionHeader)
encryptionHeader - the EncryptionHeader with which to compare
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright - 2000 Sun Microsystems