Examples of EncryptionProvider


Examples of org.apache.openjpa.lib.encryption.EncryptionProvider

    ConfigurationProvider provider = ppd.load(
        PersistenceProductDerivation.RSRC_DEFAULT,
        "encryption_plugin_pu", loader);
    provider.setInto(conf);
    EncryptionProvider ep = conf.getEncryptionProvider();
    assertNotNull(ep);
    // Cast to test impl
    TestEncryptionProvider tep = (TestEncryptionProvider) ep;

    conf.setConnectionPassword(encryptedPassword);
View Full Code Here

Examples of org.apache.openjpa.lib.encryption.EncryptionProvider

    public void setConnectionPassword(String connectionPassword) {
        this.connectionPassword.setString(connectionPassword);
    }

    public String getConnectionPassword() {
      EncryptionProvider p = getEncryptionProvider();
      if(p != null) {
        return p.decrypt(connectionPassword.getString());
      }
        return connectionPassword.getString();
    }
View Full Code Here

Examples of org.apache.openjpa.lib.encryption.EncryptionProvider

    public void setConnection2Password(String connection2Password) {
        this.connection2Password.setString(connection2Password);
    }

    public String getConnection2Password() {
      EncryptionProvider p = getEncryptionProvider();
      if(p != null){
        return p.decrypt(connection2Password.getString());
      }
        return connection2Password.getString();
    }
View Full Code Here

Examples of org.apache.openjpa.lib.encryption.EncryptionProvider

    public void setConnectionPassword(String connectionPassword) {
        this.connectionPassword.setString(connectionPassword);
    }

    public String getConnectionPassword() {
      EncryptionProvider p = getEncryptionProvider();
      if(p != null) {
        return p.decrypt(connectionPassword.getString());
      }
        return connectionPassword.getString();
    }
View Full Code Here

Examples of org.apache.openjpa.lib.encryption.EncryptionProvider

    public void setConnection2Password(String connection2Password) {
        this.connection2Password.setString(connection2Password);
    }

    public String getConnection2Password() {
      EncryptionProvider p = getEncryptionProvider();
      if(p != null){
        return p.decrypt(connection2Password.getString());
      }
        return connection2Password.getString();
    }
View Full Code Here

Examples of org.apache.openjpa.lib.encryption.EncryptionProvider

    ConfigurationProvider provider = ppd.load(
        PersistenceProductDerivation.RSRC_DEFAULT,
        "encryption_plugin_pu", loader);
    provider.setInto(conf);
    EncryptionProvider ep = conf.getEncryptionProvider();
    assertNotNull(ep);
    // Cast to test impl
    TestEncryptionProvider tep = (TestEncryptionProvider) ep;

    conf.setConnectionPassword(encryptedPassword);
View Full Code Here

Examples of org.pac4j.saml.crypto.EncryptionProvider

            CommonHelper.assertNotBlank("privateKeyPassword", this.privateKeyPassword);

            // load private key from the keystore and provide it as OpenSAML credentials
            this.credentialProvider = new CredentialProvider(this.keystorePath, this.keystorePassword,
                    this.privateKeyPassword);
            this.decrypter = new EncryptionProvider(this.credentialProvider).buildDecrypter();
        }

        // Bootstrap OpenSAML
        try {
            DefaultBootstrap.bootstrap();
View Full Code Here

Examples of org.wso2.securevault.EncryptionProvider

            Key key = findKey(cmd, cipherInformation);

            boolean isEncrypt = (cipherInformation.getCipherOperationMode() ==
                    CipherOperationMode.ENCRYPT);

            EncryptionProvider encryptionProvider = null;
            DecryptionProvider decryptionProvider = null;

            if (key != null) {

                if (isEncrypt) {
                    encryptionProvider = CipherFactory.createCipher(cipherInformation, key);
                } else {
                    decryptionProvider = CipherFactory.createCipher(cipherInformation, key);
                }

            } else {

                boolean isTrusted = isArgumentPresent(cmd, TRUSTED);

                KeyStoreWrapper keyStoreWrapper;

                if (isTrusted) {
                    keyStoreWrapper = new TrustKeyStoreWrapper();
                    ((TrustKeyStoreWrapper) keyStoreWrapper).init(getTrustKeyStoreInformation(cmd));
                } else {
                    keyStoreWrapper = new IdentityKeyStoreWrapper();
                    //Password for access private key
                    String keyPass = getArgument(cmd, KEY_PASS, null);
                    assertEmpty(keyPass, KEY_PASS);
                    ((IdentityKeyStoreWrapper) keyStoreWrapper).init(
                            getIdentityKeyStoreInformation(cmd), keyPass);
                }

                if (isEncrypt) {
                    encryptionProvider = CipherFactory.createCipher(cipherInformation,
                            keyStoreWrapper);
                } else {
                    decryptionProvider = CipherFactory.createCipher(cipherInformation,
                            keyStoreWrapper);
                }
            }

            PrintStream out = System.out;
            if (isEncrypt) {
                out.println("Output : " + new String(encryptionProvider.encrypt(source.getBytes())));
            } else {
                out.println("Output : " + new String(decryptionProvider.decrypt(source.getBytes())));
            }

        } catch (ParseException e) {
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.