Rev

Rev 1822 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | Bug Tracker

Rev 1822 Rev 2655
Line 2... Line 2...
2
 * @author      ETSI / STF481 / Yann Garcia
2
 * @author      ETSI / STF481 / Yann Garcia
3
 * @version     $URL: file:///D:/RepositoriesNew/ITS/trunk/javasrc/codec/org/etsi/ttcn/codec/its/security/EncryptionParametersContainer.java $
3
 * @version     $URL: file:///D:/RepositoriesNew/ITS/trunk/javasrc/codec/org/etsi/ttcn/codec/its/security/EncryptionParametersContainer.java $
4
 *              $Id: EncryptionParametersContainer.java 1665 2014-10-03 08:27:31Z garciay $
4
 *              $Id: EncryptionParametersContainer.java 2655 2017-01-26 10:46:08Z filatov $
5
 */
5
 */
6
package org.etsi.ttcn.codec.its.security;
6
package org.etsi.ttcn.codec.its.security;
7
7
8
import org.etsi.ttcn.codec.CodecBuffer;
8
import org.etsi.ttcn.codec.CodecBuffer;
9
import org.etsi.ttcn.codec.MainCodec;
9
import org.etsi.ttcn.codec.MainCodec;
Line 22... Line 22...
22
        mainCodec.setHint("Oct12Len", "12");
22
        mainCodec.setHint("Oct12Len", "12");
23
    }
23
    }
24
   
24
   
25
    @Override
25
    @Override
26
    protected void preEncode(CodecBuffer buf, UnionValue uv) {
26
    protected void preEncode(CodecBuffer buf, UnionValue uv) {
27
//        System.out.println(">>> EncryptionParametersContainer.preEncode: " + uv.getType().getName() + ", " + uv.getPresentVariantName());
27
//        TERFactory.getInstance().logDebug(">>> EncryptionParametersContainer.preEncode: " + uv.getType().getName() + ", " + uv.getPresentVariantName());
28
       
28
       
29
        if (uv.getPresentVariantName().equals("params")) {
29
        if (uv.getPresentVariantName().equals("params")) {
30
            buf.appendBytes(new byte[] { (byte)((OctetstringValue)(uv.getVariant(uv.getPresentVariantName()))).getLength() } );
30
            buf.appendBytes(new byte[] { (byte)((OctetstringValue)(uv.getVariant(uv.getPresentVariantName()))).getLength() } );
31
        }
31
        }
32
    }
32
    }