public class SRTPTransformer extends SinglePacketTransformer
Modifier and Type | Field and Description |
---|---|
(package private) SRTPContextFactory |
forwardFactory |
(package private) SRTPContextFactory |
reverseFactory |
Constructor and Description |
---|
SRTPTransformer(SRTPContextFactory factory)
Initializes a new SRTPTransformer instance.
|
SRTPTransformer(SRTPContextFactory forwardFactory,
SRTPContextFactory reverseFactory)
Constructs a SRTPTransformer object.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes this SRTPTransformer and the underlying transform
engines.It closes all stored crypto contexts.
|
RawPacket |
reverseTransform(RawPacket pkt)
Reverse-transforms a specific packet (i.e.
|
void |
setContextFactory(SRTPContextFactory factory,
boolean forward)
Sets a new key factory when key material has changed.
|
RawPacket |
transform(RawPacket pkt)
Transforms a specific packet.
|
reverseTransform, transform
SRTPContextFactory forwardFactory
SRTPContextFactory reverseFactory
public SRTPTransformer(SRTPContextFactory factory)
factory
- the context factory to be used by the new
instance for both directions.public SRTPTransformer(SRTPContextFactory forwardFactory, SRTPContextFactory reverseFactory)
forwardFactory
- The associated context factory for forward
transformations.reverseFactory
- The associated context factory for reverse
transformations.public void setContextFactory(SRTPContextFactory factory, boolean forward)
factory
- The associated context factory for transformations.forward
- true if the supplied factory is for forward
transformations, false for the reverse transformation
factory.public void close()
close
in interface PacketTransformer
close
in class SinglePacketTransformer
public RawPacket reverseTransform(RawPacket pkt)
reverseTransform
in class SinglePacketTransformer
pkt
- the transformed packet to be restoredpublic RawPacket transform(RawPacket pkt)
transform
in class SinglePacketTransformer
pkt
- the packet to be transformed
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.