Package org.apache.xml.security.keys.content.keyvalues

Examples of org.apache.xml.security.keys.content.keyvalues.RSAKeyValue


  Element rsa = XMLUtils.selectDsNode
      (this._constructionElement.getFirstChild(),
       Constants._TAG_RSAKEYVALUE,0);
        
  if (rsa != null) {
            RSAKeyValue kv = new RSAKeyValue(rsa, this._baseURI);
            return kv.getPublicKey();
  }

  Element dsa = XMLUtils.selectDsNode
      (this._constructionElement.getFirstChild(),
       Constants._TAG_DSAKEYVALUE,0);

  if (dsa != null) {
            DSAKeyValue kv = new DSAKeyValue(dsa, this._baseURI);
            return kv.getPublicKey();
  }

  return null;
    }
View Full Code Here


            String pubKeyAlgo = key.getAlgorithm();
            if ("DSA".equalsIgnoreCase(pubKeyAlgo)) {
                DSAKeyValue dsaKeyValue = new DSAKeyValue(writer.getDocument(), key);
                writer.getCurrentNode().appendChild(dsaKeyValue.getElement());
            } else if ("RSA".equalsIgnoreCase(pubKeyAlgo)) {
                RSAKeyValue rsaKeyValue = new RSAKeyValue(writer.getDocument(), key);
                writer.getCurrentNode().appendChild(rsaKeyValue.getElement());
            }
            writer.writeEndElement();
        }

        writer.writeEndElement();
View Full Code Here

        ki.add(x509Data);
        x509Data.addCertificate(cert);
        x509Data.addSubjectName("Subject name");
        x509Data.addIssuerSerial("Subject nfsdfhs", 6786);
        ki.add(new RSAKeyValue(doc, new BigInteger("678"), new BigInteger("6870")));
        XMLUtils.outputDOMc14nWithComments(doc, System.out);
    }
View Full Code Here

            DSAKeyValue dsa = new DSAKeyValue(getDocument(), pk);

            appendSelf(dsa);
            addReturnToSelf();
        } else if (pk instanceof java.security.interfaces.RSAPublicKey) {
            RSAKeyValue rsa = new RSAKeyValue(getDocument(), pk);

            appendSelf(rsa);
            addReturnToSelf();
        }
    }
View Full Code Here

        Element rsa =
            XMLUtils.selectDsNode(
                getFirstChild(), Constants._TAG_RSAKEYVALUE, 0);

        if (rsa != null) {
            RSAKeyValue kv = new RSAKeyValue(rsa, this.baseURI);
            return kv.getPublicKey();
        }

        Element dsa =
            XMLUtils.selectDsNode(
                getFirstChild(), Constants._TAG_DSAKEYVALUE, 0);

        if (dsa != null) {
            DSAKeyValue kv = new DSAKeyValue(dsa, this.baseURI);
            return kv.getPublicKey();
        }

        return null;
    }
View Full Code Here

        if (rsaKeyElement == null) {
            return null;        
        }

        try {
            RSAKeyValue rsaKeyValue = new RSAKeyValue(rsaKeyElement, BaseURI);

            return rsaKeyValue.getPublicKey();
        } catch (XMLSecurityException ex) {
            if (log.isDebugEnabled()) {
                log.debug("XMLSecurityException", ex);
            }
        }
View Full Code Here

            String pubKeyAlgo = key.getAlgorithm();
            if ("DSA".equalsIgnoreCase(pubKeyAlgo)) {
                DSAKeyValue dsaKeyValue = new DSAKeyValue(writer.getDocument(), key);
                writer.getCurrentNode().appendChild(dsaKeyValue.getElement());
            } else if ("RSA".equalsIgnoreCase(pubKeyAlgo)) {
                RSAKeyValue rsaKeyValue = new RSAKeyValue(writer.getDocument(), key);
                writer.getCurrentNode().appendChild(rsaKeyValue.getElement());
            }
            writer.writeEndElement();
        }

        writer.writeEndElement();
View Full Code Here

            String pubKeyAlgo = key.getAlgorithm();
            if ("DSA".equalsIgnoreCase(pubKeyAlgo)) {
                DSAKeyValue dsaKeyValue = new DSAKeyValue(writer.getDocument(), key);
                writer.getCurrentNode().appendChild(dsaKeyValue.getElement());
            } else if ("RSA".equalsIgnoreCase(pubKeyAlgo)) {
                RSAKeyValue rsaKeyValue = new RSAKeyValue(writer.getDocument(), key);
                writer.getCurrentNode().appendChild(rsaKeyValue.getElement());
            }
            writer.writeEndElement();
        }

        writer.writeEndElement();
View Full Code Here

            String pubKeyAlgo = key.getAlgorithm();
            if ("DSA".equalsIgnoreCase(pubKeyAlgo)) {
                DSAKeyValue dsaKeyValue = new DSAKeyValue(writer.getDocument(), key);
                writer.getCurrentNode().appendChild(dsaKeyValue.getElement());
            } else if ("RSA".equalsIgnoreCase(pubKeyAlgo)) {
                RSAKeyValue rsaKeyValue = new RSAKeyValue(writer.getDocument(), key);
                writer.getCurrentNode().appendChild(rsaKeyValue.getElement());
            }
            writer.writeEndElement();
        }

        writer.writeEndElement();
View Full Code Here

            String pubKeyAlgo = key.getAlgorithm();
            if ("DSA".equalsIgnoreCase(pubKeyAlgo)) {
                DSAKeyValue dsaKeyValue = new DSAKeyValue(writer.getDocument(), key);
                writer.getCurrentNode().appendChild(dsaKeyValue.getElement());
            } else if ("RSA".equalsIgnoreCase(pubKeyAlgo)) {
                RSAKeyValue rsaKeyValue = new RSAKeyValue(writer.getDocument(), key);
                writer.getCurrentNode().appendChild(rsaKeyValue.getElement());
            }
            writer.writeEndElement();
        }

        writer.writeEndElement();
View Full Code Here

TOP

Related Classes of org.apache.xml.security.keys.content.keyvalues.RSAKeyValue

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.