예제 #1
0
 /**
  * Close the transformer engine.
  *
  * The close functions closes all stored default crypto contexts. This
  * deletes key data and forces a cleanup of the crypto contexts.
  */
 public void Close()
 {
     if (defaultContext != null)
     {
         defaultContext.Close();
         defaultContext = null;
     }
     if (defaultContextControl != null)
     {
         defaultContextControl.Close();
         defaultContextControl = null;
     }
 }
예제 #2
0
 /**
  * Construct a SRTPTransformEngine based on given master encryption key,
  * master salt key and SRTP/SRTCP policy.
  *
  * @param masterKey
  *            the master encryption key
  * @param masterSalt
  *            the master salt key
  * @param srtpPolicy
  *            SRTP policy
  * @param srtcpPolicy
  *            SRTCP policy
  */
 public SrtpTransformEngine(byte[] masterKey, byte[] masterSalt, SrtpPolicy srtpPolicy, SrtpPolicy srtcpPolicy)
 {
     defaultContext        = new SrtpCryptoContext(0, 0, 0, masterKey, masterSalt, srtpPolicy);
     defaultContextControl = new SrtcpCryptoContext(0, masterKey, masterSalt, srtcpPolicy);
 }