Package br.net.woodstock.rockframework.security.digest

Examples of br.net.woodstock.rockframework.security.digest.Digester.digest()


        if ((!detached) && (verified)) {
          byte[] contentDigest = signerInformation.getContentDigest();
          AlgorithmIdentifier algorithmOID = signerInformation.getDigestAlgorithmID();
          DigestType type = BouncyCastleSignerHelper.getDigestTypeFromOid(algorithmOID.getAlgorithm().getId());
          Digester digester = new BasicDigester(type);
          byte[] dataDigest = digester.digest(data);

          if (!MessageDigest.isEqual(contentDigest, dataDigest)) {
            verified = false;
          }
        }
View Full Code Here


    }
  }

  protected TimeStampRequest getTimeStampRequest(final byte[] imprint) {
    Digester digester = new BasicDigester(DigestType.valueOf(DigestType.SHA1.getAlgorithm()));
    byte[] digest = digester.digest(imprint);

    TimeStampRequestGenerator generator = new TimeStampRequestGenerator();
    generator.setCertReq(true);

    BigInteger nonce = BigInteger.valueOf(System.currentTimeMillis());
View Full Code Here

          if ((!detached) && (verified)) {
            byte[] contentDigest = signerInformation.getContentDigest();
            AlgorithmIdentifier algorithmOID = signerInformation.getDigestAlgorithmID();
            DigestType type = BouncyCastleSignerHelper.getDigestTypeFromOid(algorithmOID.getAlgorithm().getId());
            Digester digester = new BasicDigester(type);
            byte[] dataDigest = digester.digest(data);

            if (!MessageDigest.isEqual(contentDigest, dataDigest)) {
              verified = false;
            }
          }
View Full Code Here

      exc.put(PdfName.CONTENTS, new Integer(contentSize));
      appearance.preClose(exc);

      Digester digester = new BasicDigester(digestType);
      byte[] rangeStream = IOUtils.toByteArray(appearance.getRangeStream());
      byte[] hash = digester.digest(rangeStream);

      TSAClient tsc = null;
      if (this.request.getTimeStampClient() != null) {
        tsc = new DelegateITextTSAClient(this.request.getTimeStampClient());
      }
View Full Code Here

    }
  }

  protected TimeStampRequest getTimeStampRequest(final byte[] imprint) {
    Digester digester = new BasicDigester(DigestType.valueOf(DigestType.SHA1.getAlgorithm()));
    byte[] digest = digester.digest(imprint);

    TimeStampRequestGenerator generator = new TimeStampRequestGenerator();
    generator.setCertReq(true);

    BigInteger nonce = BigInteger.valueOf(System.currentTimeMillis());
View Full Code Here

      exc.put(PdfName.CONTENTS, new Integer(contentSize));
      appearance.preClose(exc);

      Digester digester = new BasicDigester(digestType);
      byte[] rangeStream = IOUtils.toByteArray(appearance.getRangeStream());
      byte[] hash = digester.digest(rangeStream);

      TSAClient tsc = null;
      if (this.parameters.getTimeStampClient() != null) {
        tsc = new DelegateITextTSAClient(this.parameters.getTimeStampClient());
      }
View Full Code Here

    }
  }

  protected TimeStampRequest getTimeStampRequest(final byte[] imprint) {
    Digester digester = new BasicDigester(DigestType.valueOf(DigestType.SHA1.getAlgorithm()));
    byte[] digest = digester.digest(imprint);

    TimeStampRequestGenerator generator = new TimeStampRequestGenerator();
    generator.setCertReq(true);

    BigInteger nonce = BigInteger.valueOf(System.currentTimeMillis());
View Full Code Here

    }
  }

  protected TimeStampRequest getTimeStampRequest(final byte[] imprint) {
    Digester digester = new BasicDigester(DigestType.valueOf(DigestType.SHA1.getAlgorithm()));
    byte[] digest = digester.digest(imprint);

    TimeStampRequestGenerator generator = new TimeStampRequestGenerator();
    generator.setCertReq(true);

    BigInteger nonce = BigInteger.valueOf(System.currentTimeMillis());
View Full Code Here

          if ((!detached) && (verified)) {
            byte[] contentDigest = signerInformation.getContentDigest();
            AlgorithmIdentifier algorithmOID = signerInformation.getDigestAlgorithmID();
            DigestType type = BouncyCastleSignerHelper.getDigestTypeFromOid(algorithmOID.getAlgorithm().getId());
            Digester digester = new BasicDigester(type);
            byte[] dataDigest = digester.digest(data);

            if (!MessageDigest.isEqual(contentDigest, dataDigest)) {
              verified = false;
            }
          }
View Full Code Here

          if ((!detached) && (verified)) {
            byte[] contentDigest = signerInformation.getContentDigest();
            AlgorithmIdentifier algorithmOID = signerInformation.getDigestAlgorithmID();
            DigestType type = BouncyCastleSignerHelper.getDigestTypeFromOid(algorithmOID.getAlgorithm().getId());
            Digester digester = new BasicDigester(type);
            byte[] dataDigest = digester.digest(data);

            if (!MessageDigest.isEqual(contentDigest, dataDigest)) {
              verified = false;
            }
          }
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.