public class SrtpSDesFactory extends Object implements SDesFactory
Constructor and Description |
---|
SrtpSDesFactory() |
Modifier and Type | Method and Description |
---|---|
SrtpCryptoAttribute |
createCryptoAttribute()
Creates an empty crypto attribute for the grammar implementing this interface.
|
SrtpCryptoAttribute |
createCryptoAttribute(int tag,
String keyAlg)
Creates an SRTP crypto attribute with the specified parameters, for use in an SDP.
|
SrtpCryptoAttribute |
createCryptoAttribute(int tag,
String keyAlg,
SrtpSessionParam[] params)
Creates an SRTP crypto attribute with the specified parameters, for use in an SDP.
|
SrtpCryptoSuite |
createCryptoSuite(String suite)
Creates a crypto suite instance for the grammar implementing this interface.
|
SrtpKeyParam |
createKeyParam(String keyParam)
Creates a key parameter instance for the grammar implementing this interface.
|
SrtpKeyParam[] |
createKeyParamArray(int size)
Utility method to create a typed array of
KeyParameter s. |
SrtpSessionParam |
createSessionParam(String sessionParam)
Creates a session parameter instance for the grammar implementing this interface.
|
SrtpSessionParam[] |
createSessionParamArray(int size)
Utility method to create a typed array of
SessionParam s. |
void |
setRandomGenerator(Random r)
Sets the random number generator to be used for generating the SDES keys.
|
public SrtpCryptoAttribute createCryptoAttribute(int tag, String keyAlg)
If no random generator is set with setRandomGenerator(Random)
then the
SHA1PRNG, or if not available, the system's default SecureRandom
will be used.
tag
- decimal number used as an identifier for a particular crypto attributekeyAlg
- identifier that describes the encryption and authentication algorithmspublic SrtpCryptoAttribute createCryptoAttribute(int tag, String keyAlg, SrtpSessionParam[] params)
tag
- decimal number used as an identifier for a particular crypto attributekeyAlg
- identifier that describes the encryption and authentication algorithmsparams
- Session parameters for the crypto attributepublic void setRandomGenerator(Random r)
SDesFactory
setRandomGenerator
in interface SDesFactory
r
- The random number generator.public SrtpCryptoAttribute createCryptoAttribute()
SDesFactory
createCryptoAttribute
in interface SDesFactory
public SrtpCryptoSuite createCryptoSuite(String suite)
SDesFactory
createCryptoSuite
in interface SDesFactory
suite
- The suite name that defines the cryptographic parameters.public SrtpKeyParam createKeyParam(String keyParam)
SDesFactory
createKeyParam
in interface SDesFactory
keyParam
- The textual representation of the key parameter field.public SrtpKeyParam[] createKeyParamArray(int size)
SDesFactory
KeyParameter
s.createKeyParamArray
in interface SDesFactory
size
- The size of the array to create.public SrtpSessionParam createSessionParam(String sessionParam)
SDesFactory
createSessionParam
in interface SDesFactory
sessionParam
- The textual representation of the session parameter.public SrtpSessionParam[] createSessionParamArray(int size)
SDesFactory
SessionParam
s.createSessionParamArray
in interface SDesFactory
size
- The size of the array to create.Copyright © 2016 University of Applied Sciences Northwestern Switzerland. All rights reserved.