Examples of MD5Hash


Examples of com.fathomdb.hash.Md5Hash

    if (certificateChain.length == 0) {
      throw new IllegalArgumentException();
    }

    X509Certificate certificate = certificateChain[0];
    Md5Hash signature = OpenSshUtils.getSignature(certificate.getPublicKey());
    final byte[] signatureBytes = signature.toByteArray();

    SecretStoreDecoder visitor = new SecretStoreDecoder() {
      @Override
      public void visitGenericAsymetricKey(byte[] publicKeySignature, byte[] data) {
        if (Arrays.equals(publicKeySignature, signatureBytes)) {
View Full Code Here

Examples of com.fathomdb.hash.Md5Hash

    }

    public void writeGenericAsymetricKey(byte[] plaintext, PublicKey publicKey) throws IOException {
      dos.writeByte(ASYMETRIC_KEY);
      byte[] encrypted = RsaUtils.encrypt(publicKey, plaintext);
      Md5Hash signature = OpenSshUtils.getSignature(publicKey);
      writeArray(dos, signature.toByteArray());
      writeArray(dos, encrypted);
    }
View Full Code Here

Examples of com.fathomdb.hash.Md5Hash

    {
      String url = "http://gerrit.googlecode.com/files/gerrit-full-2.5.war";

      DownloadFileByHash download = addChild(DownloadFileByHash.class);
      download.setUrl(url);
      download.hash = new Md5Hash("aa0e35045b2467cfff66c365a351ee9c");
      download.filePath = template.getInstallWarFile();

      // // Symlinks avoid multiple versions
      // parent.addChild(ManagedSymlink.build(template.getWarFile(), zipFile));
    }
View Full Code Here

Examples of com.fathomdb.hash.Md5Hash

      File basePath = template.getInstallDir();
      File zipFile = new File(basePath, "postgresql-9.1-903.jdbc4.jar");

      DownloadFileByHash download = parent.addChild(DownloadFileByHash.class);
      download.setUrl(url);
      download.hash = new Md5Hash("3222f2e4f133e8d1a76e9ba76463f8f5");
      download.filePath = zipFile;

      // Symlinks avoid multiple versions
      parent.addChild(ManagedSymlink.build(new File(extDir, "postgresql.jar"), zipFile));
    }

    {
      String url = "http://repo1.maven.org/maven2/commons-pool/commons-pool/1.6/commons-pool-1.6.jar";

      File basePath = template.getInstallDir();
      File zipFile = new File(basePath, "commons-pool-1.6.jar");

      DownloadFileByHash download = parent.addChild(DownloadFileByHash.class);
      download.setUrl(url);
      download.hash = new Md5Hash("5ca02245c829422176d23fa530e919cc");
      download.filePath = zipFile;

      // Symlinks avoid multiple versions
      parent.addChild(ManagedSymlink.build(new File(extDir, "commons-pool.jar"), zipFile));
    }

    {
      String url = "http://repo1.maven.org/maven2/commons-dbcp/commons-dbcp/1.4/commons-dbcp-1.4.jar";

      File basePath = template.getInstallDir();
      File zipFile = new File(basePath, "commons-dbcp-1.4.jar");

      DownloadFileByHash download = parent.addChild(DownloadFileByHash.class);
      download.setUrl(url);
      download.hash = new Md5Hash("b004158fab904f37f5831860898b3cd9");
      download.filePath = zipFile;

      // Symlinks avoid multiple versions
      parent.addChild(ManagedSymlink.build(new File(extDir, "commons-dbcp.jar"), zipFile));
    }

    {
      String url = "http://downloads.bouncycastle.org/java/bcprov-jdk15on-147.jar";

      File basePath = template.getInstallDir();
      File dest = new File(basePath, "bcprov-jdk15on-147.jar");

      DownloadFileByHash download = parent.addChild(DownloadFileByHash.class);
      download.setUrl(url);
      download.hash = new Md5Hash("7749dd7eca4403fb968ddc484263736a");
      download.filePath = dest;

      // Symlinks avoid multiple versions
      parent.addChild(ManagedSymlink.build(new File(extDir, "bcprov.jar"), dest));
    }
View Full Code Here

Examples of com.fathomdb.hash.Md5Hash

      String apacheMirror = "http://apache.osuosl.org/";

      // This probably does need to be hard-coded though
      // (though maybe selectable from a list of supported releases)
      String file = "lucene/solr/3.6.0/apache-solr-3.6.0.tgz";
      Md5Hash hash = new Md5Hash("ac11ef4408bb015aa3a5eefcb1047aec");

      File basePath = new File("/opt/");
      File zipFile = new File(basePath, "apache-solr-3.6.0.tgz");
      File extractPath = new File(basePath, "apache-solr-3.6.0");
View Full Code Here

Examples of com.fathomdb.hash.Md5Hash

    List<CertificateInfo> certificates = chainInfo.getCertificates();
    for (X509Certificate cert : chain) {
      CertificateInfo certificateInfo = new CertificateInfo();

      certificateInfo.setSubjectDN(Certificates.getSubject(cert));
      Md5Hash hash = OpenSshUtils.getSignature(cert.getPublicKey());
      certificateInfo.setPublicKeyHash(hash.toHex());

      byte[] data = cert.getPublicKey().getEncoded();
      certificateInfo.setPublicKey(Hex.toHex(data));

      certificates.add(certificateInfo);
View Full Code Here

Examples of com.fathomdb.hash.Md5Hash

  public class OpenstackCasObject extends OpsCasObjectBase {
    final StorageObject storageObject;

    public OpenstackCasObject(StorageObject storageObject) {
      super(OpenstackCasStore.this, new Md5Hash(storageObject.getHash()));
      this.storageObject = storageObject;
    }
View Full Code Here

Examples of com.fathomdb.hash.Md5Hash

    execution.checkExitCode();
    String stdout = execution.getStdOut();

    // Format is "hash filename"
    String[] items = stdout.split(" ");
    return new Md5Hash(items[0]);
  }
View Full Code Here

Examples of com.fathomdb.hash.Md5Hash

  @Override
  protected DownloadFileByHash buildDownload() {
    DownloadFileByHash download = super.buildDownload();

    download.setUrl("http://mirrors.med.harvard.edu/eclipse/jetty/7.6.8.v20121106/dist/jetty-distribution-7.6.8.v20121106.tar.gz");
    download.hash = new Md5Hash("49daf27ae78ec1188e23cd489a68bc3b");

    return download;
  }
View Full Code Here

Examples of com.fathomdb.hash.Md5Hash

  public static Md5Hash md5(byte[] data) {
    MessageDigest digest = buildMd5();

    byte[] hash = digest.digest(data);
    return new Md5Hash(hash);
  }
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.