diff options
author | Lyubomir Marinov <lyubomir.marinov@jitsi.org> | 2010-06-16 07:16:32 +0000 |
---|---|---|
committer | Lyubomir Marinov <lyubomir.marinov@jitsi.org> | 2010-06-16 07:16:32 +0000 |
commit | 1324d1e72d63823717c279acebdca45cdeeaf733 (patch) | |
tree | b2015abecc858eea61db384bcedf66d087c33e57 /src/net/java/sip/communicator/impl/neomedia/GatherEntropy.java | |
parent | 5f3646989c06873c0abfa31bad13b0f3c593e163 (diff) | |
download | jitsi-1324d1e72d63823717c279acebdca45cdeeaf733.zip jitsi-1324d1e72d63823717c279acebdca45cdeeaf733.tar.gz jitsi-1324d1e72d63823717c279acebdca45cdeeaf733.tar.bz2 |
Adds Javadocs.
Diffstat (limited to 'src/net/java/sip/communicator/impl/neomedia/GatherEntropy.java')
-rw-r--r-- | src/net/java/sip/communicator/impl/neomedia/GatherEntropy.java | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/net/java/sip/communicator/impl/neomedia/GatherEntropy.java b/src/net/java/sip/communicator/impl/neomedia/GatherEntropy.java index 8ffa22b..e186983 100644 --- a/src/net/java/sip/communicator/impl/neomedia/GatherEntropy.java +++ b/src/net/java/sip/communicator/impl/neomedia/GatherEntropy.java @@ -29,6 +29,7 @@ import net.java.sip.communicator.impl.neomedia.portaudio.*; * TODO: add JMF method to read audio (mic) data, check if we can use video? * * @author Werner Dittmann <Werner.Dittmann@t-online.de> + * @author Lubomir Marinov */ public class GatherEntropy { @@ -106,8 +107,15 @@ public class GatherEntropy private class GatherPortAudio extends Thread { + /** + * The PortAudio <tt>DataSource</tt> which provides + * {@link #portAudioStream}. + */ private DataSource dataSource = null; + /** + * The <tt>PortAudioStream</tt> from which audio data is captured. + */ private PortAudioStream portAudioStream = null; /** @@ -161,8 +169,8 @@ public class GatherEntropy * * The method gathers a number of samples and seeds the Fortuna PRNG. */ - public void run() { - + public void run() + { ZrtpFortuna fortuna = ZrtpFortuna.getInstance(); Buffer firstBuf = new Buffer(); @@ -182,12 +190,11 @@ public class GatherEntropy // others on the first pools. This method is adapted to // SC requirements to get random data if (i < 32) - { fortuna.addSeedMaterial(entropy); - } - else + else { - fortuna.addSeedMaterial((i%3), entropy, 0, entropy.length); + fortuna + .addSeedMaterial((i%3), entropy, 0, entropy.length); } } entropyOk = true; |