Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.neomedia.transform.srtp
Class SRTPPolicy

java.lang.Object
  extended by net.java.sip.communicator.impl.neomedia.transform.srtp.SRTPPolicy

public class SRTPPolicy
extends Object

SRTPPolicy holds the SRTP encryption / authentication policy of a SRTP session.

Author:
Bing SU (nova.su@gmail.com)

Field Summary
static int AESCM_ENCRYPTION
          Counter Mode AES Cipher, defined in Section 4.1.1, RFC3711
static int AESF8_ENCRYPTION
          F8 mode AES Cipher, defined in Section 4.1.2, RFC 3711
static int HMACSHA1_AUTHENTICATION
          HAMC SHA1 Authentication, defined in Section 4.2.1, RFC3711
static int NULL_AUTHENTICATION
          Null Authentication, no authentication
static int NULL_ENCRYPTION
          Null Cipher, does not change the content of RTP payload
static int SKEIN_AUTHENTICATION
          Skein Authentication
static int TWOFISH_ENCRYPTION
          Counter Mode TwoFish Cipher
static int TWOFISHF8_ENCRYPTION
          F8 Mode TwoFish Cipher
 
Constructor Summary
SRTPPolicy(int encType, int encKeyLength, int authType, int authKeyLength, int authTagLength, int saltKeyLength)
          Construct a SRTPPolicy object based on given parameters.
 
Method Summary
 int getAuthKeyLength()
          Get the authentication key length
 int getAuthTagLength()
          Get the authentication tag length
 int getAuthType()
          Get the authentication type
 int getEncKeyLength()
          Get the encryption key length
 int getEncType()
          Get the encryption type
 int getSaltKeyLength()
          Get the salt key length
 void setAuthKeyLength(int authKeyLength)
          Set the authentication key length
 void setAuthTagLength(int authTagLength)
          Set the authentication tag length
 void setAuthType(int authType)
          Set the authentication type
 void setEncKeyLength(int encKeyLength)
          Set the encryption key length
 void setEncType(int encType)
          Set the encryption type
 void setSaltKeyLength(int keyLength)
          Set the salt key length
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NULL_ENCRYPTION

public static final int NULL_ENCRYPTION
Null Cipher, does not change the content of RTP payload

See Also:
Constant Field Values

AESCM_ENCRYPTION

public static final int AESCM_ENCRYPTION
Counter Mode AES Cipher, defined in Section 4.1.1, RFC3711

See Also:
Constant Field Values

TWOFISH_ENCRYPTION

public static final int TWOFISH_ENCRYPTION
Counter Mode TwoFish Cipher

See Also:
Constant Field Values

AESF8_ENCRYPTION

public static final int AESF8_ENCRYPTION
F8 mode AES Cipher, defined in Section 4.1.2, RFC 3711

See Also:
Constant Field Values

TWOFISHF8_ENCRYPTION

public static final int TWOFISHF8_ENCRYPTION
F8 Mode TwoFish Cipher

See Also:
Constant Field Values

NULL_AUTHENTICATION

public static final int NULL_AUTHENTICATION
Null Authentication, no authentication

See Also:
Constant Field Values

HMACSHA1_AUTHENTICATION

public static final int HMACSHA1_AUTHENTICATION
HAMC SHA1 Authentication, defined in Section 4.2.1, RFC3711

See Also:
Constant Field Values

SKEIN_AUTHENTICATION

public static final int SKEIN_AUTHENTICATION
Skein Authentication

See Also:
Constant Field Values
Constructor Detail

SRTPPolicy

public SRTPPolicy(int encType,
                  int encKeyLength,
                  int authType,
                  int authKeyLength,
                  int authTagLength,
                  int saltKeyLength)
Construct a SRTPPolicy object based on given parameters. This class acts as a storage class, so all the parameters are passed in through this constructor.

Parameters:
encType - SRTP encryption type
encKeyLength - SRTP encryption key length
authType - SRTP authentication type
authKeyLength - SRTP authentication key length
authTagLength - SRTP authentication tag length
saltKeyLength - SRTP salt key length
Method Detail

getAuthKeyLength

public int getAuthKeyLength()
Get the authentication key length

Returns:
the authentication key length

setAuthKeyLength

public void setAuthKeyLength(int authKeyLength)
Set the authentication key length

Parameters:
authKeyLength - the authentication key length

getAuthTagLength

public int getAuthTagLength()
Get the authentication tag length

Returns:
the authentication tag length

setAuthTagLength

public void setAuthTagLength(int authTagLength)
Set the authentication tag length

Parameters:
authTagLength - the authentication tag length

getAuthType

public int getAuthType()
Get the authentication type

Returns:
the authentication type

setAuthType

public void setAuthType(int authType)
Set the authentication type

Parameters:
authType - the authentication type

getEncKeyLength

public int getEncKeyLength()
Get the encryption key length

Returns:
the encryption key length

setEncKeyLength

public void setEncKeyLength(int encKeyLength)
Set the encryption key length

Parameters:
encKeyLength - the encryption key length

getEncType

public int getEncType()
Get the encryption type

Returns:
the encryption type

setEncType

public void setEncType(int encType)
Set the encryption type

Parameters:
encType - encryption type

getSaltKeyLength

public int getSaltKeyLength()
Get the salt key length

Returns:
the salt key length

setSaltKeyLength

public void setSaltKeyLength(int keyLength)
Set the salt key length

Parameters:
keyLength - the salt key length

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.