Package org.apache.xml.security.exceptions

Examples of org.apache.xml.security.exceptions.XMLSecurityException


    *
    * @throws org.apache.xml.security.exceptions.XMLSecurityException
    */
   public byte[] engineWrap(Key parm1, Key parm2, byte[] parm3)
           throws org.apache.xml.security.exceptions.XMLSecurityException {
      throw new XMLSecurityException("encryption.algorithmCannotWrapUnWrap");
   }
View Full Code Here


    *
    * @throws org.apache.xml.security.exceptions.XMLSecurityException
    */
   public Key engineUnwrap(byte[] parm1, Key parm2, String parm3)
           throws org.apache.xml.security.exceptions.XMLSecurityException {
      throw new XMLSecurityException("encryption.algorithmCannotWrapUnWrap");
   }
View Full Code Here

            baos.write(t);
         }

         return baos.toByteArray();
      } catch (IOException ex) {
         throw new XMLSecurityException("empty", ex);
      } catch (NoSuchAlgorithmException ex) {
         throw new XMLSecurityException("empty", ex);
      } catch (BadPaddingException ex) {
         throw new XMLSecurityException("empty", ex);
      } catch (NoSuchProviderException ex) {
         throw new XMLSecurityException("empty", ex);
      } catch (NoSuchPaddingException ex) {
         throw new XMLSecurityException("empty", ex);
      } catch (InvalidKeyException ex) {
         throw new XMLSecurityException("empty", ex);
      } catch (InvalidAlgorithmParameterException ex) {
         throw new XMLSecurityException("empty", ex);
      } catch (IllegalBlockSizeException ex) {
         throw new XMLSecurityException("empty", ex);
      }
   }
View Full Code Here

            baos.write(bytes);
         }

         return baos.toByteArray();
      } catch (IOException ex) {
         throw new XMLSecurityException("empty", ex);
      } catch (InvalidKeyException ex) {
         throw new XMLSecurityException("empty", ex);
      } catch (InvalidAlgorithmParameterException ex) {
         throw new XMLSecurityException("empty", ex);
      } catch (BadPaddingException ex) {
         throw new XMLSecurityException("empty", ex);
      } catch (IllegalBlockSizeException ex) {
         throw new XMLSecurityException("empty", ex);
      } catch (NoSuchPaddingException ex) {
         throw new XMLSecurityException("empty", ex);
      } catch (NoSuchProviderException ex) {
         throw new XMLSecurityException("empty", ex);
      } catch (NoSuchAlgorithmException ex) {
         throw new XMLSecurityException("empty", ex);
      }
   }
View Full Code Here

         this._params = new OAEPParams(null, null);
      } else {
         if (params instanceof OAEPParams) {
            this._params = (OAEPParams) params;
         } else {
            throw new XMLSecurityException("empty");
         }
      }

      try {
         Cipher rsaCipher =
            Cipher.getInstance(this.getImplementedAlgorithmJCE(),
                               this.getRequiredProviderName());
         MessageDigestAlgorithm mda =
            MessageDigestAlgorithm.getInstance(this._doc,
                                               this._params
                                                  .getDigestMethodURI());
         MessageDigest md = mda.getAlgorithm();

         this._cipher = new OAEPCipher(rsaCipher, md,
                                       this._params.getOAEPParamBytes());
      } catch (NoSuchAlgorithmException ex) {
         throw new XMLSecurityException("empty", ex);
      } catch (NoSuchProviderException ex) {
         throw new XMLSecurityException("empty", ex);
      } catch (NoSuchPaddingException ex) {
         throw new XMLSecurityException("empty", ex);
      }

      return (EncryptionMethodParams) this._params;
   }
View Full Code Here

         MessageDigest md = mda.getAlgorithm();

         this._cipher = new OAEPCipher(rsaCipher, md,
                                       this._params.getOAEPParamBytes());
      } catch (NoSuchAlgorithmException ex) {
         throw new XMLSecurityException("empty", ex);
      } catch (NoSuchProviderException ex) {
         throw new XMLSecurityException("empty", ex);
      } catch (NoSuchPaddingException ex) {
         throw new XMLSecurityException("empty", ex);
      }

      return (EncryptionMethodParams) this._params;
   }
View Full Code Here

         byte contentKeyBytes[] = contentKey.getEncoded();

         return this._cipher.encodeBlock(contentKeyBytes, 0,
                                         contentKeyBytes.length);
      } catch (BadPaddingException ex) {
         throw new XMLSecurityException("empty", ex);
      } catch (InvalidKeyException ex) {
         throw new XMLSecurityException("empty", ex);
      } catch (IllegalBlockSizeException ex) {
         throw new XMLSecurityException("empty", ex);
      }
   }
View Full Code Here

            }

            throw new InvalidKeyException("Unknown key type " + keyType);
         }
      } catch (BadPaddingException ex) {
         throw new XMLSecurityException("empty", ex);
      } catch (InvalidKeyException ex) {
         throw new XMLSecurityException("empty", ex);
      } catch (IllegalBlockSizeException ex) {
         throw new XMLSecurityException("empty", ex);
      }
   }
View Full Code Here

    *
    * @throws XMLSecurityException
    */
   public byte[] engineWrap(Key contentKey, Key wrapKey, byte[] IV)
           throws XMLSecurityException {
      throw new XMLSecurityException("encryption.algorithmCannotUnderstandIV");
   }
View Full Code Here

    *
    * @throws XMLSecurityException
    */
   public byte[] engineEncrypt(byte[] plaintextBytes, Key contentKey)
           throws XMLSecurityException {
      throw new XMLSecurityException(
         "encryption.algorithmCannotEncryptDecrypt");
   }
View Full Code Here

TOP

Related Classes of org.apache.xml.security.exceptions.XMLSecurityException

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.