All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jcp.xml.dsig.internal.dom.DOMCanonicalizationMethod Maven / Gradle / Ivy

The newest version!
/*    */ package org.jcp.xml.dsig.internal.dom;
/*    */ 
/*    */ import java.io.OutputStream;
/*    */ import java.security.InvalidAlgorithmParameterException;
/*    */ import javax.xml.crypto.Data;
/*    */ import javax.xml.crypto.MarshalException;
/*    */ import javax.xml.crypto.XMLCryptoContext;
/*    */ import javax.xml.crypto.dsig.CanonicalizationMethod;
/*    */ import javax.xml.crypto.dsig.TransformException;
/*    */ import javax.xml.crypto.dsig.TransformService;
/*    */ import org.w3c.dom.Element;
/*    */ 
/*    */ public class DOMCanonicalizationMethod extends DOMTransform
/*    */   implements CanonicalizationMethod
/*    */ {
/*    */   public DOMCanonicalizationMethod(TransformService spi)
/*    */     throws InvalidAlgorithmParameterException
/*    */   {
/* 32 */     super(spi);
/*    */   }
/*    */ 
/*    */   public DOMCanonicalizationMethod(Element cmElem, XMLCryptoContext context)
/*    */     throws MarshalException
/*    */   {
/* 44 */     super(cmElem, context);
/*    */   }
/*    */ 
/*    */   public Data canonicalize(Data data, XMLCryptoContext xc)
/*    */     throws TransformException
/*    */   {
/* 62 */     return transform(data, xc);
/*    */   }
/*    */ 
/*    */   public Data canonicalize(Data data, XMLCryptoContext xc, OutputStream os) throws TransformException
/*    */   {
/* 67 */     return transform(data, xc, os);
/*    */   }
/*    */ 
/*    */   public boolean equals(Object o) {
/* 71 */     if (this == o) {
/* 72 */       return true;
/*    */     }
/*    */ 
/* 75 */     if (!(o instanceof CanonicalizationMethod)) {
/* 76 */       return false;
/*    */     }
/* 78 */     CanonicalizationMethod ocm = (CanonicalizationMethod)o;
/*    */ 
/* 80 */     return (getAlgorithm().equals(ocm.getAlgorithm())) && (DOMUtils.paramsEqual(getParameterSpec(), ocm.getParameterSpec()));
/*    */   }
/*    */ }

/* Location:           E:\HYN\Java\trunk\ref\lib-dep\xmldsig\xmldsig.jar
 * Qualified Name:     org.jcp.xml.dsig.internal.dom.DOMCanonicalizationMethod
 * JD-Core Version:    0.6.2
 */




© 2015 - 2024 Weber Informatics LLC | Privacy Policy