org.ietf.jgss.MessageProp Java Examples

The following examples show how to use org.ietf.jgss.MessageProp. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Context.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
public void verifyMic(byte[] t, final byte[] msg) throws Exception {
    doAs(new Action() {
        @Override
        public byte[] run(Context me, byte[] input) throws Exception {
            MessageProp p1 = new MessageProp(0, true);
            System.out.printf("verifyMic from %s: ", me.name);
            if (usingStream) {
                me.x.verifyMIC(new ByteArrayInputStream(input),
                        new ByteArrayInputStream(msg), p1);
            } else {
                me.x.verifyMIC(input, 0, input.length,
                        msg, 0, msg.length,
                        p1);
            }
            System.out.println(printProp(p1));
            return null;
        }
    }, t);
}
 
Example #2
Source File: Context.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
public byte[] unwrap(byte[] t, final boolean privacy)
        throws Exception {
    return doAs(new Action() {
        @Override
        public byte[] run(Context me, byte[] input) throws Exception {
            System.out.printf("unwrap %s privacy from %s: ", privacy?"with":"without", me.name);
            MessageProp p1 = new MessageProp(0, privacy);
            byte[] bytes;
            if (usingStream) {
                ByteArrayOutputStream os = new ByteArrayOutputStream();
                me.x.unwrap(new ByteArrayInputStream(input), os, p1);
                bytes = os.toByteArray();
            } else {
                bytes = me.x.unwrap(input, 0, input.length, p1);
            }
            System.out.println(printProp(p1));
            return bytes;
        }
    }, t);
}
 
Example #3
Source File: Context.java    From jdk8u-dev-jdk with GNU General Public License v2.0 6 votes vote down vote up
public void verifyMic(byte[] t, final byte[] msg) throws Exception {
    doAs(new Action() {
        @Override
        public byte[] run(Context me, byte[] input) throws Exception {
            MessageProp p1 = new MessageProp(0, true);
            System.out.printf("verifyMic from %s: ", me.name);
            if (usingStream) {
                me.x.verifyMIC(new ByteArrayInputStream(input),
                        new ByteArrayInputStream(msg), p1);
            } else {
                me.x.verifyMIC(input, 0, input.length,
                        msg, 0, msg.length,
                        p1);
            }
            System.out.println(printProp(p1));
            return null;
        }
    }, t);
}
 
Example #4
Source File: Context.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
public void verifyMic(byte[] t, final byte[] msg) throws Exception {
    doAs(new Action() {
        @Override
        public byte[] run(Context me, byte[] input) throws Exception {
            MessageProp p1 = new MessageProp(0, true);
            System.out.printf("verifyMic from %s: ", me.name);
            if (usingStream) {
                me.x.verifyMIC(new ByteArrayInputStream(input),
                        new ByteArrayInputStream(msg), p1);
            } else {
                me.x.verifyMIC(input, 0, input.length,
                        msg, 0, msg.length,
                        p1);
            }
            System.out.println(printProp(p1));
            if (p1.isUnseqToken() || p1.isOldToken()
                    || p1.isDuplicateToken() || p1.isGapToken()) {
                throw new Exception("Wrong sequence number detected");
            }
            return null;
        }
    }, t);
}
 
Example #5
Source File: Context.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
public void verifyMic(byte[] t, final byte[] msg) throws Exception {
    doAs(new Action() {
        @Override
        public byte[] run(Context me, byte[] input) throws Exception {
            MessageProp p1 = new MessageProp(0, true);
            System.out.printf("verifyMic from %s: ", me.name);
            if (usingStream) {
                me.x.verifyMIC(new ByteArrayInputStream(input),
                        new ByteArrayInputStream(msg), p1);
            } else {
                me.x.verifyMIC(input, 0, input.length,
                        msg, 0, msg.length,
                        p1);
            }
            System.out.println(printProp(p1));
            if (p1.isUnseqToken() || p1.isOldToken()
                    || p1.isDuplicateToken() || p1.isGapToken()) {
                throw new Exception("Wrong sequence number detected");
            }
            return null;
        }
    }, t);
}
 
Example #6
Source File: Context.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
public byte[] unwrap(byte[] t, final boolean privacyExpected)
        throws Exception {
    return doAs(new Action() {
        @Override
        public byte[] run(Context me, byte[] input) throws Exception {
            System.out.printf("unwrap from %s", me.name);
            MessageProp p1 = new MessageProp(0, true);
            byte[] bytes;
            if (usingStream) {
                ByteArrayOutputStream os = new ByteArrayOutputStream();
                me.x.unwrap(new ByteArrayInputStream(input), os, p1);
                bytes = os.toByteArray();
            } else {
                bytes = me.x.unwrap(input, 0, input.length, p1);
            }
            System.out.println(printProp(p1));
            if (p1.getPrivacy() != privacyExpected) {
                throw new Exception("Unexpected privacy: " + p1.getPrivacy());
            }
            return bytes;
        }
    }, t);
}
 
Example #7
Source File: Context.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
public byte[] unwrap(byte[] t, final boolean privacy)
        throws Exception {
    return doAs(new Action() {
        @Override
        public byte[] run(Context me, byte[] input) throws Exception {
            System.out.printf("unwrap %s privacy from %s: ", privacy?"with":"without", me.name);
            MessageProp p1 = new MessageProp(0, privacy);
            byte[] bytes;
            if (usingStream) {
                ByteArrayOutputStream os = new ByteArrayOutputStream();
                me.x.unwrap(new ByteArrayInputStream(input), os, p1);
                bytes = os.toByteArray();
            } else {
                bytes = me.x.unwrap(input, 0, input.length, p1);
            }
            System.out.println(printProp(p1));
            return bytes;
        }
    }, t);
}
 
Example #8
Source File: Context.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
public void verifyMic(byte[] t, final byte[] msg) throws Exception {
    doAs(new Action() {
        @Override
        public byte[] run(Context me, byte[] input) throws Exception {
            MessageProp p1 = new MessageProp(0, true);
            System.out.printf("verifyMic from %s: ", me.name);
            if (usingStream) {
                me.x.verifyMIC(new ByteArrayInputStream(input),
                        new ByteArrayInputStream(msg), p1);
            } else {
                me.x.verifyMIC(input, 0, input.length,
                        msg, 0, msg.length,
                        p1);
            }
            System.out.println(printProp(p1));
            return null;
        }
    }, t);
}
 
Example #9
Source File: Context.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
public void verifyMic(byte[] t, final byte[] msg) throws Exception {
    doAs(new Action() {
        @Override
        public byte[] run(Context me, byte[] input) throws Exception {
            MessageProp p1 = new MessageProp(0, true);
            System.out.printf("verifyMic from %s: ", me.name);
            if (usingStream) {
                me.x.verifyMIC(new ByteArrayInputStream(input),
                        new ByteArrayInputStream(msg), p1);
            } else {
                me.x.verifyMIC(input, 0, input.length,
                        msg, 0, msg.length,
                        p1);
            }
            System.out.println(printProp(p1));
            return null;
        }
    }, t);
}
 
Example #10
Source File: Context.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
public void verifyMic(byte[] t, final byte[] msg) throws Exception {
    doAs(new Action() {
        @Override
        public byte[] run(Context me, byte[] input) throws Exception {
            MessageProp p1 = new MessageProp(0, true);
            System.out.printf("verifyMic from %s: ", me.name);
            if (usingStream) {
                me.x.verifyMIC(new ByteArrayInputStream(input),
                        new ByteArrayInputStream(msg), p1);
            } else {
                me.x.verifyMIC(input, 0, input.length,
                        msg, 0, msg.length,
                        p1);
            }
            System.out.println(printProp(p1));
            return null;
        }
    }, t);
}
 
Example #11
Source File: Context.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
public byte[] unwrap(byte[] t, final boolean privacy)
        throws Exception {
    return doAs(new Action() {
        @Override
        public byte[] run(Context me, byte[] input) throws Exception {
            System.out.printf("unwrap %s privacy from %s: ", privacy?"with":"without", me.name);
            MessageProp p1 = new MessageProp(0, privacy);
            byte[] bytes;
            if (usingStream) {
                ByteArrayOutputStream os = new ByteArrayOutputStream();
                me.x.unwrap(new ByteArrayInputStream(input), os, p1);
                bytes = os.toByteArray();
            } else {
                bytes = me.x.unwrap(input, 0, input.length, p1);
            }
            System.out.println(printProp(p1));
            return bytes;
        }
    }, t);
}
 
Example #12
Source File: Context.java    From jdk8u-dev-jdk with GNU General Public License v2.0 6 votes vote down vote up
public byte[] unwrap(byte[] t, final boolean privacy)
        throws Exception {
    return doAs(new Action() {
        @Override
        public byte[] run(Context me, byte[] input) throws Exception {
            System.out.printf("unwrap %s privacy from %s: ", privacy?"with":"without", me.name);
            MessageProp p1 = new MessageProp(0, privacy);
            byte[] bytes;
            if (usingStream) {
                ByteArrayOutputStream os = new ByteArrayOutputStream();
                me.x.unwrap(new ByteArrayInputStream(input), os, p1);
                bytes = os.toByteArray();
            } else {
                bytes = me.x.unwrap(input, 0, input.length, p1);
            }
            System.out.println(printProp(p1));
            return bytes;
        }
    }, t);
}
 
Example #13
Source File: Context.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
public byte[] unwrap(byte[] t, final boolean privacy)
        throws Exception {
    return doAs(new Action() {
        @Override
        public byte[] run(Context me, byte[] input) throws Exception {
            System.out.printf("unwrap %s privacy from %s: ", privacy?"with":"without", me.name);
            MessageProp p1 = new MessageProp(0, privacy);
            byte[] bytes;
            if (usingStream) {
                ByteArrayOutputStream os = new ByteArrayOutputStream();
                me.x.unwrap(new ByteArrayInputStream(input), os, p1);
                bytes = os.toByteArray();
            } else {
                bytes = me.x.unwrap(input, 0, input.length, p1);
            }
            System.out.println(printProp(p1));
            return bytes;
        }
    }, t);
}
 
Example #14
Source File: Context.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
public void verifyMic(byte[] t, final byte[] msg) throws Exception {
    doAs(new Action() {
        @Override
        public byte[] run(Context me, byte[] input) throws Exception {
            MessageProp p1 = new MessageProp(0, true);
            System.out.printf("verifyMic from %s: ", me.name);
            if (usingStream) {
                me.x.verifyMIC(new ByteArrayInputStream(input),
                        new ByteArrayInputStream(msg), p1);
            } else {
                me.x.verifyMIC(input, 0, input.length,
                        msg, 0, msg.length,
                        p1);
            }
            System.out.println(printProp(p1));
            return null;
        }
    }, t);
}
 
Example #15
Source File: Context.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
public void verifyMic(byte[] t, final byte[] msg) throws Exception {
    doAs(new Action() {
        @Override
        public byte[] run(Context me, byte[] input) throws Exception {
            MessageProp p1 = new MessageProp(0, true);
            System.out.printf("verifyMic from %s: ", me.name);
            if (usingStream) {
                me.x.verifyMIC(new ByteArrayInputStream(input),
                        new ByteArrayInputStream(msg), p1);
            } else {
                me.x.verifyMIC(input, 0, input.length,
                        msg, 0, msg.length,
                        p1);
            }
            System.out.println(printProp(p1));
            return null;
        }
    }, t);
}
 
Example #16
Source File: Context.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
public byte[] unwrap(byte[] t, final boolean privacy)
        throws Exception {
    return doAs(new Action() {
        @Override
        public byte[] run(Context me, byte[] input) throws Exception {
            System.out.printf("unwrap %s privacy from %s: ", privacy?"with":"without", me.name);
            MessageProp p1 = new MessageProp(0, privacy);
            byte[] bytes;
            if (usingStream) {
                ByteArrayOutputStream os = new ByteArrayOutputStream();
                me.x.unwrap(new ByteArrayInputStream(input), os, p1);
                bytes = os.toByteArray();
            } else {
                bytes = me.x.unwrap(input, 0, input.length, p1);
            }
            System.out.println(printProp(p1));
            return bytes;
        }
    }, t);
}
 
Example #17
Source File: Context.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
public void verifyMic(byte[] t, final byte[] msg) throws Exception {
    doAs(new Action() {
        @Override
        public byte[] run(Context me, byte[] input) throws Exception {
            MessageProp p1 = new MessageProp(0, true);
            System.out.printf("verifyMic from %s: ", me.name);
            if (usingStream) {
                me.x.verifyMIC(new ByteArrayInputStream(input),
                        new ByteArrayInputStream(msg), p1);
            } else {
                me.x.verifyMIC(input, 0, input.length,
                        msg, 0, msg.length,
                        p1);
            }
            System.out.println(printProp(p1));
            return null;
        }
    }, t);
}
 
Example #18
Source File: Context.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
public byte[] unwrap(byte[] t, final boolean privacy)
        throws Exception {
    return doAs(new Action() {
        @Override
        public byte[] run(Context me, byte[] input) throws Exception {
            System.out.printf("unwrap %s privacy from %s: ", privacy?"with":"without", me.name);
            MessageProp p1 = new MessageProp(0, privacy);
            byte[] bytes;
            if (usingStream) {
                ByteArrayOutputStream os = new ByteArrayOutputStream();
                me.x.unwrap(new ByteArrayInputStream(input), os, p1);
                bytes = os.toByteArray();
            } else {
                bytes = me.x.unwrap(input, 0, input.length, p1);
            }
            System.out.println(printProp(p1));
            return bytes;
        }
    }, t);
}
 
Example #19
Source File: Context.java    From jdk8u_jdk with GNU General Public License v2.0 6 votes vote down vote up
public void verifyMic(byte[] t, final byte[] msg) throws Exception {
    doAs(new Action() {
        @Override
        public byte[] run(Context me, byte[] input) throws Exception {
            MessageProp p1 = new MessageProp(0, true);
            System.out.printf("verifyMic from %s: ", me.name);
            if (usingStream) {
                me.x.verifyMIC(new ByteArrayInputStream(input),
                        new ByteArrayInputStream(msg), p1);
            } else {
                me.x.verifyMIC(input, 0, input.length,
                        msg, 0, msg.length,
                        p1);
            }
            System.out.println(printProp(p1));
            if (p1.isUnseqToken() || p1.isOldToken()
                    || p1.isDuplicateToken() || p1.isGapToken()) {
                throw new Exception("Wrong sequence number detected");
            }
            return null;
        }
    }, t);
}
 
Example #20
Source File: Context.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
public byte[] unwrap(byte[] t, final boolean privacyExpected)
        throws Exception {
    return doAs(new Action() {
        @Override
        public byte[] run(Context me, byte[] input) throws Exception {
            System.out.printf("unwrap from %s", me.name);
            MessageProp p1 = new MessageProp(0, true);
            byte[] bytes;
            if (usingStream) {
                ByteArrayOutputStream os = new ByteArrayOutputStream();
                me.x.unwrap(new ByteArrayInputStream(input), os, p1);
                bytes = os.toByteArray();
            } else {
                bytes = me.x.unwrap(input, 0, input.length, p1);
            }
            System.out.println(printProp(p1));
            if (p1.getPrivacy() != privacyExpected) {
                throw new Exception("Unexpected privacy: " + p1.getPrivacy());
            }
            return bytes;
        }
    }, t);
}
 
Example #21
Source File: Context.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
public void verifyMic(byte[] t, final byte[] msg) throws Exception {
    doAs(new Action() {
        @Override
        public byte[] run(Context me, byte[] input) throws Exception {
            MessageProp p1 = new MessageProp(0, true);
            System.out.printf("verifyMic from %s: ", me.name);
            if (usingStream) {
                me.x.verifyMIC(new ByteArrayInputStream(input),
                        new ByteArrayInputStream(msg), p1);
            } else {
                me.x.verifyMIC(input, 0, input.length,
                        msg, 0, msg.length,
                        p1);
            }
            System.out.println(printProp(p1));
            return null;
        }
    }, t);
}
 
Example #22
Source File: Context.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
public void verifyMic(byte[] t, final byte[] msg) throws Exception {
    doAs(new Action() {
        @Override
        public byte[] run(Context me, byte[] input) throws Exception {
            MessageProp p1 = new MessageProp(0, true);
            System.out.printf("verifyMic from %s: ", me.name);
            if (usingStream) {
                me.x.verifyMIC(new ByteArrayInputStream(input),
                        new ByteArrayInputStream(msg), p1);
            } else {
                me.x.verifyMIC(input, 0, input.length,
                        msg, 0, msg.length,
                        p1);
            }
            System.out.println(printProp(p1));
            if (p1.isUnseqToken() || p1.isOldToken()
                    || p1.isDuplicateToken() || p1.isGapToken()) {
                throw new Exception("Wrong sequence number detected");
            }
            return null;
        }
    }, t);
}
 
Example #23
Source File: Context.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns a string description of a MessageProp object
 * @param prop the object
 * @return the description
 */
static public String printProp(MessageProp prop) {
    StringBuffer sb = new StringBuffer();
    sb.append("MessagePop: ");
    sb.append("QOP="+ prop.getQOP() + ", ");
    sb.append(prop.getPrivacy()?"privacy, ":"");
    sb.append(prop.isDuplicateToken()?"dup, ":"");
    sb.append(prop.isGapToken()?"gap, ":"");
    sb.append(prop.isOldToken()?"old, ":"");
    sb.append(prop.isUnseqToken()?"unseq, ":"");
    if (prop.getMinorStatus() != 0) {
        sb.append(prop.getMinorString()+ "(" + prop.getMinorStatus()+")");
    }
    return sb.toString();
}
 
Example #24
Source File: Context.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns a string description of a MessageProp object
 * @param prop the object
 * @return the description
 */
static public String printProp(MessageProp prop) {
    StringBuffer sb = new StringBuffer();
    sb.append("MessagePop: ");
    sb.append("QOP="+ prop.getQOP() + ", ");
    sb.append(prop.getPrivacy()?"privacy, ":"");
    sb.append(prop.isDuplicateToken()?"dup, ":"");
    sb.append(prop.isGapToken()?"gap, ":"");
    sb.append(prop.isOldToken()?"old, ":"");
    sb.append(prop.isUnseqToken()?"unseq, ":"");
    if (prop.getMinorStatus() != 0) {
        sb.append(prop.getMinorString()+ "(" + prop.getMinorStatus()+")");
    }
    return sb.toString();
}
 
Example #25
Source File: Context.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns a string description of a MessageProp object
 * @param prop the object
 * @return the description
 */
static public String printProp(MessageProp prop) {
    StringBuffer sb = new StringBuffer();
    sb.append("MessagePop: ");
    sb.append("QOP="+ prop.getQOP() + ", ");
    sb.append(prop.getPrivacy()?"privacy, ":"");
    sb.append(prop.isDuplicateToken()?"dup, ":"");
    sb.append(prop.isGapToken()?"gap, ":"");
    sb.append(prop.isOldToken()?"old, ":"");
    sb.append(prop.isUnseqToken()?"unseq, ":"");
    if (prop.getMinorStatus() != 0) {
        sb.append(prop.getMinorString()+ "(" + prop.getMinorStatus()+")");
    }
    return sb.toString();
}
 
Example #26
Source File: Context.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns a string description of a MessageProp object
 * @param prop the object
 * @return the description
 */
static public String printProp(MessageProp prop) {
    StringBuffer sb = new StringBuffer();
    sb.append("MessagePop: ");
    sb.append("QOP="+ prop.getQOP() + ", ");
    sb.append(prop.getPrivacy()?"privacy, ":"");
    sb.append(prop.isDuplicateToken()?"dup, ":"");
    sb.append(prop.isGapToken()?"gap, ":"");
    sb.append(prop.isOldToken()?"old, ":"");
    sb.append(prop.isUnseqToken()?"unseq, ":"");
    if (prop.getMinorStatus() != 0) {
        sb.append(prop.getMinorString()+ "(" + prop.getMinorStatus()+")");
    }
    return sb.toString();
}
 
Example #27
Source File: Context.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns a string description of a MessageProp object
 * @param prop the object
 * @return the description
 */
static public String printProp(MessageProp prop) {
    StringBuffer sb = new StringBuffer();
    sb.append("MessagePop: ");
    sb.append("QOP="+ prop.getQOP() + ", ");
    sb.append(prop.getPrivacy()?"privacy, ":"");
    sb.append(prop.isDuplicateToken()?"dup, ":"");
    sb.append(prop.isGapToken()?"gap, ":"");
    sb.append(prop.isOldToken()?"old, ":"");
    sb.append(prop.isUnseqToken()?"unseq, ":"");
    if (prop.getMinorStatus() != 0) {
        sb.append(prop.getMinorString()+ "(" + prop.getMinorStatus()+")");
    }
    return sb.toString();
}
 
Example #28
Source File: Context.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns a string description of a MessageProp object
 * @param prop the object
 * @return the description
 */
static public String printProp(MessageProp prop) {
    StringBuffer sb = new StringBuffer();
    sb.append("MessagePop: ");
    sb.append("QOP="+ prop.getQOP() + ", ");
    sb.append(prop.getPrivacy()?"privacy, ":"");
    sb.append(prop.isDuplicateToken()?"dup, ":"");
    sb.append(prop.isGapToken()?"gap, ":"");
    sb.append(prop.isOldToken()?"old, ":"");
    sb.append(prop.isUnseqToken()?"unseq, ":"");
    if (prop.getMinorStatus() != 0) {
        sb.append(prop.getMinorString()+ "(" + prop.getMinorStatus()+")");
    }
    return sb.toString();
}
 
Example #29
Source File: Kerb5Context.java    From jcifs-ng with GNU Lesser General Public License v2.1 5 votes vote down vote up
/**
 * {@inheritDoc}
 * 
 * @throws CIFSException
 *
 * @see jcifs.smb.SSPContext#calculateMIC(byte[])
 */
@Override
public byte[] calculateMIC ( byte[] data ) throws CIFSException {
    try {
        return this.gssContext.getMIC(data, 0, data.length, new MessageProp(false));
    }
    catch ( GSSException e ) {
        throw new CIFSException("Failed to calculate MIC", e);
    }
}
 
Example #30
Source File: Context.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Returns a string description of a MessageProp object
 * @param prop the object
 * @return the description
 */
static public String printProp(MessageProp prop) {
    StringBuffer sb = new StringBuffer();
    sb.append("MessagePop: ");
    sb.append("QOP="+ prop.getQOP() + ", ");
    sb.append(prop.getPrivacy()?"privacy, ":"");
    sb.append(prop.isDuplicateToken()?"dup, ":"");
    sb.append(prop.isGapToken()?"gap, ":"");
    sb.append(prop.isOldToken()?"old, ":"");
    sb.append(prop.isUnseqToken()?"unseq, ":"");
    if (prop.getMinorStatus() != 0) {
        sb.append(prop.getMinorString()+ "(" + prop.getMinorStatus()+")");
    }
    return sb.toString();
}