Package org.codehaus.plexus.digest

Examples of org.codehaus.plexus.digest.Sha1Digester


    public void setUp()
        throws Exception
    {
        super.setUp();

        digesters = Arrays.asList( (Digester) new Md5Digester(), (Digester) new Sha1Digester() );
    }
View Full Code Here


                        "testing for SHA1 checksum on artifact: "
                                + artifactItem.toString());

                // did not pass MD5 checksum verification, now test SHA1
                // checksum
                if (!verifyChecksum(targetFile, new Sha1Digester(),
                        artifactItem.getChecksum()))
                {
                    // checksum verification failed, throw error
                    throw new MojoFailureException(
                            "Both MD5 and SHA1 checksum verification failed for: "
View Full Code Here

                        "testing for SHA1 checksum on artifact: "
                                + artifactItem.toString());

                // did not pass MD5 checksum verification, now test SHA1
                // checksum
                if (!verifyChecksum(targetFile, new Sha1Digester(),
                        artifactItem.getExtractFileChecksum()))
                {
                    // checksum verification failed, throw error
                    throw new MojoFailureException(
                            "Both MD5 and SHA1 checksum verification failed for: "
View Full Code Here

            digester = new Md5Digester();
            dataFile = new File( checksumFile.getPath().substring( 0, checksumFile.getPath().length() - 4 ) );
        }
        else if ( checksumFile.getName().endsWith( ".sha1" ) )
        {
            digester = new Sha1Digester();
            dataFile = new File( checksumFile.getPath().substring( 0, checksumFile.getPath().length() - 5 ) );
        }
        else
        {
            throw new IllegalArgumentException( "Unsupported checksum file: " + checksumFile );
View Full Code Here

    public void setUp()
        throws Exception
    {
        super.setUp();

        digesters = Arrays.asList( (Digester) new Md5Digester(), (Digester) new Sha1Digester() );
    }
View Full Code Here

      String md5Hash = contentAsString(md5Item);
      String sha1Hash = contentAsString(sha1Item);

      Md5Digester md5Digester = new Md5Digester();
      md5Digester.verify(mdFile, md5Hash);
      Sha1Digester sha1Digester = new Sha1Digester();
      sha1Digester.verify(mdFile, sha1Hash);
    }
    finally {
      mdFile.delete();
    }
  }
View Full Code Here

      // save it
      String sha1hash = contentAsString(item);

      Md5Digester md5Digester = new Md5Digester();
      md5Digester.verify(mdmFile, md5hash);
      Sha1Digester sha1Digester = new Sha1Digester();
      sha1Digester.verify(mdmFile, sha1hash);
    }
    finally {
      mdmFile.delete();
    }
View Full Code Here

      // save it
      String sha1hash = contentAsString(item);

      Md5Digester md5Digester = new Md5Digester();
      md5Digester.verify(mdmFile, md5hash);
      Sha1Digester sha1Digester = new Sha1Digester();
      sha1Digester.verify(mdmFile, sha1hash);
    }
    finally {
      mdmFile.delete();
    }
  }
View Full Code Here

        throws IOException,
            IndexContextInInconsistentStateException
    {
        try
        {
            String sha1 = new Sha1Digester().calc( artifact );

            return identify( ArtifactInfo.SHA1, sha1 );
        }
        catch ( DigesterException ex )
        {
View Full Code Here

        {
            // olamy when the TCL is not a URLClassLoader lookupList fail !
            // when using tomcat maven plugin so adding a simple hack
            log.warn( "using lookupList from sisu plexus failed so build plexus Digesters manually" );

            allDigesters = Arrays.asList( new Sha1Digester(), new Md5Digester() );

        }

        if ( allDigesters == null || allDigesters.isEmpty() )
        {
View Full Code Here

TOP

Related Classes of org.codehaus.plexus.digest.Sha1Digester

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.