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

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


          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


  private AsStringDigester  digester;

  public DigesterPasswordEncoder(final DigestType type) {
    super();
    Assert.notNull(type, "type");
    Digester basic = new BasicDigester(type);
    Digester base64 = new Base64Digester(basic);
    this.digester = new AsStringDigester(base64);
  }
View Full Code Here

      throw new TimeStampException(e);
    }
  }

  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

      int contentSize = 0x2502;
      HashMap<PdfName, Integer> exc = new HashMap<PdfName, Integer>();
      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

      int contentSize = 0x2502;
      HashMap<PdfName, Integer> exc = new HashMap<PdfName, Integer>();
      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

TOP

Related Classes of br.net.woodstock.rockframework.security.digest.Digester

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.