Java 类org.ietf.jgss.MessageProp 实例源码

项目:jdk8u-jdk    文件:Context.java   
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);
}
项目:jdk8u-jdk    文件:Context.java   
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);
}
项目:openjdk-jdk10    文件:Context.java   
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);
}
项目:openjdk-jdk10    文件:Context.java   
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);
}
项目:openjdk9    文件:Context.java   
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);
}
项目:openjdk9    文件:Context.java   
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);
}
项目:jdk8u_jdk    文件:Context.java   
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);
}
项目:jdk8u_jdk    文件:Context.java   
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);
}
项目:lookaside_java-1.8.0-openjdk    文件:Context.java   
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);
}
项目:lookaside_java-1.8.0-openjdk    文件:Context.java   
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);
}
项目:infobip-open-jdk-8    文件:Context.java   
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);
}
项目:infobip-open-jdk-8    文件:Context.java   
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);
}
项目:jdk8u-dev-jdk    文件:Context.java   
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);
}
项目:jdk8u-dev-jdk    文件:Context.java   
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);
}
项目:OLD-OpenJDK8    文件:Context.java   
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);
}
项目:OLD-OpenJDK8    文件:Context.java   
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);
}
项目:openjdk-jdk7u-jdk    文件:Context.java   
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);
}
项目:openjdk-jdk7u-jdk    文件:Context.java   
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);
}
项目:openjdk-icedtea7    文件:Context.java   
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);
}
项目:openjdk-icedtea7    文件:Context.java   
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);
}
项目:parabuild-ci    文件:GSSContextKrb5.java   
public byte[] getMIC(byte[] message, int s, int l){
  try{
    MessageProp prop =  new MessageProp(0, true);
    return context.getMIC(message, s, l, prop);
  }
  catch(GSSException ex){
    return null;
  }
}
项目:jdk8u-jdk    文件:Context.java   
/**
 * 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();
}
项目:openjdk-jdk10    文件:Context.java   
/**
 * 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();
}
项目:openjdk9    文件:Context.java   
/**
 * 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();
}
项目:jdk8u_jdk    文件:Context.java   
/**
 * 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();
}
项目:lookaside_java-1.8.0-openjdk    文件:Context.java   
/**
 * 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();
}
项目:jcifs-ng    文件:Kerb5Context.java   
/**
 * {@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);
    }
}
项目:jcifs-ng    文件:Kerb5Context.java   
/**
 * {@inheritDoc}
 *
 * @see jcifs.smb.SSPContext#verifyMIC(byte[], byte[])
 */
@Override
public void verifyMIC ( byte[] data, byte[] mic ) throws CIFSException {
    try {
        this.gssContext.verifyMIC(mic, 0, mic.length, data, 0, data.length, new MessageProp(false));
    }
    catch ( GSSException e ) {
        throw new CIFSException("Failed to verify MIC", e);
    }
}
项目:java-aci-api-ng    文件:GssEncryptionCodec.java   
@Override
protected byte[] encryptInternal(final byte[] bytes) throws EncryptionCodecException {
    LOGGER.trace("encryptInternal() called...");

    try {
        LOGGER.debug("Encrypting content with context.wrap()...");
        return context.wrap(bytes, 0, bytes.length, new MessageProp(0, true));
    } catch (final GSSException gsse) {
        throw new EncryptionCodecException("Unable to encrypt the outgoing ACI data.", gsse);
    }
}
项目:java-aci-api-ng    文件:GssEncryptionCodec.java   
@Override
protected byte[] decryptInternal(final byte[] bytes) throws EncryptionCodecException {
    LOGGER.trace("decryptInternal() called...");

    try {
        LOGGER.debug("Decrypting content with context.unwrap()...");
        return context.unwrap(bytes, 0, bytes.length, new MessageProp(0, true));
    } catch (final GSSException gsse) {
        throw new EncryptionCodecException("Unable to decrypt the incoming ACI data.", gsse);
    }
}
项目:java-aci-api-ng    文件:GssEncryptionCodecTest.java   
@Test
public void testEncryptInternal() throws GSSException, EncryptionCodecException {
    final GSSContext gssContext = when(spy(GSSContext.class).wrap((byte[]) any(), anyInt(), anyInt(), any(MessageProp.class))).thenReturn("This is a test result...".getBytes()).getMock();
    final GssEncryptionCodec codec = new GssEncryptionCodec(gssContext);

    final byte[] result = codec.encryptInternal("This is a test...".getBytes());
    assertThat(new String(result), is(equalTo("This is a test result...")));

    verify(gssContext).wrap((byte[]) any(), anyInt(), anyInt(), any(MessageProp.class));
    verifyNoMoreInteractions(gssContext);
}
项目:java-aci-api-ng    文件:GssEncryptionCodecTest.java   
@Test(expected = EncryptionCodecException.class)
@SuppressWarnings("unchecked")
public void testEncryptInternalException() throws GSSException, EncryptionCodecException {
    final GssEncryptionCodec codec = new GssEncryptionCodec(
            when(spy(GSSContext.class).wrap((byte[]) any(), anyInt(), anyInt(), any(MessageProp.class))).thenThrow(GSSException.class).<GSSContext>getMock()
    );

    codec.encryptInternal("This is a test...".getBytes());
    fail("Should've thrown a GSSException...");
}
项目:java-aci-api-ng    文件:GssEncryptionCodecTest.java   
@Test
public void testDecryptInternal() throws GSSException, EncryptionCodecException {
    final GSSContext gssContext = when(spy(GSSContext.class).unwrap((byte[]) any(), anyInt(), anyInt(), any(MessageProp.class))).thenReturn("This is a test...".getBytes()).getMock();
    final GssEncryptionCodec codec = new GssEncryptionCodec(gssContext);

    final byte[] result = codec.decryptInternal("This is a test result...".getBytes());
    assertThat(new String(result), is(equalTo("This is a test...")));

    verify(gssContext).unwrap((byte[]) any(), anyInt(), anyInt(), any(MessageProp.class));
    verifyNoMoreInteractions(gssContext);
}
项目:java-aci-api-ng    文件:GssEncryptionCodecTest.java   
@Test(expected = EncryptionCodecException.class)
@SuppressWarnings("unchecked")
public void testDecryptInternalException() throws GSSException, EncryptionCodecException {
    final GssEncryptionCodec codec = new GssEncryptionCodec(
            when(spy(GSSContext.class).unwrap((byte[]) any(), anyInt(), anyInt(), any(MessageProp.class))).thenThrow(GSSException.class).<GSSContext>getMock()
    );

    codec.decryptInternal("This is a test result...".getBytes());
    fail("Should've thrown a GSSException...");
}
项目:infobip-open-jdk-8    文件:Context.java   
/**
 * 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();
}
项目:jdk8u-dev-jdk    文件:Context.java   
/**
 * 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();
}
项目:jdk7-jdk    文件:Context.java   
/**
 * 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();
}
项目:tigervnc    文件:GSSContextKrb5.java   
public byte[] getMIC(byte[] message, int s, int l){
  try{
    MessageProp prop =  new MessageProp(0, true);
    return context.getMIC(message, s, l, prop);
  }
  catch(GSSException ex){
    return null;
  }
}
项目:openjdk-source-code-learn    文件:Context.java   
/**
 * 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();
}
项目:OLD-OpenJDK8    文件:Context.java   
/**
 * 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();
}