JMX::Jmx4Perl::Agent::Jolokia::Verifier::SHA1Verifier - Verifies a


jmx4perl documentation Contained in the jmx4perl distribution.

Index


Code Index:

NAME

Top

JMX::Jmx4Perl::Agent::Jolokia::Verifier::SHA1Verifier - Verifies a SHA1 checksum

DESCRIPTION

Top

Verifies against a SHA1 checksum for an artifact. The SHA1 sum needs to be available parallel to the download artifact with a ".sha1" extension.

LICENSE

Top

This file is part of jmx4perl. Jmx4perl is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by The Free Software Foundation, either version 2 of the License, or (at your option) any later version.

jmx4perl is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with jmx4perl. If not, see <http://www.gnu.org/licenses/>.

A commercial license is available as well. Please contact roland@cpan.org for further details.

AUTHOR

Top

roland@cpan.org


jmx4perl documentation Contained in the jmx4perl distribution.
#!/usr/bin/perl
package JMX::Jmx4Perl::Agent::Jolokia::Verifier::SHA1Verifier;

use Digest::SHA1;
use JMX::Jmx4Perl::Agent::Jolokia::Verifier::ChecksumVerifier;
use base qw(JMX::Jmx4Perl::Agent::Jolokia::Verifier::ChecksumVerifier);
use strict;

sub extension { 
    return ".sha1";
}

sub name { 
    return "SHA1";
}

sub create_digester {
    return new Digest::SHA1();
}

1;