Examples of DecryptionException


Examples of com.google.k2crypto.exceptions.DecryptionException

      decryptedData = keyVersion.getDecryptingCipher().doFinal(materialToDecrypt);
      // Catch all exceptions
    } catch (Exception e) {
      // propagate the exception up as an decrypted exception
      throw new DecryptionException("Decryption of byte array failed", e);
    }
    // return the decrypted data
    return decryptedData;
  }
View Full Code Here

Examples of com.google.k2crypto.exceptions.DecryptionException

      }
      // close the output stream to prevent resource leakage
      out.close();
    } catch (Exception e) {
      // propagate the exception up as an DecryptionException
      throw new DecryptionException("Decryption of stream failed", e);
    }
  }
View Full Code Here

Examples of org.openengsb.core.api.security.DecryptionException

            throw new IllegalArgumentException("unable to initialize cipher for algorithm " + algorithm, e);
        }
        try {
            return cipher.doFinal(text);
        } catch (GeneralSecurityException e) {
            throw new DecryptionException("unable to decrypt data using algorithm " + algorithm, e);
        }
    }
View Full Code Here

Examples of org.opensaml.xml.encryption.DecryptionException

     * @throws DecryptionException thrown when decryption generates an error
     */
    public Assertion decrypt(EncryptedAssertion encryptedAssertion) throws DecryptionException {
        SAMLObject samlObject = decryptData(encryptedAssertion);
        if (! (samlObject instanceof Assertion)) {
            throw new DecryptionException("Decrypted SAMLObject was not an instance of Assertion");
        }
        return (Assertion) samlObject;
    }
View Full Code Here

Examples of org.opensaml.xml.encryption.DecryptionException

     * @throws DecryptionException thrown when decryption generates an error
     */
    public Attribute decrypt(EncryptedAttribute encryptedAttribute) throws DecryptionException {
        SAMLObject samlObject = decryptData(encryptedAttribute);
        if (! (samlObject instanceof Attribute)) {
            throw new DecryptionException("Decrypted SAMLObject was not an instance of Attribute");
        }
        return (Attribute) samlObject;
    }
View Full Code Here

Examples of org.opensaml.xml.encryption.DecryptionException

     * @throws DecryptionException thrown when decryption generates an error
     */
    public NewID decrypt(NewEncryptedID newEncryptedID) throws DecryptionException {
        SAMLObject samlObject = decryptData(newEncryptedID);
        if (! (samlObject instanceof NewID)) {
            throw new DecryptionException("Decrypted SAMLObject was not an instance of NewID");
        }
        return (NewID) samlObject;
    }
View Full Code Here

Examples of org.opensaml.xml.encryption.DecryptionException

     * @throws DecryptionException thrown when decryption generates an error
     */
    private SAMLObject decryptData(EncryptedElementType encElement) throws DecryptionException {
       
        if (encElement.getEncryptedData() == null) {
            throw new DecryptionException("Element had no EncryptedData child");
        }
       
        XMLObject xmlObject = null;
        try {
            xmlObject = decryptData(encElement.getEncryptedData(), isRootInNewDocument());
        } catch (DecryptionException e) {
            log.error("SAML Decrypter encountered an error decrypting element content", e);
            throw e;
        }
       
        if (! (xmlObject instanceof SAMLObject)) {
            throw new DecryptionException("Decrypted XMLObject was not an instance of SAMLObject");
        }
       
        return (SAMLObject) xmlObject;
    }
View Full Code Here

Examples of org.opensaml.xml.encryption.DecryptionException

     * @throws DecryptionException thrown when decryption generates an error
     */
    public Assertion decrypt(EncryptedAssertion encryptedAssertion) throws DecryptionException {
        SAMLObject samlObject = decryptData(encryptedAssertion);
        if (! (samlObject instanceof Assertion)) {
            throw new DecryptionException("Decrypted SAMLObject was not an instance of Assertion");
        }
        return (Assertion) samlObject;
    }
View Full Code Here

Examples of org.opensaml.xml.encryption.DecryptionException

     * @throws DecryptionException thrown when decryption generates an error
     */
    public Attribute decrypt(EncryptedAttribute encryptedAttribute) throws DecryptionException {
        SAMLObject samlObject = decryptData(encryptedAttribute);
        if (! (samlObject instanceof Attribute)) {
            throw new DecryptionException("Decrypted SAMLObject was not an instance of Attribute");
        }
        return (Attribute) samlObject;
    }
View Full Code Here

Examples of org.opensaml.xml.encryption.DecryptionException

     * @throws DecryptionException thrown when decryption generates an error
     */
    public NewID decrypt(NewEncryptedID newEncryptedID) throws DecryptionException {
        SAMLObject samlObject = decryptData(newEncryptedID);
        if (! (samlObject instanceof NewID)) {
            throw new DecryptionException("Decrypted SAMLObject was not an instance of NewID");
        }
        return (NewID) samlObject;
    }
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.