/** * Initialises it with the parameters contained by the cryptoAttribute. * * @param cryptoAttribute The cryptoAttribute containing the crypto-suite, key-params, * session-params and key information. */ private void initialize(SrtpCryptoAttribute cryptoAttribute) { // Encode the tag element. this.setTag(Integer.toString(cryptoAttribute.getTag())); // Encode the crypto-suite element. this.setCryptoSuite(cryptoAttribute.getCryptoSuite().encode()); // Encode the key-params element. this.setKeyParams(cryptoAttribute.getKeyParamsString()); // Encode the session-params element (optional). String sessionParamsString = cryptoAttribute.getSessionParamsString(); if (sessionParamsString != null) { this.setSessionParams(sessionParamsString); } }