public void decodeSecurityParameters(BerDecoder raw_packet,
                                            SnmpMessage msg)
                                            throws BerException {
        if (debug) dump("Decode Security Parameters");
        /**
         * Setup.
         */
        SecParametersUsm usmParm = new SecParametersUsm();
        msg.secInfo = usmParm;
        /**
         * parsing security model header data.
         */
        int length = raw_packet.decodeSequenceHeader();
        if (debug) dump("      length:" + length);
        usmParm.engineId = raw_packet.decodeSnmpOctetStr();
        if (debug) dump("    engineId: " +
                        TypeConversions.bytes2HexString(usmParm.engineId));
        usmParm.eBoots = raw_packet.decodeSnmpInteger();
        if (debug) dump("engine boots: " + usmParm.eBoots);
        usmParm.eTime = raw_packet.decodeSnmpInteger();
        if (debug) dump(" engine time: " + usmParm.eTime);
        usmParm.username = raw_packet.decodeSnmpOctetStr();
        if (debug) dump("   user name: " + usmParm.getName());
        /* The security parameters. */
        usmParm.authValue = raw_packet.decodeSnmpOctetStr();
        if (debug) dump(" auth parms.: " +
                        TypeConversions.bytes2HexString(usmParm.authValue));
        usmParm.privValue = raw_packet.decodeSnmpOctetStr();
        if (debug) dump(" priv parms.: " +
                        TypeConversions.bytes2HexString(usmParm.privValue));
        if (debug) dump("Decode Security Parameters done");
    }