public class ZrtpConfigure extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
PREFER_NON_NIST |
static int |
STANDARD
Define the algorithm selection policies.
|
| Constructor and Description |
|---|
ZrtpConfigure() |
| Modifier and Type | Method and Description |
|---|---|
<T extends Enum<T>> |
addAlgo(T algo)
Add an algorithm to configuration data.
|
<T extends Enum<T>> |
addAlgoAt(int index,
T algo)
Add an algorithm to configuration data.
|
int |
addAuthLength(ZrtpConstants.SupportedAuthLengths algo)
Add a SRTP authentication length to configuration data.
|
int |
addAuthLengthAt(int index,
ZrtpConstants.SupportedAuthLengths algo)
Add a SRTP authentication length to configuration data.
|
int |
addHashAlgo(ZrtpConstants.SupportedHashes algo)
Add a hash algorithm to configuration data.
|
int |
addHashAlgoAt(int index,
ZrtpConstants.SupportedHashes algo)
Add a hash algorithm to configuration data at defined position.
|
int |
addPubKeyAlgo(ZrtpConstants.SupportedPubKeys algo)
Add a public key algorithm to configuration data.
|
int |
addPubKeyAlgoAt(int index,
ZrtpConstants.SupportedPubKeys algo)
Add a public key algorithm to configuration data.
|
int |
addSasTypeAlgo(ZrtpConstants.SupportedSASTypes algo)
Add a SAS type algorithm to configuration data.
|
int |
addSasTypeAlgoAt(int index,
ZrtpConstants.SupportedSASTypes algo)
Add a SAS type algorithm to configuration data.
|
int |
addSymCipherAlgo(ZrtpConstants.SupportedSymCiphers algo)
Add a symmetric cipher algorithm to configuration data.
|
int |
addSymCipherAlgoAt(int index,
ZrtpConstants.SupportedSymCiphers algo)
Add a symmetric cipher algorithm to configuration data.
|
<T extends Enum<T>> |
algos(T algo)
Returns Iterable for SRTP authentication lengths.
|
Iterable<ZrtpConstants.SupportedAuthLengths> |
authLengths()
Returns Iterable for SRTP authentication lengths.
|
void |
clear()
Clears all configuration data.
|
<T extends Enum<T>> |
containsAuthLength(T algo)
Check if ZrtpConfigure contains an algorithm.
|
boolean |
containsAuthLength(ZrtpConstants.SupportedAuthLengths length)
Check if ZrtpConfigure contains a Auth lengths.
|
boolean |
containsCipherAlgo(ZrtpConstants.SupportedSymCiphers cipher)
Check if ZrtpConfigure contains a cipher algorithm.
|
boolean |
containsHashAlgo(ZrtpConstants.SupportedHashes hash)
Check if ZrtpConfigure contains a hash algorithm.
|
boolean |
containsPubKeyAlgo(ZrtpConstants.SupportedPubKeys pubkey)
Check if ZrtpConfigure contains a Public key algorithm.
|
boolean |
containsSasTypeAlgo(ZrtpConstants.SupportedSASTypes sas)
Check if ZrtpConfigure contains a SAS algorithm.
|
<T extends Enum<T>> |
getAlgoAt(int index,
T algo)
Returns the identifier an algorithm at the given index.
|
ZrtpConstants.SupportedAuthLengths |
getAuthLengthAt(int index)
Returns the identifier of the SRTP authentication length at the given
index.
|
ZrtpConstants.SupportedHashes |
getHashAlgoAt(int index)
Returns the identifier of the hash algorithm at the given index.
|
<T extends Enum<T>> |
getNumConfiguredAlgos(T algo)
Returns the number of configured algorithms.
|
int |
getNumConfiguredAuthLengths()
Returns the number of configured SRTP authentication lengths.
|
int |
getNumConfiguredHashes()
Returns the number of configured hash algorithms.
|
int |
getNumConfiguredPubKeys()
Returns the number of configured public key algorithms.
|
int |
getNumConfiguredSasTypes()
Returns the number of configured SAS type algorithms.
|
int |
getNumConfiguredSymCiphers()
Returns the number of configured symmetric cipher algorithms.
|
ZrtpConstants.SupportedPubKeys |
getPubKeyAlgoAt(int index)
Returns the identifier of the public key algorithm at the given index.
|
ZrtpConstants.SupportedSASTypes |
getSasTypeAlgoAt(int index)
Returns the identifier of the SAS type algorithm at the given index.
|
ZrtpConstants.SupportedSymCiphers |
getSymCipherAlgoAt(int index)
Returns the identifier of the symmetric cipher algorithm at the given
index.
|
Iterable<ZrtpConstants.SupportedHashes> |
hashes()
Returns Iterable for the hashes.
|
boolean |
isParanoidMode()
Check status of paranoid mode.
|
boolean |
isSasSignature()
Check status of SAS signature processing.
|
boolean |
isTrustedMitM()
Check status of trusted MitM processing.
|
Iterable<ZrtpConstants.SupportedPubKeys> |
publicKeyAlgos()
Returns Iterable for public key algorithms.
|
<T extends Enum<T>> |
removeAlgo(T algo)
Remove an algorithm from configuration data.
|
int |
removeAuthLength(ZrtpConstants.SupportedAuthLengths algo)
Remove a SRTP authentication length from configuration data.
|
int |
removeHashAlgo(ZrtpConstants.SupportedHashes algo)
Remove a hash algorithm from configuration data.
|
int |
removePubKeyAlgo(ZrtpConstants.SupportedPubKeys algo)
Remove a public key algorithm from configuration data.
|
int |
removeSasTypeAlgo(ZrtpConstants.SupportedSASTypes algo)
Remove a SAS type algorithm from configuration data.
|
int |
removeSymCipherAlgo(ZrtpConstants.SupportedSymCiphers algo)
Remove a symmetric cipher algorithm from configuration data.
|
Iterable<ZrtpConstants.SupportedSASTypes> |
sasTypes()
Returns Iterable for SAS algorithms.
|
void |
setMandatoryOnly()
Convenience function that sets the mandatory algorithms only.
|
void |
setMobileConfig() |
void |
setParanoidMode(boolean yesNo)
Enables or disables paranoid mode.
|
void |
setSasSignature(boolean yesNo)
Enables or disables SAS signature processing.
|
void |
setStandardConfig()
Convenience function that sets a pre-defined standard configuration.
|
void |
setTrustedMitM(boolean yesNo)
Enables or disables trusted MitM processing.
|
Iterable<ZrtpConstants.SupportedSymCiphers> |
symCiphers()
Returns Iterable for the symmetric ciphers.
|
public static final int STANDARD
public static final int PREFER_NON_NIST
public void setStandardConfig()
public void setMobileConfig()
public void setMandatoryOnly()
public void clear()
public void setTrustedMitM(boolean yesNo)
yesNo - If set to true then trusted MitM processing is enabled.public boolean isTrustedMitM()
public void setSasSignature(boolean yesNo)
yesNo - If set to true then certificate processing is enabled.public boolean isSasSignature()
public void setParanoidMode(boolean yesNo)
yesNo - If set to true then paranoid mode is enabled.public boolean isParanoidMode()
public int addHashAlgo(ZrtpConstants.SupportedHashes algo)
algo - The identifier of the hash algorithm to add.public int addHashAlgoAt(int index,
ZrtpConstants.SupportedHashes algo)
algo - The identifier of the hash algorithm to add.index - The index into the configuration datapublic int removeHashAlgo(ZrtpConstants.SupportedHashes algo)
algo - The identifier of the hash algorithm to remove.public int getNumConfiguredHashes()
public ZrtpConstants.SupportedHashes getHashAlgoAt(int index)
EndSupportedHashes.public Iterable<ZrtpConstants.SupportedHashes> hashes()
for (ZrtpConstants.SupportedHashes sh: config.hashes()) {public boolean containsHashAlgo(ZrtpConstants.SupportedHashes hash)
public int addSymCipherAlgo(ZrtpConstants.SupportedSymCiphers algo)
algo - The identifier of the cipher algorithm to add.public int addSymCipherAlgoAt(int index,
ZrtpConstants.SupportedSymCiphers algo)
algo - The identifier of the cipher algorithm to add.index - The index into the configuration datapublic int removeSymCipherAlgo(ZrtpConstants.SupportedSymCiphers algo)
algo - The identifier of the cipher algorithm to remove.public int getNumConfiguredSymCiphers()
public ZrtpConstants.SupportedSymCiphers getSymCipherAlgoAt(int index)
EndSupportedSymCiphers.public Iterable<ZrtpConstants.SupportedSymCiphers> symCiphers()
for (ZrtpConstants.SupportedHashes sh: config.symCiphers()) {public boolean containsCipherAlgo(ZrtpConstants.SupportedSymCiphers cipher)
public int addPubKeyAlgo(ZrtpConstants.SupportedPubKeys algo)
algo - The identifier of the public key algorithm to add.public int addPubKeyAlgoAt(int index,
ZrtpConstants.SupportedPubKeys algo)
algo - The identifier of the public key algorithm to add.index - The index into the configuration datapublic int removePubKeyAlgo(ZrtpConstants.SupportedPubKeys algo)
algo - The identifier of the public key algorithm to remove.public int getNumConfiguredPubKeys()
public ZrtpConstants.SupportedPubKeys getPubKeyAlgoAt(int index)
EndSupportedPubKeys.public Iterable<ZrtpConstants.SupportedPubKeys> publicKeyAlgos()
for (ZrtpConstants.SupportedHashes sh: config.publicKeyAlgos()) {public boolean containsPubKeyAlgo(ZrtpConstants.SupportedPubKeys pubkey)
public int addSasTypeAlgo(ZrtpConstants.SupportedSASTypes algo)
algo - The identifier of the SAS type algorithm to add.public int addSasTypeAlgoAt(int index,
ZrtpConstants.SupportedSASTypes algo)
algo - The identifier of the SAS type algorithm to add.index - The index into the configuration datapublic int removeSasTypeAlgo(ZrtpConstants.SupportedSASTypes algo)
algo - The identifier of the SAS type algorithm to remove.public int getNumConfiguredSasTypes()
public ZrtpConstants.SupportedSASTypes getSasTypeAlgoAt(int index)
EndSupportedSASTypes.public Iterable<ZrtpConstants.SupportedSASTypes> sasTypes()
for (ZrtpConstants.SupportedHashes sh: config.sasTypes()) {public boolean containsSasTypeAlgo(ZrtpConstants.SupportedSASTypes sas)
public int addAuthLength(ZrtpConstants.SupportedAuthLengths algo)
algo - The identifier of the SRTP authentication length to add.public int addAuthLengthAt(int index,
ZrtpConstants.SupportedAuthLengths algo)
algo - The identifier of the SRTP authentication length to add.index - The index into the configuration datapublic int removeAuthLength(ZrtpConstants.SupportedAuthLengths algo)
algo - The identifier of the SRTP authentication length to remove.public int getNumConfiguredAuthLengths()
public ZrtpConstants.SupportedAuthLengths getAuthLengthAt(int index)
EndSupportedAuthLength.public Iterable<ZrtpConstants.SupportedAuthLengths> authLengths()
for (ZrtpConstants.SupportedHashes sh: config.authLengths()) {public boolean containsAuthLength(ZrtpConstants.SupportedAuthLengths length)
public <T extends Enum<T>> int addAlgo(T algo)
algo - The identifier of the algorithm to add.public <T extends Enum<T>> int addAlgoAt(int index, T algo)
algo - The identifier of the algorithm to add.index - The index into the configuration datapublic <T extends Enum<T>> int removeAlgo(T algo)
algo - The identifier of the algorithm to remove.public <T extends Enum<T>> int getNumConfiguredAlgos(T algo)
algo - The identifier of the algorithm. Used only to identify
configure data.public <T extends Enum<T>> T getAlgoAt(int index, T algo)
index - The index into the configuration data.algo - The identifier of the algorithm to get. Used only to identify
configure data.public <T extends Enum<T>> Iterable<T> algos(T algo)
for (ZrtpConstants.SupportedHashes sh: config.authLengths()) {algo - The identifier of the algorithm to get.public <T extends Enum<T>> boolean containsAuthLength(T algo)
Copyright © 2020. All rights reserved.