Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Piatok, 29. marec 2024

Súbor: [Platon] / iotta / Iotta / Input / Checksum.pm (stiahnutie)

Revízia 1.1, Sat Apr 5 16:30:15 2003 UTC (20 years, 11 months ago) by yenar

compute SHA1 checksum of a file [Checksum.pm]

package Iotta::Input::Checksum;
use strict;
require Iotta::Elem;
our @ISA = ("Iotta::Elem");
our $digest_ok = eval "require Digest::SHA1;";

sub run {
    my $self = shift;
    my $m = shift;
    my $d = shift;
    if ($digest_ok) {
        $$m{checksum} = &Digest::SHA1::sha1_hex($d);
    }
    $self->next->run ($m, $d) if ($self->next);
    return 0;
}

sub initialize {
    my $self = shift;
    $self->SUPER::initialize (@_);
}

1;

Platon Group <platon@platon.sk> http://platon.sk/
Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok