Examples of KeyInfo


Examples of javax.xml.crypto.dsig.keyinfo.KeyInfo

        } catch (NoSuchProviderException ex) {
            keyInfoFactory = KeyInfoFactory.getInstance("DOM");
        }

        try {
            KeyInfo keyInfo =
                keyInfoFactory.unmarshalKeyInfo(new DOMStructure(keyInfoElement));
            List<?> list = keyInfo.getContent();

            for (int i = 0; i < list.size(); i++) {
                if (list.get(i) instanceof KeyValue) {
                    KeyValue keyValue = (KeyValue)list.get(i);
                    ReceivedKey receivedKey = new ReceivedKey();
View Full Code Here

Examples of javax.xml.crypto.dsig.keyinfo.KeyInfo

     */
    private KeyValue getKeyValue(
        Element keyInfoElement
    ) throws MarshalException {
        XMLStructure keyInfoStructure = new DOMStructure(keyInfoElement);
        KeyInfo keyInfo = keyInfoFactory.unmarshalKeyInfo(keyInfoStructure);
        List<?> list = keyInfo.getContent();

        for (int i = 0; i < list.size(); i++) {
            XMLStructure xmlStructure = (XMLStructure) list.get(i);
            if (xmlStructure instanceof KeyValue) {
                return (KeyValue)xmlStructure;
View Full Code Here

Examples of javax.xml.crypto.dsig.keyinfo.KeyInfo

            SignatureMethod signatureMethod = fac.newSignatureMethod(signatureMethodString, null);
            SignedInfo si = fac.newSignedInfo(canonicalizationMethod, signatureMethod, referenceList);

            KeyInfoFactory kif = fac.getKeyInfoFactory();
            KeyValue kv = kif.newKeyValue(publicKey);
            KeyInfo ki = kif.newKeyInfo(Collections.singletonList(kv));

            XMLSignature signature = fac.newXMLSignature(si, ki);

            signature.sign(dsc);
        } catch (XMLSignatureException e) {
View Full Code Here

Examples of javax.xml.crypto.dsig.keyinfo.KeyInfo

            // only in the detached case there can be several
            for (final String contentReferenceUri : contentReferenceUris) {

                // the method KeyAccessor.getKeyInfo must be called after the method KeyAccessor.getKeySelector, this is part of the interface contract!
                // and this method must be called within the loop over the content reference URIs, because for each signature the key info ID must be different
                final KeyInfo keyInfo = getConfiguration().getKeyAccessor().getKeyInfo(out, node, fac.getKeyInfoFactory());

                String signatureId = getConfiguration().getSignatureId();
                if (signatureId == null) {
                    signatureId = "_" + UUID.randomUUID().toString();
                } else if (signatureId.isEmpty()) {
View Full Code Here

Examples of javax.xml.crypto.dsig.keyinfo.KeyInfo

     */
    private KeyValue getKeyValue(
        Element keyInfoElement
    ) throws MarshalException {
        XMLStructure keyInfoStructure = new DOMStructure(keyInfoElement);
        KeyInfo keyInfo = keyInfoFactory.unmarshalKeyInfo(keyInfoStructure);
        List<?> list = keyInfo.getContent();

        for (int i = 0; i < list.size(); i++) {
            XMLStructure xmlStructure = (XMLStructure) list.get(i);
            if (xmlStructure instanceof KeyValue) {
                return (KeyValue)xmlStructure;
View Full Code Here

Examples of net.greghaines.jesque.meta.KeyInfo

            oneOf(pool).getResource(); will(returnValue(jedis));
            oneOf(jedis).type(key); will(returnValue(KeyType.STRING.toString()));
            oneOf(jedis).strlen(key); will(returnValue(size));
            oneOf(pool).returnResource(jedis);
        }});
        final KeyInfo keyInfo = this.keysDAO.getKeyInfo(key);
        Assert.assertNotNull(keyInfo);
        Assert.assertEquals("foo", keyInfo.getNamespace());
        Assert.assertEquals("bar", keyInfo.getName());
        Assert.assertEquals(KeyType.STRING, keyInfo.getType());
        Assert.assertEquals((Long) size, keyInfo.getSize());
        Assert.assertNull(keyInfo.getArrayValue());
    }
View Full Code Here

Examples of org.apache.harmony.awt.wtk.KeyInfo

     * Translates linux key event to internal structure KeyInfo and returns it.
     * @param event instance of XKeyEvent
     * @return instance of KeyInfo
     */
    static KeyInfo translateEvent(X11.XKeyEvent event) {
        KeyInfo res = new KeyInfo();
        int nBytes = 255;
        Int8Pointer buffer = bridge.createInt8Pointer(nBytes, false);
        buffer.fill((byte)0, nBytes);
        CLongPointer keySymPtr = bridge.createCLongPointer(1, false);

View Full Code Here

Examples of org.apache.juddi.model.KeyInfo

                apiSignatureValue.setValue(modelSigValue.getValue());
               
                apiSignature.setSignatureValue(apiSignatureValue);
               
                KeyInfoType apiKeyInfo = new KeyInfoType();
                KeyInfo modelKeyInfo = modelSig.getKeyInfo();
                apiKeyInfo.setId(modelKeyInfo.getXmlID());
               
                List<KeyDataValue> modelKeyDataValueList = modelKeyInfo.getKeyDataValue();
                List<Object> apiX509KeyInfoList = apiKeyInfo.getContent();
                mapModelKeyDataValue(modelKeyDataValueList, apiX509KeyInfoList);
                apiSignature.setKeyInfo(apiKeyInfo);
                apiSignatureList.add(apiSignature);
            }
View Full Code Here

Examples of org.apache.maven.dotnet.compiler.KeyInfo

        }

        compilerConfig.setArtifactType( ArtifactType.valueOf( packaging.toUpperCase() ) );
        compilerConfig.setCompilerPlatformVersion( DotnetCompilerPlatformVersion.valueFromVersion( frameworkVersion ) );

        KeyInfo keyInfo = KeyInfo.Factory.createDefaultKeyInfo();
        if ( keyfile != null )
        {
            keyInfo.setKeyFileUri( keyfile.toURI() );
        }

        keyInfo.setKeyContainerName( keycontainer );
        compilerConfig.setKeyInfo( keyInfo );

        compilerConfig.setLocalRepository( localRepository );
        compilerConfig.setProgrammingLanguage( ProgrammingLanguage.C_SHARP );
        compilerConfig.setCompilerSourceDirectory( sourceDir );
View Full Code Here

Examples of org.apache.s4.dispatcher.partitioner.KeyInfo

                compoundKeyInfo.setCompoundKey(plainCompoundKeyInfo.get("compoundKey",
                                                                        (String) null));
                compoundKeys.add(compoundKeyInfo);
                for (EventRecord plainKeyInfo : plainCompoundKeyInfo.get("keyInfoList",
                                                                         EMPTY_LIST)) {
                    KeyInfo keyInfo = new KeyInfo();
                    for (EventRecord plainKeyPathElement : plainKeyInfo.get("keyPathElementList",
                                                                            EMPTY_LIST)) {
                        String keyName = plainKeyPathElement.get("keyName",
                                                                 (String) null);
                        Integer index = plainKeyPathElement.get("index",
                                                                (Integer) null);

                        if (keyName != null) {
                            keyInfo.addElementToPath(keyName);
                        } else if (index != null) {
                            keyInfo.addElementToPath(index);
                        }
                    }
                    compoundKeyInfo.addKeyInfo(keyInfo);
                }
            }
        }
        if (debug) {
            for (CompoundKeyInfo compoundKeyInfo : compoundKeys) {
                System.out.println("CompoundKey: "
                        + compoundKeyInfo.getCompoundValue());
                for (KeyInfo keyInfo : compoundKeyInfo.getKeyInfoList()) {
                    String keyPath = "";
                    for (KeyPathElement keyPathElement : keyInfo.getKeyPath()) {
                        if (keyPathElement instanceof KeyPathElementIndex) {
                            keyPath += "["
                                    + ((KeyPathElementIndex) keyPathElement).getIndex()
                                    + "]";
                        } else {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.