Examples of decrypt()


Examples of org.apache.openejb.resource.jdbc.cipher.PasswordCipher.decrypt()

            }

            // check password codec if available
            if (null != passwordCipher) {
                PasswordCipher cipher = BasicDataSourceUtil.getPasswordCipher(passwordCipher);
                String plainPwd = cipher.decrypt(password.toCharArray());

                // override previous password value
                super.setPassword(plainPwd);
            }
View Full Code Here

Examples of org.apache.openejb.resource.jdbc.cipher.PlainTextPasswordCipher.decrypt()

  private static final String PLAIN_PWD = "david";
 
    public void testPlainCodec() {
      PasswordCipher cipher = new PlainTextPasswordCipher();
      assertEquals(PLAIN_PWD, new String(cipher.encrypt(PLAIN_PWD)));
      assertEquals(PLAIN_PWD, cipher.decrypt(PLAIN_PWD.toCharArray()));
    }
 
  public void testStaticDesCodec() {
    PasswordCipher cipher = new StaticDESPasswordCipher();
    char[] tmp = cipher.encrypt(PLAIN_PWD);
View Full Code Here

Examples of org.apache.openejb.resource.jdbc.cipher.StaticDESPasswordCipher.decrypt()

    }
 
  public void testStaticDesCodec() {
    PasswordCipher cipher = new StaticDESPasswordCipher();
    char[] tmp = cipher.encrypt(PLAIN_PWD);
    assertEquals(PLAIN_PWD, cipher.decrypt(tmp));
    }
 
  public void testGetDataSourcePlugin() throws Exception {
        // all current known plugins
        assertPluginClass("PlainText", PlainTextPasswordCipher.class);
View Full Code Here

Examples of org.apache.openjpa.lib.encryption.EncryptionProvider.decrypt()

    }

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

    public void setConnectionURL(String connectionURL) {
View Full Code Here

Examples of org.apache.pdfbox.pdmodel.PDDocument.decrypt()

                try {
                    String password = metadata.get(PASSWORD);
                    if (password == null) {
                        password = "";
                    }
                    pdfDocument.decrypt(password);
                } catch (Exception e) {
                    // Ignore
                }
            }
            metadata.set(Metadata.CONTENT_TYPE, "application/pdf");
View Full Code Here

Examples of org.apache.shiro.crypto.AesCipherService.decrypt()

     * @param key      the key used to encrypt the password
     * @return decrypted password in plain text
     */
    public static String decryptPassword(String password, byte[] key) {
        AesCipherService cipherService = new AesCipherService();
        ByteSource decrypted = cipherService.decrypt(Base64.decode(password), key);
        return new String(decrypted.getBytes());
    }

    /**
     * Returns a new encryption key
View Full Code Here

Examples of org.apache.shiro.crypto.CipherService.decrypt()

     */
    protected byte[] decrypt(byte[] encrypted) {
        byte[] serialized = encrypted;
        CipherService cipherService = getCipherService();
        if (cipherService != null) {
            ByteSource byteSource = cipherService.decrypt(encrypted, getDecryptionCipherKey());
            serialized = byteSource.getBytes();
        }
        return serialized;
    }

View Full Code Here

Examples of org.apache.synapse.securevault.DecryptionProvider.decrypt()

                    log.debug("There is no secret for the alias : " + alias);
                }
                continue;
            }

            String decryptedText = new String(baseCipher.decrypt(encryptedText.trim().getBytes()));
            secrets.put(key, decryptedText);
        }
        initialize = true;
    }
View Full Code Here

Examples of org.apache.uima.ducc.common.crypto.Crypto.decrypt()

            userHome = System.getProperty("user.home");
          }
        }
        Crypto crypto = new Crypto(user,userHome,AccessType.READER);
        logger.debug(methodName, null, "readable:"+crypto.isReadablePublic()+" "+"public:"+crypto.getPublic());
        String signature = (String)crypto.decrypt((byte[])properties.get(SpecificationProperties.key_signature));
        if(user.equals(signature)) {
          logger.debug(methodName, null, "user:"+user+" signature:"+signature+" valid:y");
          retVal = true;
        }
        else {
View Full Code Here

Examples of org.apache.xml.security.algorithms.encryption.EncryptionMethod.decrypt()

   public void decryptAndReplace(Key contentDecryptionKey)
           throws XMLSecurityException {

      EncryptionMethod em = this.getEncryptionMethod();
      byte ciphertext[] = this.getCipherData().getCipherValue().getCipherText();
      byte plaintext[] = em.decrypt(ciphertext, contentDecryptionKey);

      try {
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         String container = "container";
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.