Package org.apache.abdera.security

Examples of org.apache.abdera.security.SecurityException


                encdata.setKeyInfo(keyInfo);
            }
            dom = xmlCipher.doFinal(dom, dom.getDocumentElement(), false);
            return domToFom(dom, options);
        } catch (Exception e) {
            throw new SecurityException(e);
        }
    }
View Full Code Here


            xmlCipher.init(XMLCipher.DECRYPT_MODE, dek);
            xmlCipher.setKEK(kek);
            dom = xmlCipher.doFinal(dom, element);
            return domToFom(dom, options);
        } catch (Exception e) {
            throw new SecurityException(e);
        }
    }
View Full Code Here

    public <T extends Element> T sign(T entry, SignatureOptions options) throws SecurityException {
        try {
            return (T)_sign(entry, options);
        } catch (Exception e) {
            throw new SecurityException(e);
        }
    }
View Full Code Here

        if (!isSigned(entry))
            return false;
        try {
            return _verify(entry, options);
        } catch (Exception e) {
            throw new SecurityException(e);
        }
    }
View Full Code Here

            element.writeTo(output);
            byte[] before = output.toByteArray();
            after = Crypto.encryptAES(before, secretKey);
        } catch (Exception e) {
            log.error("Error while encrypting element", e);
            throw new SecurityException(e);
        }
        return after;
    }
View Full Code Here

            byte[] after = Crypto.decryptAES(data, secretKey);
            ByteArrayInputStream input = new ByteArrayInputStream(after);
            result = Abdera.getInstance().getParser().parse(input).getRoot();
        } catch (Exception e) {
            log.error("Error while decrypting: ", e);
            throw new SecurityException(e);
        }
        return result;
    }
View Full Code Here

    SignatureOptions options)
      throws SecurityException {
    try {
      return (Entry) _sign(entry, options);
    } catch (Exception e) {
      throw new SecurityException(e);
    }
  }
View Full Code Here

    SignatureOptions options)
      throws SecurityException {
    try {
      return (Feed) _sign(feed, options);
    } catch (Exception e) {
      throw new SecurityException(e);
    }
  }
View Full Code Here

    SignatureOptions options) throws SecurityException {
      if (!isSigned(entry)) return false;
      try {
        return _verify(entry,options);
      } catch (Exception e) {
        throw new SecurityException(e);
      }
  }
View Full Code Here

    SignatureOptions options) throws SecurityException {
      if (!isSigned(feed)) return false;
      try {
        return _verify(feed,options);
      } catch (Exception e) {
        throw new SecurityException(e);
      }
  }
View Full Code Here

TOP

Related Classes of org.apache.abdera.security.SecurityException

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.