/** * <p> * Parses the specified {@code EntropyType} and returns the first binary secret contained in the entropy. * </p> * * @param entropy a reference to the {@code EntropyType} that contains the binary secret. * @return a {@code byte[]} containing the secret; {@code null} if the specified entropy doesn't contain any secret. */ public static byte[] getBinarySecret(EntropyType entropy) { byte[] secret = null; for (Object obj : entropy.getAny()) { if (obj instanceof BinarySecretType) { BinarySecretType binarySecret = (BinarySecretType) obj; secret = binarySecret.getValue(); break; } } return secret; }
/** * <p> * Parses the specified {@code EntropyType} and returns the first binary secret contained in the entropy. * </p> * * @param entropy a reference to the {@code EntropyType} that contains the binary secret. * * @return a {@code byte[]} containing the secret; {@code null} if the specified entropy doesn't contain any * secret. */ public static byte[] getBinarySecret(EntropyType entropy) { byte[] secret = null; for (Object obj : entropy.getAny()) { if (obj instanceof BinarySecretType) { BinarySecretType binarySecret = (BinarySecretType) obj; secret = binarySecret.getValue(); break; } } return secret; }
/** * <p> * Parses the specified {@code EntropyType} and returns the first binary secret contained in the entropy. * </p> * * @param entropy a reference to the {@code EntropyType} that contains the binary secret. * * @return a {@code byte[]} containing the secret; {@code null} if the specified entropy doesn't contain any * secret. */ public static byte[] getBinarySecret(EntropyType entropy) { byte[] secret = null; for (Object obj : entropy.getAny()) { if (obj instanceof BinarySecretType) { BinarySecretType binarySecret = (BinarySecretType) obj; secret = binarySecret.getValue(); break; } } return secret; }
/** * <p> * Parses the specified {@code EntropyType} and returns the first binary secret contained in the entropy. * </p> * * @param entropy a reference to the {@code EntropyType} that contains the binary secret. * @return a {@code byte[]} containing the secret; {@code null} if the specified entropy doesn't contain * any secret. */ public static byte[] getBinarySecret(EntropyType entropy) { byte[] secret = null; for (Object obj : entropy.getAny()) { if (obj instanceof BinarySecretType) { BinarySecretType binarySecret = (BinarySecretType) obj; secret = binarySecret.getValue(); break; } } return secret; }
/** * <p> * Parses the specified {@code EntropyType} and returns the first binary secret contained in the entropy. * </p> * * @param entropy a reference to the {@code EntropyType} that contains the binary secret. * @return a {@code byte[]} containing the secret; {@code null} if the specified entropy doesn't contain * any secret. */ public static byte[] getBinarySecret(EntropyType entropy) { byte[] secret = null; for (Object obj : entropy.getAny()) { if (obj instanceof BinarySecretType) { BinarySecretType binarySecret = (BinarySecretType) obj; secret = binarySecret.getValue(); break; } } return secret; }
/** * Write a {@code BinarySecretType} to stream * @param writer * @param binarySecret * @throws ProcessingException */ private void writeBinarySecretType(XMLStreamWriter writer, BinarySecretType binarySecret) throws ProcessingException { StaxUtil.writeStartElement(writer, PREFIX, WSTrustConstants.BINARY_SECRET, BASE_NAMESPACE); String type = binarySecret.getType(); StaxUtil.writeAttribute(writer, WSTrustConstants.TYPE, type); StaxUtil.writeCharacters(writer, new String(binarySecret.getValue())); StaxUtil.writeEndElement(writer); }
/** * Write a {@code BinarySecretType} to stream * @param writer * @param binarySecret * @throws ProcessingException */ private void writeBinarySecretType(XMLStreamWriter writer, BinarySecretType binarySecret) throws ProcessingException { StaxUtil.writeStartElement(writer, PREFIX, WSTrustConstants.BINARY_SECRET, BASE_NAMESPACE); String type = binarySecret.getType(); StaxUtil.writeAttribute(writer, WSTrustConstants.TYPE, type); StaxUtil.writeCharacters(writer, new String(binarySecret.getValue())); StaxUtil.writeEndElement(writer); }
/** * Write a {@code BinarySecretType} to stream * * @param writer * @param binarySecret * * @throws ProcessingException */ private void writeBinarySecretType(XMLStreamWriter writer, BinarySecretType binarySecret) throws ProcessingException { StaxUtil.writeStartElement(writer, PREFIX, WSTrustConstants.BINARY_SECRET, BASE_NAMESPACE); String type = binarySecret.getType(); StaxUtil.writeAttribute(writer, WSTrustConstants.TYPE, type); StaxUtil.writeCharacters(writer, new String(binarySecret.getValue())); StaxUtil.writeEndElement(writer); }
/** * Write a {@code BinarySecretType} to stream * @param writer * @param binarySecret * @throws ProcessingException */ private void writeBinarySecretType(XMLStreamWriter writer, BinarySecretType binarySecret) throws ProcessingException { StaxUtil.writeStartElement(writer, PREFIX, WSTrustConstants.BINARY_SECRET, BASE_NAMESPACE); String type = binarySecret.getType(); StaxUtil.writeAttribute(writer, WSTrustConstants.TYPE, type); StaxUtil.writeCharacters(writer, new String(binarySecret.getValue())); StaxUtil.writeEndElement(writer); }
/** * Write a {@code BinarySecretType} to stream * @param writer * @param binarySecret * @throws ProcessingException */ private void writeBinarySecretType(XMLStreamWriter writer, BinarySecretType binarySecret) throws ProcessingException { StaxUtil.writeStartElement(writer, PREFIX, WSTrustConstants.BINARY_SECRET, BASE_NAMESPACE); String type = binarySecret.getType(); StaxUtil.writeAttribute(writer, WSTrustConstants.TYPE, type); StaxUtil.writeCharacters(writer, new String(binarySecret.getValue())); StaxUtil.writeEndElement(writer); }
/** * Write a {@code BinarySecretType} to stream * * @param writer * @param binarySecret * @throws ProcessingException */ private void writeBinarySecretType(XMLStreamWriter writer, BinarySecretType binarySecret) throws ProcessingException { StaxUtil.writeStartElement(writer, PREFIX, WSTrustConstants.BINARY_SECRET, BASE_NAMESPACE); String type = binarySecret.getType(); StaxUtil.writeAttribute(writer, WSTrustConstants.TYPE, type); StaxUtil.writeCharacters(writer, new String(binarySecret.getValue())); StaxUtil.writeEndElement(writer); }
/** * Write a {@code BinarySecretType} to stream * * @param writer * @param binarySecret * * @throws ProcessingException */ private void writeBinarySecretType(XMLStreamWriter writer, BinarySecretType binarySecret) throws ProcessingException { StaxUtil.writeStartElement(writer, PREFIX, WSTrustConstants.BINARY_SECRET, BASE_NAMESPACE); String type = binarySecret.getType(); StaxUtil.writeAttribute(writer, WSTrustConstants.TYPE, type); StaxUtil.writeCharacters(writer, new String(binarySecret.getValue())); StaxUtil.writeEndElement(writer); }
requestContext.setProofTokenInfo(WSTrustUtil.createKeyInfo(serverBinarySecret.getValue(), providerPublicKey, keyWrapAlgo));
requestContext.setProofTokenInfo(WSTrustUtil.createKeyInfo(serverBinarySecret.getValue(), providerPublicKey, keyWrapAlgo));
WSTrustConstants.BASE_NAMESPACE); StaxUtil.writeAttribute(this.writer, WSTrustConstants.TYPE, binarySecret.getType()); StaxUtil.writeCharacters(this.writer, new String(binarySecret.getValue())); StaxUtil.writeEndElement(this.writer); WSTrustConstants.BASE_NAMESPACE); StaxUtil.writeAttribute(this.writer, WSTrustConstants.TYPE, binarySecret.getType()); StaxUtil.writeCharacters(this.writer, new String(binarySecret.getValue())); StaxUtil.writeEndElement(this.writer);
WSTrustConstants.BASE_NAMESPACE); StaxUtil.writeAttribute(this.writer, WSTrustConstants.TYPE, binarySecret.getType()); StaxUtil.writeCharacters(this.writer, new String(binarySecret.getValue())); StaxUtil.writeEndElement(this.writer); WSTrustConstants.BASE_NAMESPACE); StaxUtil.writeAttribute(this.writer, WSTrustConstants.TYPE, binarySecret.getType()); StaxUtil.writeCharacters(this.writer, new String(binarySecret.getValue())); StaxUtil.writeEndElement(this.writer);
WSTrustConstants.BASE_NAMESPACE); StaxUtil.writeAttribute(this.writer, WSTrustConstants.TYPE, binarySecret.getType()); StaxUtil.writeCharacters(this.writer, new String(binarySecret.getValue())); StaxUtil.writeEndElement(this.writer); } else if (content instanceof ComputedKeyType) { StaxUtil.writeAttribute(this.writer, WSTrustConstants.TYPE, binarySecret.getType()); StaxUtil.writeCharacters(this.writer, new String(binarySecret.getValue())); StaxUtil.writeEndElement(this.writer);
WSTrustConstants.BASE_NAMESPACE); StaxUtil.writeAttribute(this.writer, WSTrustConstants.TYPE, binarySecret.getType()); StaxUtil.writeCharacters(this.writer, new String(binarySecret.getValue())); StaxUtil.writeEndElement(this.writer); } else if (content instanceof ComputedKeyType) { StaxUtil.writeAttribute(this.writer, WSTrustConstants.TYPE, binarySecret.getType()); StaxUtil.writeCharacters(this.writer, new String(binarySecret.getValue())); StaxUtil.writeEndElement(this.writer);
WSTrustConstants.BASE_NAMESPACE); StaxUtil.writeAttribute(this.writer, WSTrustConstants.TYPE, binarySecret.getType()); StaxUtil.writeCharacters(this.writer, new String(binarySecret.getValue())); StaxUtil.writeEndElement(this.writer); } else if (content instanceof ComputedKeyType) { StaxUtil.writeAttribute(this.writer, WSTrustConstants.TYPE, binarySecret.getType()); StaxUtil.writeCharacters(this.writer, new String(binarySecret.getValue())); StaxUtil.writeEndElement(this.writer);