Examples of 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

Examples of br.net.woodstock.rockframework.security.digest.impl.BasicDigester.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

Examples of ch.ethz.ssh2.crypto.digest.Digest.digest()

    if (hostkey == null)
      throw new IllegalArgumentException("hostkey is null");

    dig.update(hostkey);
    byte[] res = new byte[dig.getDigestLength()];
    dig.digest(res);
    return res;
  }

  /**
   * Convert a raw fingerprint to hex representation (XX:YY:ZZ...).
View Full Code Here

Examples of ch.ethz.ssh2.crypto.digest.HMAC.digest()

    hmac.update(hostname.getBytes());

    byte[] dig = new byte[hmac.getDigestLength()];

    hmac.digest(dig);

    return dig;
  }

  private final boolean checkHashed(String entry, String hostname)
View Full Code Here

Examples of ch.ethz.ssh2.crypto.digest.MD5.digest()

      md5.update(salt, 0, 8); // ARGH we only use the first 8 bytes of the salt in this step.
      // This took me two hours until I got AES-xxx running.

      int copy = (keyLen < tmp.length) ? keyLen : tmp.length;

      md5.digest(tmp, 0);

      System.arraycopy(tmp, 0, key, key.length - keyLen, copy);

      keyLen -= copy;
View Full Code Here

Examples of ch.ethz.ssh2.crypto.digest.SHA1.digest()

    /* Inspired by Bouncycastle's DSASigner class */

    SHA1 md = new SHA1();
    md.update(message);
    byte[] sha_message = new byte[md.getDigestLength()];
    md.digest(sha_message);

    BigInteger m = new BigInteger(1, sha_message);

    BigInteger r = ds.getR();
    BigInteger s = ds.getS();
View Full Code Here

Examples of com.getperka.flatpack.util.UuidDigest.digest()

      digest.add(entry.getKey());
      for (SecurityAction value : entry.getValue()) {
        digest.add(value);
      }
    }
    return digest.digest();
  }

  /**
   * Setter for serialization.
   */
 
View Full Code Here

Examples of com.knowgate.jcifs.util.HMACT64.digest()

            MD4 md4 = new MD4();
            md4.update(password.getBytes("UnicodeLittleUnmarked"));
            HMACT64 hmac = new HMACT64(md4.digest());
            hmac.update(user.toUpperCase().getBytes("UnicodeLittleUnmarked"));
            hmac.update(domain.toUpperCase().getBytes("UnicodeLittleUnmarked"));
            hmac = new HMACT64(hmac.digest());
            hmac.update(challenge);
            hmac.update(clientChallenge);
            hmac.digest(response, 0, 16);
            System.arraycopy(clientChallenge, 0, response, 16, 8);
            return response;
View Full Code Here

Examples of com.knowgate.jcifs.util.MD4.digest()

                new ErrorHandler(uee);
        }
        MD4 md4 = new MD4();
        md4.update( uni );
        try {
            md4.digest(p21, 0, 16);
        } catch (Exception ex) {
            if( DebugFile.trace )
                new ErrorHandler(ex);
        }
        E( p21, challenge, p24 );
View Full Code Here

Examples of com.knowgate.jcifs.util.MD4.digest()

        try {
            byte[] hash = new byte[16];
            byte[] response = new byte[24];
            MD4 md4 = new MD4();
            md4.update(password.getBytes("UnicodeLittleUnmarked"));
            HMACT64 hmac = new HMACT64(md4.digest());
            hmac.update(user.toUpperCase().getBytes("UnicodeLittleUnmarked"));
            hmac.update(domain.toUpperCase().getBytes("UnicodeLittleUnmarked"));
            hmac = new HMACT64(hmac.digest());
            hmac.update(challenge);
            hmac.update(clientChallenge);
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.